Parcourir la source

航运基础资料

lazhaoqian il y a 4 ans
Parent
commit
63d82cbc05
17 fichiers modifiés avec 896 ajouts et 189 suppressions
  1. 108 3
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/shipping/controller/TAddressController.java
  2. 25 1
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/shipping/controller/TCntrController.java
  3. 23 3
      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. 15 0
      ruoyi-shipping/src/main/java/com/ruoyi/shipping/domain/TAddress.java
  6. 74 79
      ruoyi-shipping/src/main/java/com/ruoyi/shipping/domain/TCntr.java
  7. 4 0
      ruoyi-shipping/src/main/java/com/ruoyi/shipping/domain/TCntrno.java
  8. 56 0
      ruoyi-shipping/src/main/java/com/ruoyi/shipping/mapper/TAddressMapper.java
  9. 7 0
      ruoyi-shipping/src/main/java/com/ruoyi/shipping/mapper/TCntrnoMapper.java
  10. 52 0
      ruoyi-shipping/src/main/java/com/ruoyi/shipping/service/ITAddressService.java
  11. 7 1
      ruoyi-shipping/src/main/java/com/ruoyi/shipping/service/ITCntrnoService.java
  12. 45 0
      ruoyi-shipping/src/main/java/com/ruoyi/shipping/service/impl/TAddressServiceImpl.java
  13. 3 0
      ruoyi-shipping/src/main/java/com/ruoyi/shipping/service/impl/TCntrServiceImpl.java
  14. 44 3
      ruoyi-shipping/src/main/java/com/ruoyi/shipping/service/impl/TCntrnoServiceImpl.java
  15. 346 49
      ruoyi-shipping/src/main/resources/mapper/shipping/TAddressMapper.xml
  16. 40 12
      ruoyi-shipping/src/main/resources/mapper/shipping/TCntrMapper.xml
  17. 45 36
      ruoyi-shipping/src/main/resources/mapper/shipping/TCntrnoMapper.xml

+ 108 - 3
ruoyi-admin/src/main/java/com/ruoyi/web/controller/shipping/controller/TAddressController.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;
@@ -48,6 +49,100 @@ public class TAddressController extends BaseController
     }
 
     /**
+     * 查询堆场信息
+     * @param tAddress
+     * @return
+     */
+    @PreAuthorize("@ss.hasPermi('shipping:address:selectStockDump')")
+    @GetMapping("/selectStockDump")
+    public TableDataInfo selectStockDump(TAddress tAddress)
+    {
+        startPage();
+        List<TAddress> list = tAddressService.selectStockDump(tAddress);
+        return getDataTable(list);
+    }
+
+    /**
+     * 查看码头信息
+     * @param tAddress
+     * @return
+     */
+    @PreAuthorize("@ss.hasPermi('shipping:address:selectWarfDump')")
+    @GetMapping("/selectWarfDump")
+    public TableDataInfo selectWarfDump(TAddress tAddress)
+    {
+        startPage();
+        List<TAddress> list = tAddressService.selectWarfDump(tAddress);
+        return getDataTable(list);
+    }
+
+    /**
+     * 查询港口名称
+     * @param tAddress
+     * @return
+     */
+    @PreAuthorize("@ss.hasPermi('shipping:address:selectPortName')")
+    @GetMapping("/selectPortName")
+    public TableDataInfo selectPortName(TAddress tAddress)
+    {
+        startPage();
+        List<Map<String, Object>> list = tAddressService.selectPortName(tAddress);
+        return getDataTable(list);
+    }
+    /**
+     * 查询码头名称
+     * @param tAddress
+     * @return
+     */
+    @PreAuthorize("@ss.hasPermi('shipping:address:selectWharfName')")
+    @GetMapping("/selectWharfName")
+    public TableDataInfo selectWharfName(TAddress tAddress)
+    {
+        startPage();
+        List<Map<String, Object>> list = tAddressService.selectWharfName(tAddress);
+        return getDataTable(list);
+    }
+    /**
+     * 查询堆场名称
+     * @param tAddress
+     * @return
+     */
+    @PreAuthorize("@ss.hasPermi('shipping:address:selectStorageName')")
+    @GetMapping("/selectStorageName")
+    public TableDataInfo selectStorageName(TAddress tAddress)
+    {
+        startPage();
+        List<Map<String, Object>> list = tAddressService.selectStorageName(tAddress);
+        return getDataTable(list);
+    }
+    /**
+     * 查询航线名称
+     * @param tAddress
+     * @return
+     */
+    @PreAuthorize("@ss.hasPermi('shipping:address:selectAirLineName')")
+    @GetMapping("/selectAirLineName")
+    public TableDataInfo selectAirLineName(TAddress tAddress)
+    {
+        startPage();
+        List<Map<String, Object>> list = tAddressService.selectAirLineName(tAddress);
+        return getDataTable(list);
+    }
+    /**
+     * 查询港口信息
+     * @param tAddress
+     * @return
+     */
+    @PreAuthorize("@ss.hasPermi('shipping:address:selectPortDump')")
+    @GetMapping("/selectPortDump")
+    public TableDataInfo selectPortDump(TAddress tAddress)
+    {
+        startPage();
+        List<TAddress> list = tAddressService.selectPortDump(tAddress);
+        return getDataTable(list);
+    }
+
+    /**
      * 导出地点基础信息(港口 码头 堆场 航线)列表
      */
     @PreAuthorize("@ss.hasPermi('shipping:address:export')")
@@ -85,9 +180,19 @@ public class TAddressController extends BaseController
             return AjaxResult.error("地点编号不能为空");
         }
         if (StringUtils.isEmpty(tAddress.getfName())){
-            return AjaxResult.error("地点编号不能为空");
+            return AjaxResult.error("地点名称不能为空");
+        }
+        if (tAddress.getfId()==null){
+            return toAjax(tAddressService.insertTAddress(tAddress));
+        }else {
+            if (tAddress.getfStatus().equals("T") ||tAddress.getfStatus().equals("正常")){
+                tAddress.setfStatus("T");
+            }else {
+                tAddress.setfStatus("F");
+            }
+            return toAjax(tAddressService.updateTAddress(tAddress));
         }
-        return toAjax(tAddressService.insertTAddress(tAddress));
+
     }
 
     /**
@@ -109,6 +214,6 @@ public class TAddressController extends BaseController
 	@DeleteMapping("/{fIds}")
     public AjaxResult remove(@PathVariable Long[] fIds)
     {
-        return toAjax(tAddressService.deleteTAddressByIds(fIds));
+        return toAjax(tAddressService.updateTAddressStatus(fIds));
     }
 }

+ 25 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/shipping/controller/TCntrController.java

@@ -1,6 +1,8 @@
 package com.ruoyi.web.controller.shipping.controller;
 
 import java.util.List;
+
+import com.ruoyi.common.utils.StringUtils;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -76,7 +78,29 @@ public class TCntrController extends BaseController
     @PostMapping
     public AjaxResult add(@RequestBody TCntr tCntr)
     {
-        return toAjax(tCntrService.insertTCntr(tCntr));
+        if (tCntr.getfType() == null){
+            return AjaxResult.error("集装箱类型不能为空");
+        }
+        if (StringUtils.isEmpty(tCntr.getfNo())){
+            return AjaxResult.error("集装箱编号不能为空");
+        }
+        if (StringUtils.isEmpty(tCntr.getfName())){
+            return AjaxResult.error("集装箱名称不能为空");
+        }
+        if (StringUtils.isEmpty(tCntr.getfName())){
+            return AjaxResult.error("集装箱英文名不能为空");
+        }
+        if (tCntr.getfId() == null){
+            return toAjax(tCntrService.insertTCntr(tCntr));
+        }else {
+            if (tCntr.getfStatus().equals("T") ||tCntr.getfStatus().equals("正常")){
+                tCntr.setfStatus("T");
+            }else {
+                tCntr.setfStatus("F");
+            }
+            return toAjax(tCntrService.updateTCntr(tCntr));
+        }
+
     }
 
     /**

+ 23 - 3
ruoyi-admin/src/main/java/com/ruoyi/web/controller/shipping/controller/TCntrnoController.java

@@ -1,6 +1,8 @@
 package com.ruoyi.web.controller.shipping.controller;
 
 import java.util.List;
+
+import com.ruoyi.common.utils.StringUtils;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -76,6 +78,24 @@ public class TCntrnoController extends BaseController
     @PostMapping
     public AjaxResult add(@RequestBody TCntrno tCntrno)
     {
+        if (StringUtils.isEmpty(tCntrno.getfNo())){
+            return AjaxResult.error("箱号不能为空");
+        }
+        if (tCntrno.getfTypeid() == null){
+            return AjaxResult.error("箱类型不能为空");
+        }
+        if (StringUtils.isEmpty(tCntrno.getfOwner())){
+            return AjaxResult.error("箱主不能为空");
+        }
+        if (StringUtils.isEmpty(tCntrno.getfUpdateaddress())){
+            return AjaxResult.error("地点不能为空");
+        }
+        if (StringUtils.isEmpty(tCntrno.getfUpdateef())){
+            return AjaxResult.error("箱重不能为空");
+        }
+        if (StringUtils.isEmpty(tCntrno.getfCntrstatus())){
+            return AjaxResult.error("箱状态不能为空");
+        }
         return toAjax(tCntrnoService.insertTCntrno(tCntrno));
     }
 
@@ -85,19 +105,19 @@ public class TCntrnoController extends BaseController
     @PreAuthorize("@ss.hasPermi('shipping:cntrno:edit')")
     @Log(title = "集装箱号", businessType = BusinessType.UPDATE)
     @PutMapping
-    public AjaxResult edit(@RequestBody TCntrno tCntrno)
+    public AjaxResult edit(@RequestBody List<TCntrno> tCntrno)
     {
         return toAjax(tCntrnoService.updateTCntrno(tCntrno));
     }
 
     /**
-     * 删除集装箱号
+     * 删除集装箱号将数据状态改为停用
      */
     @PreAuthorize("@ss.hasPermi('shipping:cntrno:remove')")
     @Log(title = "集装箱号", businessType = BusinessType.DELETE)
 	@DeleteMapping("/{fIds}")
     public AjaxResult remove(@PathVariable Long[] fIds)
     {
-        return toAjax(tCntrnoService.deleteTCntrnoByIds(fIds));
+        return toAjax(tCntrnoService.updateTcntrnoStatus(fIds));
     }
 }

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

+ 15 - 0
ruoyi-shipping/src/main/java/com/ruoyi/shipping/domain/TAddress.java

@@ -1,16 +1,23 @@
 package com.ruoyi.shipping.domain;
 
+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;
 import com.ruoyi.common.core.domain.BaseEntity;
 
+import java.util.Date;
+import java.util.List;
+
 /**
  * 地点基础信息(港口 码头 堆场 航线)对象 t_address
  * 
  * @author ruoyi
  * @date 2021-03-22
  */
+@Data
 public class TAddress extends BaseEntity
 {
     private static final long serialVersionUID = 1L;
@@ -77,6 +84,14 @@ public class TAddress extends BaseEntity
     /** 默认 T ,正常T 停用F 下拉选择 */
     @Excel(name = "默认 T ,正常T 停用F 下拉选择")
     private String fStatus;
+    @TableField(exist = false)
+    private String portName;
+    @TableField(exist = false)
+    private String typesName;
+    @TableField(exist = false)
+    private String havenName;
+    //查询时间区间
+    private List<String> cLoadDate;
 
     public void setfId(Long fId) 
     {

+ 74 - 79
ruoyi-shipping/src/main/java/com/ruoyi/shipping/domain/TCntr.java

@@ -1,16 +1,21 @@
 package com.ruoyi.shipping.domain;
 
+import lombok.Data;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 import com.ruoyi.common.annotation.Excel;
 import com.ruoyi.common.core.domain.BaseEntity;
 
+import java.math.BigDecimal;
+import java.util.List;
+
 /**
  * 集装箱对象 t_cntr
  * 
  * @author ruoyi
  * @date 2021-03-22
  */
+@Data
 public class TCntr extends BaseEntity
 {
     private static final long serialVersionUID = 1L;
@@ -40,143 +45,133 @@ public class TCntr extends BaseEntity
 
     /** TEU */
     @Excel(name = "TEU")
-    private Long fTeu;
+    private BigDecimal fTeu;
 
     /** 箱容量(立方) */
     @Excel(name = "箱容量", readConverterExp = "立=方")
-    private Long fCbm;
+    private BigDecimal fCbm;
 
     /** 箱容量(吨) */
     @Excel(name = "箱容量", readConverterExp = "吨=")
-    private Long fWeight;
+    private BigDecimal fWeight;
 
     /** 尺码 (20 40 45) */
     @Excel(name = "尺码 ", readConverterExp = "2=0,4=0,4=5")
-    private Long fCntrsize;
+    private BigDecimal fCntrsize;
 
     /** 状态(默认 T ,正常T 停用F 下拉选择) */
     @Excel(name = "状态", readConverterExp = "默=认,T=,,=正常T,停=用F,下=拉选择")
     private String fStatus;
 
-    public void setfId(Long fId) 
-    {
+    public Long getfId() {
+        return fId;
+    }
+
+    public void setfId(Long fId) {
         this.fId = fId;
     }
 
-    public Long getfId() 
-    {
-        return fId;
+    public Integer getfType() {
+        return fType;
     }
-    public void setfType(Integer fType) 
-    {
+
+    public void setfType(Integer fType) {
         this.fType = fType;
     }
 
-    public Integer getfType() 
-    {
-        return fType;
+    public String getfNo() {
+        return fNo;
     }
-    public void setfNo(String fNo) 
-    {
+
+    public void setfNo(String fNo) {
         this.fNo = fNo;
     }
 
-    public String getfNo() 
-    {
-        return fNo;
+    public String getfName() {
+        return fName;
     }
-    public void setfName(String fName) 
-    {
+
+    public void setfName(String fName) {
         this.fName = fName;
     }
 
-    public String getfName() 
-    {
-        return fName;
+    public String getfEname() {
+        return fEname;
     }
-    public void setfEname(String fEname) 
-    {
+
+    public void setfEname(String fEname) {
         this.fEname = fEname;
     }
 
-    public String getfEname() 
-    {
-        return fEname;
+    public String getfUncode() {
+        return fUncode;
     }
-    public void setfUncode(String fUncode) 
-    {
+
+    public void setfUncode(String fUncode) {
         this.fUncode = fUncode;
     }
 
-    public String getfUncode() 
-    {
-        return fUncode;
+    public BigDecimal getfTeu() {
+        return fTeu;
     }
-    public void setfTeu(Long fTeu) 
-    {
+
+    public void setfTeu(BigDecimal fTeu) {
         this.fTeu = fTeu;
     }
 
-    public Long getfTeu() 
-    {
-        return fTeu;
+    public BigDecimal getfCbm() {
+        return fCbm;
     }
-    public void setfCbm(Long fCbm) 
-    {
+
+    public void setfCbm(BigDecimal fCbm) {
         this.fCbm = fCbm;
     }
 
-    public Long getfCbm() 
-    {
-        return fCbm;
+    public BigDecimal getfWeight() {
+        return fWeight;
     }
-    public void setfWeight(Long fWeight) 
-    {
+
+    public void setfWeight(BigDecimal fWeight) {
         this.fWeight = fWeight;
     }
 
-    public Long getfWeight() 
-    {
-        return fWeight;
+    public BigDecimal getfCntrsize() {
+        return fCntrsize;
     }
-    public void setfCntrsize(Long fCntrsize) 
-    {
+
+    public void setfCntrsize(BigDecimal fCntrsize) {
         this.fCntrsize = fCntrsize;
     }
 
-    public Long getfCntrsize() 
-    {
-        return fCntrsize;
+    public String getfStatus() {
+        return fStatus;
     }
-    public void setfStatus(String fStatus) 
-    {
+
+    public void setfStatus(String fStatus) {
         this.fStatus = fStatus;
     }
 
-    public String getfStatus() 
-    {
-        return fStatus;
+    public List<String> getcLoadDate() {
+        return cLoadDate;
+    }
+
+    public void setcLoadDate(List<String> cLoadDate) {
+        this.cLoadDate = cLoadDate;
+    }
+
+    public String getTypeName() {
+        return typeName;
     }
 
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("fId", getfId())
-            .append("fType", getfType())
-            .append("fNo", getfNo())
-            .append("fName", getfName())
-            .append("fEname", getfEname())
-            .append("fUncode", getfUncode())
-            .append("fTeu", getfTeu())
-            .append("fCbm", getfCbm())
-            .append("fWeight", getfWeight())
-            .append("fCntrsize", getfCntrsize())
-            .append("fStatus", getfStatus())
-            .append("createBy", getCreateBy())
-            .append("createTime", getCreateTime())
-            .append("updateBy", getUpdateBy())
-            .append("updateTime", getUpdateTime())
-            .append("remark", getRemark())
-            .toString();
+    public void setTypeName(String typeName) {
+        this.typeName = typeName;
     }
+
+    //查询时间区间
+    private List<String> cLoadDate;
+    //箱柜类型
+    private String typeName;
+
+
+
 }

+ 4 - 0
ruoyi-shipping/src/main/java/com/ruoyi/shipping/domain/TCntrno.java

@@ -1,6 +1,8 @@
 package com.ruoyi.shipping.domain;
 
 import java.util.Date;
+
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
@@ -60,6 +62,8 @@ public class TCntrno extends BaseEntity
     /** 默认 T ,正常T 停用F 下拉选择 */
     @Excel(name = "默认 T ,正常T 停用F 下拉选择")
     private String fStatus;
+    @TableField(exist = false)
+    private String fMblno;
 
     public void setfId(Long fId) 
     {

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

@@ -1,6 +1,8 @@
 package com.ruoyi.shipping.mapper;
 
 import java.util.List;
+import java.util.Map;
+
 import com.ruoyi.shipping.domain.TAddress;
 
 /**
@@ -28,6 +30,53 @@ public interface TAddressMapper
     public List<TAddress> selectTAddressList(TAddress tAddress);
 
     /**
+     * 查询堆场信息
+     * @param tAddress
+     * @return
+     */
+    public List<TAddress> selectStockDump(TAddress tAddress);
+    /**
+     * 查询码头信息
+     * @param tAddress
+     * @return
+     */
+    public List<TAddress> selectWarfDump(TAddress tAddress);
+
+    /**
+     * 查看港口名称
+     * @param tAddress
+     * @return
+     */
+    public List<Map<String, Object>>selectPortName(TAddress tAddress);
+    /**
+     * 查看航线名称
+     * @param tAddress
+     * @return
+     */
+    public List<Map<String, Object>>selectAirLineName(TAddress tAddress);
+    /**
+     * 查看堆场名称
+     * @param tAddress
+     * @return
+     */
+    public List<Map<String, Object>>selectStorageName(TAddress tAddress);
+    /**
+     * 查看码头名称
+     * @param tAddress
+     * @return
+     */
+    public List<Map<String, Object>>selectWharfName(TAddress tAddress);
+
+
+    /**
+     * 查看港口信息
+     * @param tAddress
+     * @return
+     */
+    public List<TAddress>selectPortDump(TAddress tAddress);
+
+
+    /**
      * 新增地点基础信息(港口 码头 堆场 航线)
      * 
      * @param tAddress 地点基础信息(港口 码头 堆场 航线)
@@ -58,4 +107,11 @@ public interface TAddressMapper
      * @return 结果
      */
     public int deleteTAddressByIds(Long[] fIds);
+
+    /**
+     * 批量停用数据
+     * @param fIds
+     * @return
+     */
+    public int updateTAddressStatus(Long[] fIds);
 }

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

@@ -58,4 +58,11 @@ public interface TCntrnoMapper
      * @return 结果
      */
     public int deleteTCntrnoByIds(Long[] fIds);
+
+    /**
+     * 批量更新数据状态
+     * @param fIds
+     * @return
+     */
+    public int updateTcntrnoStatus(Long[] fIds);
 }

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

@@ -1,6 +1,8 @@
 package com.ruoyi.shipping.service;
 
 import java.util.List;
+import java.util.Map;
+
 import com.ruoyi.shipping.domain.TAddress;
 
 /**
@@ -58,4 +60,54 @@ public interface ITAddressService
      * @return 结果
      */
     public int deleteTAddressById(Long fId);
+
+    /**
+     * 批量停用数据
+     * @param fIds
+     * @return
+     */
+    public int updateTAddressStatus(Long[] fIds);
+    /**
+     * 查询堆场信息
+     * @param tAddress
+     * @return
+     */
+    public List<TAddress> selectStockDump(TAddress tAddress);
+    /**
+     * 查询港口信息
+     * @param tAddress
+     * @return
+     */
+    public List<TAddress> selectPortDump(TAddress tAddress);
+    /**
+     * 查询码头信息
+     * @param tAddress
+     * @return
+     */
+    public List<TAddress> selectWarfDump(TAddress tAddress);
+
+    /**
+     * 查看港口名称
+     * @param tAddress
+     * @return
+     */
+    public List<Map<String, Object>>selectPortName(TAddress tAddress);
+    /**
+     * 查看码头名称
+     * @param tAddress
+     * @return
+     */
+    public List<Map<String, Object>>selectWharfName(TAddress tAddress);
+    /**
+     * 查看堆场名称
+     * @param tAddress
+     * @return
+     */
+    public List<Map<String, Object>>selectStorageName(TAddress tAddress);
+    /**
+     * 查看航线名称
+     * @param tAddress
+     * @return
+     */
+    public List<Map<String, Object>>selectAirLineName(TAddress tAddress);
 }

+ 7 - 1
ruoyi-shipping/src/main/java/com/ruoyi/shipping/service/ITCntrnoService.java

@@ -41,7 +41,7 @@ public interface ITCntrnoService
      * @param tCntrno 集装箱号
      * @return 结果
      */
-    public int updateTCntrno(TCntrno tCntrno);
+    public int updateTCntrno(List<TCntrno> tCntrno);
 
     /**
      * 批量删除集装箱号
@@ -58,4 +58,10 @@ public interface ITCntrnoService
      * @return 结果
      */
     public int deleteTCntrnoById(Long fId);
+    /**
+     * 批量更新数据状态将正常状态改为停用
+     * @param fIds
+     * @return
+     */
+    public int updateTcntrnoStatus(Long[] fIds);
 }

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

@@ -1,7 +1,10 @@
 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;
 import org.springframework.stereotype.Service;
 import com.ruoyi.shipping.mapper.TAddressMapper;
@@ -54,6 +57,7 @@ public class TAddressServiceImpl implements ITAddressService
     public int insertTAddress(TAddress tAddress)
     {
         tAddress.setCreateTime(DateUtils.getNowDate());
+        tAddress.setCreateBy(SecurityUtils.getUsername());
         return tAddressMapper.insertTAddress(tAddress);
     }
 
@@ -67,6 +71,7 @@ public class TAddressServiceImpl implements ITAddressService
     public int updateTAddress(TAddress tAddress)
     {
         tAddress.setUpdateTime(DateUtils.getNowDate());
+        tAddress.setUpdateBy(SecurityUtils.getUsername());
         return tAddressMapper.updateTAddress(tAddress);
     }
 
@@ -93,4 +98,44 @@ public class TAddressServiceImpl implements ITAddressService
     {
         return tAddressMapper.deleteTAddressById(fId);
     }
+
+    @Override
+    public int updateTAddressStatus(Long[] fIds) {
+        return tAddressMapper.updateTAddressStatus(fIds);
+    }
+
+    @Override
+    public List<TAddress> selectStockDump(TAddress tAddress) {
+        return tAddressMapper.selectStockDump(tAddress);
+    }
+
+    @Override
+    public List<TAddress> selectPortDump(TAddress tAddress) {
+        return tAddressMapper.selectPortDump(tAddress);
+    }
+
+    @Override
+    public List<TAddress> selectWarfDump(TAddress tAddress) {
+        return tAddressMapper.selectWarfDump(tAddress);
+    }
+
+    @Override
+    public List<Map<String, Object>> selectPortName(TAddress tAddress) {
+        return tAddressMapper.selectPortName(tAddress);
+    }
+
+    @Override
+    public List<Map<String, Object>> selectWharfName(TAddress tAddress) {
+        return tAddressMapper.selectWharfName(tAddress);
+    }
+
+    @Override
+    public List<Map<String, Object>> selectStorageName(TAddress tAddress) {
+        return tAddressMapper.selectStorageName(tAddress);
+    }
+
+    @Override
+    public List<Map<String, Object>> selectAirLineName(TAddress tAddress) {
+        return tAddressMapper.selectAirLineName(tAddress);
+    }
 }

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

@@ -2,6 +2,7 @@ package com.ruoyi.shipping.service.impl;
 
 import java.util.List;
 import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.SecurityUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.ruoyi.shipping.mapper.TCntrMapper;
@@ -54,6 +55,7 @@ public class TCntrServiceImpl implements ITCntrService
     public int insertTCntr(TCntr tCntr)
     {
         tCntr.setCreateTime(DateUtils.getNowDate());
+        tCntr.setCreateBy(SecurityUtils.getUsername());
         return tCntrMapper.insertTCntr(tCntr);
     }
 
@@ -67,6 +69,7 @@ public class TCntrServiceImpl implements ITCntrService
     public int updateTCntr(TCntr tCntr)
     {
         tCntr.setUpdateTime(DateUtils.getNowDate());
+        tCntr.setUpdateBy(SecurityUtils.getUsername());
         return tCntrMapper.updateTCntr(tCntr);
     }
 

+ 44 - 3
ruoyi-shipping/src/main/java/com/ruoyi/shipping/service/impl/TCntrnoServiceImpl.java

@@ -1,7 +1,14 @@
 package com.ruoyi.shipping.service.impl;
 
+import java.util.Date;
 import java.util.List;
+
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.shipping.domain.TCntrtracking;
+import com.ruoyi.shipping.mapper.TCntrtrackingMapper;
+import org.apache.commons.lang3.concurrent.ConcurrentUtils;
+import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.ruoyi.shipping.mapper.TCntrnoMapper;
@@ -19,6 +26,8 @@ public class TCntrnoServiceImpl implements ITCntrnoService
 {
     @Autowired
     private TCntrnoMapper tCntrnoMapper;
+    @Autowired
+    private TCntrtrackingMapper tCntrtrackingMapper;
 
     /**
      * 查询集装箱号
@@ -54,6 +63,7 @@ public class TCntrnoServiceImpl implements ITCntrnoService
     public int insertTCntrno(TCntrno tCntrno)
     {
         tCntrno.setCreateTime(DateUtils.getNowDate());
+        tCntrno.setfUpdatetime(new Date());
         return tCntrnoMapper.insertTCntrno(tCntrno);
     }
 
@@ -64,10 +74,20 @@ public class TCntrnoServiceImpl implements ITCntrnoService
      * @return 结果
      */
     @Override
-    public int updateTCntrno(TCntrno tCntrno)
+    public int updateTCntrno(List<TCntrno> tCntrno)
     {
-        tCntrno.setUpdateTime(DateUtils.getNowDate());
-        return tCntrnoMapper.updateTCntrno(tCntrno);
+        int update = 0;
+        if (CollectionUtils.isNotEmpty(tCntrno)){
+            for (TCntrno cntrno : tCntrno) {
+                cntrno.setUpdateTime(DateUtils.getNowDate());
+                TCntrno tCntrnoById = tCntrnoMapper.selectTCntrnoById(cntrno.getfId());
+                TCntrtracking setfield = setfield(tCntrnoById);
+                tCntrtrackingMapper.insertTCntrtracking(setfield);
+                //更改t_cntro表信息
+                update = tCntrnoMapper.updateTCntrno((cntrno));
+            }
+        }
+        return update;
     }
 
     /**
@@ -93,4 +113,25 @@ public class TCntrnoServiceImpl implements ITCntrnoService
     {
         return tCntrnoMapper.deleteTCntrnoById(fId);
     }
+
+    /**
+     * 批量更新数据状态将正常状态改为停用
+     * @param fIds
+     * @return
+     */
+    @Override
+    public int updateTcntrnoStatus(Long[] fIds) {
+        return tCntrnoMapper.updateTcntrnoStatus(fIds);
+    }
+
+    /**
+     * set字段
+     * @param tCntrno
+     * @return
+     */
+    public TCntrtracking  setfield(TCntrno tCntrno){
+        TCntrtracking tCntrtracking = new TCntrtracking();
+        BeanUtils.copyProperties(tCntrtracking,tCntrno);
+        return tCntrtracking;
+    }
 }

+ 346 - 49
ruoyi-shipping/src/main/resources/mapper/shipping/TAddressMapper.xml

@@ -1,63 +1,99 @@
 <?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.TAddressMapper">
-    
+
     <resultMap type="TAddress" id="TAddressResult">
-        <result property="fId"    column="f_id"    />
-        <result property="fTypes"    column="f_types"    />
-        <result property="fNo"    column="f_no"    />
-        <result property="fName"    column="f_name"    />
-        <result property="fEname"    column="f_ename"    />
-        <result property="fLaneid"    column="f_laneid"    />
-        <result property="fPortid"    column="f_portid"    />
-        <result property="fCountry"    column="f_country"    />
-        <result property="fProvince"    column="f_province"    />
-        <result property="fCity"    column="f_city"    />
-        <result property="fTel"    column="f_tel"    />
-        <result property="fEmail"    column="f_email"    />
-        <result property="fManagerid"    column="f_managerid"    />
-        <result property="fUncode"    column="f_uncode"    />
-        <result property="fPort"    column="f_port"    />
-        <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="fTypes" column="f_types"/>
+        <result property="fNo" column="f_no"/>
+        <result property="fName" column="f_name"/>
+        <result property="fEname" column="f_ename"/>
+        <result property="fLaneid" column="f_laneid"/>
+        <result property="fPortid" column="f_portid"/>
+        <result property="fCountry" column="f_country"/>
+        <result property="fProvince" column="f_province"/>
+        <result property="fCity" column="f_city"/>
+        <result property="fTel" column="f_tel"/>
+        <result property="fEmail" column="f_email"/>
+        <result property="fManagerid" column="f_managerid"/>
+        <result property="fUncode" column="f_uncode"/>
+        <result property="fPort" column="f_port"/>
+        <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="selectTAddressVo">
-        select f_id, f_types, f_no, f_name, f_ename, f_laneid, f_portid, f_country, f_province, f_city, f_tel, f_email, f_managerid, f_uncode, f_port, f_status, create_by, create_time, update_by, update_time, remark from t_address
+        select f_id, f_types, f_no, f_name, f_ename, f_laneid, f_portid, f_country, f_province, f_city, f_tel, f_email, f_managerid, f_uncode, f_port, case when f_status = 'T' then '正常' else '停用' end as f_status, create_by, create_time, update_by, update_time, remark from t_address
     </sql>
 
     <select id="selectTAddressList" parameterType="TAddress" resultMap="TAddressResult">
-        <include refid="selectTAddressVo"/>
-        <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>
-        </where>
+        SELECT
+        f_id,
+        f_types,
+        f_no,
+        f_name,
+        f_ename,
+        f_laneid,
+        f_portid,
+        f_country,
+        f_province,
+        f_city,
+        f_tel,
+        f_email,
+        f_managerid,
+        f_uncode,
+        f_port,
+        CASE
+
+        WHEN f_status = 'T' THEN
+        '正常' ELSE '停用'
+        END AS f_status,
+        create_by,
+        create_time,
+        update_by,
+        update_time,
+        remark
+        FROM
+        t_address t
+        LEFT JOIN ( SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'f_types' ) s ON t.f_types =
+        s.dict_value
+        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='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>
     </select>
-    
+
     <select id="selectTAddressById" parameterType="Long" resultMap="TAddressResult">
         <include refid="selectTAddressVo"/>
         where f_id = #{fId}
     </select>
-        
+
     <insert id="insertTAddress" parameterType="TAddress">
         insert into t_address
         <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -82,7 +118,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="fTypes != null and fTypes != ''">#{fTypes},</if>
@@ -105,7 +141,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="updateTAddress" parameterType="TAddress">
@@ -140,10 +176,271 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </delete>
 
     <delete id="deleteTAddressByIds" parameterType="String">
-        delete from t_address where f_id in 
+        delete from t_address where f_id in
         <foreach item="fId" collection="array" open="(" separator="," close=")">
             #{fId}
         </foreach>
     </delete>
-    
+    <!--批量更新数据状态-->
+    <update id="updateTAddressStatus" parameterType="string">
+        update t_address
+        set f_status = F
+        where f_id in
+        <foreach item="fId" collection="array" open="(" separator="," close=")">
+            #{fId}
+        </foreach>
+    </update>
+    <!--查询堆场信息-->
+    <select id="selectStockDump" parameterType="TAddress" resultMap="TAddressResult">
+        SELECT
+        t.f_id,
+        t.f_types,
+        pro.dict_label a,
+        t.f_no,
+        t.f_name,
+        t.f_ename,
+        t.f_laneid,
+        t.f_portid,
+        t.f_country,
+        t.f_province,
+        t.f_city,
+        t.f_tel,
+        t.f_email,
+        t.f_managerid,
+        t.f_uncode,
+        t.f_port,
+        pros.dict_label b,
+        CASE
+
+        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
+        t_address t
+        LEFT JOIN t_address d ON t.f_portid = d.f_id
+        LEFT JOIN sys_dict_data pro ON pro.dict_value = t.f_types and pro.dict_type = 'f_types'
+        LEFT JOIN sys_dict_data pros ON pros.dict_value = t.f_types and pros.dict_type = 'f_port'
+        <where>
+            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 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>
+            <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 t.create_time &gt;= #{cLoadDate[0]}
+            </if>
+            <if test='cLoadDate != null and cLoadDate[1] != null and cLoadDate[1]!= ""'>
+                and t.create_time &lt;= #{cLoadDate[1]}
+            </if>
+        </where>
+    </select>
+    <!--查询码头信息-->
+    <select id="selectWarfDump" parameterType="TAddress" resultMap="TAddressResult">
+        SELECT
+        t.f_id,
+        t.f_types,
+        pro.dict_label a,
+        t.f_no,
+        t.f_name,
+        t.f_ename,
+        t.f_laneid,
+        t.f_portid,
+        t.f_country,
+        t.f_province,
+        t.f_city,
+        t.f_tel,
+        t.f_email,
+        t.f_managerid,
+        t.f_uncode,
+        t.f_port,
+        pros.dict_label b,
+        CASE
+
+        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
+        t_address t
+        LEFT JOIN t_address d ON t.f_portid = d.f_id
+        LEFT JOIN sys_dict_data pro ON pro.dict_value = t.f_types and pro.dict_type = 'f_types'
+        LEFT JOIN sys_dict_data pros ON pros.dict_value = t.f_types and pros.dict_type = 'f_port'
+        <where>
+            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="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 t.create_time &gt;= #{cLoadDate[0]}
+            </if>
+            <if test='cLoadDate != null and cLoadDate[1] != null and cLoadDate[1]!= ""'>
+                and t.create_time &lt;= #{cLoadDate[1]}
+            </if>
+        </where>
+    </select>
+    <!--查看港口名称-->
+    <select id="selectPortName" parameterType="TAddress" resultType="map">
+        SELECT
+        f_id as fId,
+        f_name as fName
+        FROM
+        t_address t
+        LEFT JOIN
+        (SELECT dict_label,dict_value FROM sys_dict_data WHERE dict_type = 'f_types') s
+        ON t.f_types = s.dict_value
+        WHERE t.f_status = 'T'
+        AND s.dict_label = '港口'
+        <if test="fName != null  and fName != ''">and f_name like concat('%', #{fName}, '%')</if>
+    </select>
+    <!--查看航线名称-->
+    <select id="selectAirLineName" parameterType="TAddress" resultType="map">
+        SELECT
+        f_id as fId,
+        f_name as fName
+        FROM
+        t_address t
+        LEFT JOIN
+        (SELECT dict_label,dict_value FROM sys_dict_data WHERE dict_type = 'f_types') s
+        ON t.f_types = s.dict_value
+        WHERE t.f_status = 'T'
+        AND s.dict_label = '航线'
+        <if test="fName != null  and fName != ''">and f_name like concat('%', #{fName}, '%')</if>
+    </select>
+    <!--查看堆场名称-->
+    <select id="selectStorageName" parameterType="TAddress" resultType="map">
+        SELECT
+        f_id as fId,
+        f_name as fName
+        FROM
+        t_address t
+        LEFT JOIN
+        (SELECT dict_label,dict_value FROM sys_dict_data WHERE dict_type = 'f_types') s
+        ON t.f_types = s.dict_value
+        WHERE t.f_status = 'T'
+        AND s.dict_label = '堆场'
+        <if test="fName != null  and fName != ''">and f_name like concat('%', #{fName}, '%')</if>
+    </select>
+    <!--查看堆场名称-->
+    <select id="selectWharfName" parameterType="TAddress" resultType="map">
+        SELECT
+        f_id as fId,
+        f_name as fName
+        FROM
+        t_address t
+        LEFT JOIN
+        (SELECT dict_label,dict_value FROM sys_dict_data WHERE dict_type = 'f_types') s
+        ON t.f_types = s.dict_value
+        WHERE t.f_status = 'T'
+        AND s.dict_label = '码头'
+        <if test="fName != null  and fName != ''">and f_name like concat('%', #{fName}, '%')</if>
+    </select>
+    <!--查询港口信息-->
+    <select id="selectPortDump" parameterType="TAddress" resultMap="TAddressResult">
+        SELECT
+        t.f_id,
+        t.f_types,
+        pro.dict_label typesName,
+        t.f_no ,
+        t.f_name ,
+        t.f_ename ,
+        t.f_laneid,
+        t.f_portid ,
+        t.f_country ,
+        t.f_province ,
+        t.f_city ,
+        t.f_tel ,
+        t.f_email ,
+        t.f_managerid ,
+        t.f_uncode ,
+        t.f_port ,
+        pros.dict_label havenName,
+        t.create_by,
+        t.create_time,
+        t.update_by,
+        t.update_time,
+        t.remark,
+        CASE
+        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
+        t_address t
+        LEFT JOIN t_address d ON t.f_laneid = d.f_id
+        LEFT JOIN sys_dict_data pro ON pro.dict_value = t.f_types and pro.dict_type = 'f_types'
+        LEFT JOIN sys_dict_data pros ON pros.dict_value = t.f_types and pros.dict_type = 'f_port'
+        <where>
+            t.f_status = 'T'
+            and pro.dict_label = '港口'
+            <if test="fTypes != null  and fTypes != ''">and 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='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>
+
+
 </mapper>

+ 40 - 12
ruoyi-shipping/src/main/resources/mapper/shipping/TCntrMapper.xml

@@ -28,18 +28,46 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </sql>
 
     <select id="selectTCntrList" parameterType="TCntr" resultMap="TCntrResult">
-        <include refid="selectTCntrVo"/>
-        <where>  
-            <if test="fType != null "> and f_type = #{fType}</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="fUncode != null  and fUncode != ''"> and f_uncode = #{fUncode}</if>
-            <if test="fTeu != null "> and f_teu = #{fTeu}</if>
-            <if test="fCbm != null "> and f_cbm = #{fCbm}</if>
-            <if test="fWeight != null "> and f_weight = #{fWeight}</if>
-            <if test="fCntrsize != null "> and f_cntrsize = #{fCntrsize}</if>
-            <if test="fStatus != null  and fStatus != ''"> and f_status = #{fStatus}</if>
+        SELECT
+        f_id,
+        f_type,
+        s.dict_label typeName,
+        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 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
+        <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='cLoadDate != null and cLoadDate[0] != null and cLoadDate[0]!= ""'>
+                and t.create_time &gt;= #{cLoadDate[0]}
+            </if>
+            <if test='cLoadDate != null and cLoadDate[1] != null and cLoadDate[1]!= ""'>
+                and t.create_time &lt;= #{cLoadDate[1]}
+            </if>
         </where>
     </select>
     

+ 45 - 36
ruoyi-shipping/src/main/resources/mapper/shipping/TCntrnoMapper.xml

@@ -1,26 +1,26 @@
 <?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.TCntrnoMapper">
-    
+
     <resultMap type="TCntrno" id="TCntrnoResult">
-        <result property="fId"    column="f_id"    />
-        <result property="fNo"    column="f_no"    />
-        <result property="fTypeid"    column="f_typeid"    />
-        <result property="fOwner"    column="f_owner"    />
-        <result property="fSource"    column="f_source"    />
-        <result property="fRent"    column="f_rent"    />
-        <result property="fUpdatetime"    column="f_updatetime"    />
-        <result property="fUpdateaddress"    column="f_updateaddress"    />
-        <result property="fUpdateef"    column="f_updateEF"    />
-        <result property="fCntrstatus"    column="f_cntrstatus"    />
-        <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="fNo" column="f_no"/>
+        <result property="fTypeid" column="f_typeid"/>
+        <result property="fOwner" column="f_owner"/>
+        <result property="fSource" column="f_source"/>
+        <result property="fRent" column="f_rent"/>
+        <result property="fUpdatetime" column="f_updatetime"/>
+        <result property="fUpdateaddress" column="f_updateaddress"/>
+        <result property="fUpdateef" column="f_updateEF"/>
+        <result property="fCntrstatus" column="f_cntrstatus"/>
+        <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="selectTCntrnoVo">
@@ -29,25 +29,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="selectTCntrnoList" parameterType="TCntrno" resultMap="TCntrnoResult">
         <include refid="selectTCntrnoVo"/>
-        <where>  
-            <if test="fNo != null  and fNo != ''"> and f_no = #{fNo}</if>
-            <if test="fTypeid != null "> and f_typeid = #{fTypeid}</if>
-            <if test="fOwner != null  and fOwner != ''"> and f_owner = #{fOwner}</if>
-            <if test="fSource != null  and fSource != ''"> and f_source = #{fSource}</if>
-            <if test="fRent != null  and fRent != ''"> and f_rent = #{fRent}</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>
+        <where>
+            <if test="fNo != null  and fNo != ''">and f_no = #{fNo}</if>
+            <if test="fTypeid != null ">and f_typeid = #{fTypeid}</if>
+            <if test="fOwner != null  and fOwner != ''">and f_owner = #{fOwner}</if>
+            <if test="fSource != null  and fSource != ''">and f_source = #{fSource}</if>
+            <if test="fRent != null  and fRent != ''">and f_rent = #{fRent}</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>
         </where>
     </select>
-    
+
     <select id="selectTCntrnoById" parameterType="Long" resultMap="TCntrnoResult">
         <include refid="selectTCntrnoVo"/>
         where f_id = #{fId}
     </select>
-        
+
     <insert id="insertTCntrno" parameterType="TCntrno">
         insert into t_cntrno
         <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -67,7 +67,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="fNo != null and fNo != ''">#{fNo},</if>
@@ -85,7 +85,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="updateTCntrno" parameterType="TCntrno">
@@ -115,10 +115,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </delete>
 
     <delete id="deleteTCntrnoByIds" parameterType="String">
-        delete from t_cntrno where f_id in 
+        delete from t_cntrno where f_id in
         <foreach item="fId" collection="array" open="(" separator="," close=")">
             #{fId}
         </foreach>
     </delete>
-    
+    <!--批量更新数据状态-->
+    <update id="updateTcntrnoStatus" parameterType="string">
+        update t_cntrno
+        set f_status = F
+        where f_id in
+        <foreach item="fId" collection="array" open="(" separator="," close=")">
+            #{fId}
+        </foreach>
+    </update>
+
 </mapper>