瀏覽代碼

凯和修改

lazhaoqian 4 年之前
父節點
當前提交
05fe684f6b

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

@@ -111,6 +111,13 @@ public class TCntrno extends BaseEntity
     @Excel(name = "箱龄(月)")
     @JsonFormat(pattern = "MM")
     private String fBoxTurtleMonth;
+    /** 箱公司 */
+    @Excel(name = "箱主(手填)")
+    private String fBoxLord;
+
+    /** 合同协议号 */
+    @Excel(name = "合同协议号")
+    private String fPactDealHorn;
 
     /** 最新地点 */
     private String fUpdateaddress;
@@ -150,6 +157,22 @@ public class TCntrno extends BaseEntity
     //调箱动作中文名
     private String opctnstatusName;
 
+    public String getfBoxLord() {
+        return fBoxLord;
+    }
+
+    public void setfBoxLord(String fBoxLord) {
+        this.fBoxLord = fBoxLord;
+    }
+
+    public String getfPactDealHorn() {
+        return fPactDealHorn;
+    }
+
+    public void setfPactDealHorn(String fPactDealHorn) {
+        this.fPactDealHorn = fPactDealHorn;
+    }
+
     public Date getfBuildBoxTime() {
         return fBuildBoxTime;
     }

+ 22 - 0
ruoyi-shipping/src/main/java/com/ruoyi/shipping/domain/TVoyage.java

@@ -97,6 +97,9 @@ public class TVoyage extends BaseEntity
     /** 默认 T ,正常T 停用F 下拉选择 */
     @Excel(name = "默认 T ,正常T 停用F 下拉选择")
     private String fStatus;
+    /** 航线 */
+    @Excel(name = "航线")
+    private Integer fLaneid;
     //查询时间区间
     private List<String> cLoadDate;
     //装货港名称
@@ -121,6 +124,24 @@ public class TVoyage extends BaseEntity
     private List<TVoyage> freight;
     //中转港是否为空
     private Long empty;
+    //航线名称
+    private String fLaneName;
+
+    public String getfLaneName() {
+        return fLaneName;
+    }
+
+    public void setfLaneName(String fLaneName) {
+        this.fLaneName = fLaneName;
+    }
+
+    public Integer getfLaneid() {
+        return fLaneid;
+    }
+
+    public void setfLaneid(Integer fLaneid) {
+        this.fLaneid = fLaneid;
+    }
 
     public Long getEmpty() {
         return empty;
@@ -415,6 +436,7 @@ public class TVoyage extends BaseEntity
             .append("updateBy", getUpdateBy())
             .append("updateTime", getUpdateTime())
             .append("remark", getRemark())
+            .append("fLaneid", getfLaneid())
             .toString();
     }
 }

+ 2 - 2
ruoyi-shipping/src/main/java/com/ruoyi/shipping/excel/TCntrnoExcel.java

@@ -22,8 +22,8 @@ public class TCntrnoExcel {
     private String fUpdateef;
     //箱状态
     private String fCntrstatus;
-    //箱主中文
-    @Excel(name = "箱主",readConverterExp = "如凯和")
+    //租赁中文
+    @Excel(name = "租赁公司",readConverterExp = "如凯和")
     private String ownerName;
     //箱类型中文
     @Excel(name = "箱类型",readConverterExp = "如20GP")

+ 1 - 0
ruoyi-shipping/src/main/java/com/ruoyi/shipping/service/impl/TCntrnoServiceImpl.java

@@ -155,6 +155,7 @@ public class TCntrnoServiceImpl implements ITCntrnoService {
                 tCntrtrackingMapper.insertTCntrtracking(setfield);
                 if (CollectionUtils.isNotEmpty(cntrno.getAccessoryList())) {
                     for (TConditionAccessory tConditionAccessory : cntrno.getAccessoryList()) {
+                        tConditionAccessory.setfOrgId(10L);
                         tConditionAccessory.setfPid(setfield.getfId());
                         tConditionAccessory.setCreateBy(SecurityUtils.getUsername());
                         tConditionAccessory.setCreateTime(DateUtils.getNowDate());

+ 5 - 4
ruoyi-shipping/src/main/java/com/ruoyi/shipping/service/impl/TVoyageServiceImpl.java

@@ -1,8 +1,7 @@
 package com.ruoyi.shipping.service.impl;
 
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
+import java.util.stream.Collectors;
 
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.ruoyi.common.constant.UserConstants;
@@ -57,7 +56,9 @@ public class TVoyageServiceImpl implements ITVoyageService
 
     @Override
     public List<TVoyage> freightList(TVoyage tVoyage) {
-        List<TVoyage> tVoyages = tVoyageMapper.selectTVoyageListNew(tVoyage);
+        List<TVoyage> tVoyages = new ArrayList<>();
+        tVoyages = tVoyageMapper.selectTVoyageListNew(tVoyage);
+        tVoyages = tVoyages.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(TVoyage -> TVoyage.getfPortofloadid() + ";"+ TVoyage.getfDistinationid()))), ArrayList::new));
         if (CollectionUtils.isNotEmpty(tVoyages)){
             for (TVoyage voyage : tVoyages) {
                 voyage.setTwenty(tCtnpriceItemsMapper.selectMoney(voyage.getfPortofloadid(), voyage.getfDistinationid(), "20GP"));

+ 4 - 3
ruoyi-shipping/src/main/resources/mapper/shipping/TAddressMapper.xml

@@ -450,8 +450,8 @@
     <!--查看航线名称-->
     <select id="selectAirLineName" parameterType="TAddress" resultType="map">
         SELECT
-        f_id as fId,
-        f_name as fName
+        t.f_id as fId,
+        t.f_name as fName
         FROM
         t_address t
         LEFT JOIN
@@ -459,7 +459,8 @@
         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>
+        <if test="fName != null  and fName != ''">and t.f_name like concat('%', #{fName}, '%')</if>
+        <if test="fId != null ">and t.f_id = #{fId}</if>
         ORDER BY CONVERT(t.f_name USING gbk) asc
     </select>
     <!--查看堆场名称-->

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

@@ -26,11 +26,13 @@
         <result property="fBuildBoxTime"    column="f_build_box_time"    />
         <result property="fBoxTurtleYear"    column="f_box_turtle_year"    />
         <result property="fBoxTurtleMonth"    column="f_box_turtle_month"    />
+        <result property="fBoxLord"    column="f_box_lord"    />
+        <result property="fPactDealHorn"    column="f_pact_deal_horn"    />
     </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, case when f_status = 'T' then '正常' else '停用' end as f_status,f_opctnstatus,f_sealno,create_by, create_time, update_by, update_time, remark,
-               f_build_box_time,f_box_turtle_year,f_box_turtle_month from t_cntrno
+               f_build_box_time,f_box_turtle_year,f_box_turtle_month,f_box_lord,f_pact_deal_horn from t_cntrno
     </sql>
 
     <select id="selectTCntrnoList" parameterType="TCntrno" resultMap="TCntrnoResult">
@@ -57,6 +59,8 @@
             <if test="fBuildBoxTime != null "> and f_build_box_time = #{fBuildBoxTime}</if>
             <if test="fBoxTurtleYear != null  and fBoxTurtleYear != ''"> and f_box_turtle_year = #{fBoxTurtleYear}</if>
             <if test="fBoxTurtleMonth != null  and fBoxTurtleMonth != ''"> and f_box_turtle_month = #{fBoxTurtleMonth}</if>
+            <if test="fBoxLord != null  and fBoxLord != ''"> and f_box_lord = #{fBoxLord}</if>
+            <if test="fPactDealHorn != null  and fPactDealHorn != ''"> and f_pact_deal_horn = #{fPactDealHorn}</if>
         </where>
     </select>
     <select id="selectTcntrnoMessage" parameterType="TCntrno" resultMap="TCntrnoResult">
@@ -89,7 +93,9 @@
         tc.remark,
         tc.f_build_box_time,
         tc.f_box_turtle_year,
-        tc.f_box_turtle_month
+        tc.f_box_turtle_month,
+        tc.f_box_lord,
+        tc.f_pact_deal_horn
         FROM
         t_cntrno tc
         LEFT JOIN sys_dict_data pro ON pro.dict_value = tc.f_owner
@@ -136,6 +142,8 @@
             <if test="tc.fBuildBoxTime != null "> and tc.f_build_box_time = #{fBuildBoxTime}</if>
             <if test="tc.fBoxTurtleYear != null  and tc.fBoxTurtleYear != ''"> and tc.f_box_turtle_year = #{fBoxTurtleYear}</if>
             <if test="tc.fBoxTurtleMonth != null  and tc.fBoxTurtleMonth != ''"> and tc.f_box_turtle_month = #{fBoxTurtleMonth}</if>
+            <if test="tc.fBoxLord != null  and tc.fBoxLord != ''"> and tc.f_box_lord = #{tc.fBoxLord}</if>
+            <if test="tc.fPactDealHorn != null  and tc.fPactDealHorn != ''"> and tc.f_pact_deal_horn = #{tc.fPactDealHorn}</if>
         </where>
         ORDER BY tc.f_no,CONVERT(tc.f_updateaddress USING gbk),CONVERT(t.f_no USING gbk),
         tc.f_updateEF,tc.f_cntrstatus,tc.f_owner
@@ -172,7 +180,9 @@
         tc.remark,
         tc.f_build_box_time,
         tc.f_box_turtle_year,
-        tc.f_box_turtle_month
+        tc.f_box_turtle_month,
+        tc.f_box_lord,
+        tc.f_pact_deal_horn
         FROM
         t_cntrno tc
         LEFT JOIN sys_dict_data pro ON pro.dict_value = tc.f_owner
@@ -216,6 +226,8 @@
             <if test="fBuildBoxTime != null">f_build_box_time,</if>
             <if test="fBoxTurtleYear != null">f_box_turtle_year,</if>
             <if test="fBoxTurtleMonth != null">f_box_turtle_month,</if>
+            <if test="fBoxLord != null">f_box_lord,</if>
+            <if test="fPactDealHorn != null">f_pact_deal_horn,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="fId != null">#{fId},</if>
@@ -239,6 +251,8 @@
             <if test="fBuildBoxTime != null">#{fBuildBoxTime},</if>
             <if test="fBoxTurtleYear != null">#{fBoxTurtleYear},</if>
             <if test="fBoxTurtleMonth != null">#{fBoxTurtleMonth},</if>
+            <if test="fBoxLord != null">#{fBoxLord},</if>
+            <if test="fPactDealHorn != null">#{fPactDealHorn},</if>
         </trim>
     </insert>
 
@@ -265,6 +279,8 @@
             <if test="fBuildBoxTime != null">f_build_box_time = #{fBuildBoxTime},</if>
             <if test="fBoxTurtleYear != null">f_box_turtle_year = #{fBoxTurtleYear},</if>
             <if test="fBoxTurtleMonth != null">f_box_turtle_month = #{fBoxTurtleMonth},</if>
+            <if test="fBoxLord != null">f_box_lord = #{fBoxLord},</if>
+            <if test="fPactDealHorn != null">f_pact_deal_horn = #{fPactDealHorn},</if>
         </trim>
         where f_id = #{fId}
     </update>

+ 20 - 5
ruoyi-shipping/src/main/resources/mapper/shipping/TVoyageMapper.xml

@@ -28,14 +28,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="updateBy"    column="update_by"    />
         <result property="updateTime"    column="update_time"    />
         <result property="remark"    column="remark"    />
+        <result property="fLaneid"    column="f_laneid"    />
     </resultMap>
 
     <sql id="selectTVoyageVo">
-        select f_id, f_pid, f_no, f_portofloadid, f_portofdischargeid, f_distinationid, f_portoftransshipment, f_ETD, f_ATD, f_ETA, f_ATA, f_days, f_ducomentrayoffdate, f_cutoffdate, f_teu, f_manageid, f_tel, case when f_status = 'T' then '正常' else '停用' end as f_status, create_by, create_time, update_by, update_time, remark from t_voyage
+        select f_id, f_pid, f_no, f_portofloadid, f_portofdischargeid, f_distinationid, f_portoftransshipment, f_ETD, f_ATD, f_ETA, f_ATA, f_days, f_ducomentrayoffdate, f_cutoffdate, f_teu, f_manageid, f_tel, case when f_status = 'T' then '正常' else '停用' end as f_status, create_by, create_time, update_by, update_time, remark,f_laneid from t_voyage
     </sql>
 
     <select id="selectTVoyageList" parameterType="TVoyage" resultMap="TVoyageResult">
         SELECT
+        DISTINCT
         tv.f_id,
         tv.f_pid,
         te.f_name pidName,
@@ -69,7 +71,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         tv.create_time,
         tv.update_by,
         tv.update_time,
-        tv.remark
+        tv.remark,
+        tv.f_laneid,
+        tes.f_name as fLaneName
         FROM
         t_voyage tv
         LEFT JOIN t_vessel te ON tv.f_pid = te.f_id
@@ -78,6 +82,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         LEFT JOIN t_address tr ON tv.f_distinationid = tr.f_id
         LEFT JOIN t_address ts ON tv.f_portoftransshipment = ts.f_id
         LEFT JOIN sys_user  su ON tv.f_manageid = su.user_id
+        LEFT JOIN t_address tes ON tv.f_laneid = tes.f_id
         <where>
             tv.f_status = 'T'
             <if test="fPid != null "> and tv.f_pid = #{fPid}</if>
@@ -111,6 +116,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test='cLoadDate != null and cLoadDate[1] != null and cLoadDate[1]!= ""'>
                 and tv.create_time &lt;= #{cLoadDate[1]}
             </if>
+            <if test="fLaneid != null "> and f_laneid = #{fLaneid}</if>
         </where>
     </select>
     <select id="selectMessage" parameterType="TVoyage" resultMap="TVoyageResult">
@@ -148,7 +154,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         tv.create_time,
         tv.update_by,
         tv.update_time,
-        tv.remark
+        tv.remark,
+        tv.f_laneid
         FROM
         t_voyage tv
         LEFT JOIN t_vessel te ON tv.f_pid = te.f_id
@@ -161,6 +168,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             tv.f_status = 'T'
             AND (date(tv.f_ATD) >= DATE_SUB(CURDATE(), INTERVAL 2 DAY)
             OR tv.f_ATD IS NULL)
+            <if test="fId != null "> and tv.f_id = #{fId}</if>
             <if test="fPid != null "> and tv.f_pid = #{fPid}</if>
             <if test="fNo != null  and fNo != ''"> and tv.f_no = #{fNo}</if>
             <if test="fPortofloadid != null "> and tv.f_portofloadid = #{fPortofloadid}</if>
@@ -192,6 +200,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test='cLoadDate != null and cLoadDate[1] != null and cLoadDate[1]!= ""'>
                 and tv.create_time &lt;= #{cLoadDate[1]}
             </if>
+            <if test="fLaneid != null "> and f_laneid = #{fLaneid}</if>
         </where>
     </select>
     <select id="selectTVoyageListNew" parameterType="TVoyage" resultMap="TVoyageResult">
@@ -229,7 +238,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         tv.create_time,
         tv.update_by,
         tv.update_time,
-        tv.remark
+        tv.remark,
+        tv.f_laneid
         FROM
         t_voyage tv
         LEFT JOIN t_vessel te ON tv.f_pid = te.f_id
@@ -273,6 +283,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test='cLoadDate != null and cLoadDate[1] != null and cLoadDate[1]!= ""'>
                 and tv.create_time &lt;= #{cLoadDate[1]}
             </if>
+            <if test="fLaneid != null "> and f_laneid = #{fLaneid}</if>
         </where>
     </select>
 
@@ -314,7 +325,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             tv.create_time,
             tv.update_by,
             tv.update_time,
-            tv.remark
+            tv.remark,
+            tv.f_laneid
         FROM
             t_voyage tv
                 LEFT JOIN t_vessel te ON tv.f_pid = te.f_id
@@ -352,6 +364,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>
+            <if test="fLaneid != null">f_laneid,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="fPid != null">#{fPid},</if>
@@ -376,6 +389,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>
+            <if test="fLaneid != null">#{fLaneid},</if>
          </trim>
     </insert>
 
@@ -406,6 +420,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updateBy != null">update_by = #{updateBy},</if>
             <if test="updateTime != null">update_time = #{updateTime},</if>
             <if test="remark != null">remark = #{remark},</if>
+            <if test="fLaneid != null">f_laneid = #{fLaneid},</if>
         </trim>
         where f_id = #{fId}
     </update>

+ 2 - 2
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/impl/TWarehouseBillsServiceImpl.java

@@ -5054,7 +5054,7 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
         sheet.setColumnWidth(4,256*15);
         sheet.setColumnWidth(5,256*15);
         sheet.setColumnWidth(6,256*15);
-        sheet.setColumnWidth(7,256*15);
+        sheet.setColumnWidth(7,256*35);
         sheet.setColumnWidth(8,256*15);
         sheet.setColumnWidth(9,256*15);
         sheet.setColumnWidth(10,256*15);
@@ -5138,7 +5138,7 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
                     cellValue = list.get(i).getfCntrweight().toString();
                 }else if(j ==7){
                     //箱公司
-                    cellValue = list.get(i).getfSealno();
+                        cellValue = list.get(i).getBoxCompany();
                 }else if(j == 8){
                     //始发港
                     cellValue = list.get(i).getPortOfDeparture();

+ 5 - 1
ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWarehousebillsMapper.xml

@@ -2476,7 +2476,11 @@
                     substring(tr.f_no,1,2) AS measure, /*尺寸*/
                     substring(tr.f_no,3,2) AS genre, /*类型*/
                     twc.f_cntrweight AS fCntrweight, /*重量*/
-                    pro.dict_label AS boxCompany, /*箱公司*/
+                    CASE
+                        WHEN tcr.f_soc = '0' THEN tc.f_name
+                        WHEN tcr.f_soc = '1' THEN '凯和志诚'
+                    END AS boxCompany,/*箱公司最新*/
+                    pro.dict_label AS boxCompanyOld, /*箱公司旧*/
                     td.f_name AS portOfDeparture, /*始发港*/
                     ts.f_name AS destinationPort, /*目的港*/
                     tg.f_name AS goodName, /*货名*/