Browse Source

凯和箱档案新增船名航次

sunhz 3 years ago
parent
commit
f9d31da2d3

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

@@ -162,6 +162,12 @@ public interface TCntrnoMapper
     public List<Map<String,Object>>homeBox();
 
     /**
+     * 首页获取箱分布
+     * @return
+     */
+    public List<Map<String,Object>>homeBoxCount();
+
+    /**
      * 凯和启用和退租功能
      * @param tCntrno
      * @return

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

@@ -838,7 +838,9 @@ public class TCntrnoServiceImpl implements ITCntrnoService {
 
     @Override
     public List<Map<String, Object>> homeBox() {
-        return tCntrnoMapper.homeBox();
+        List<Map<String, Object>> list = tCntrnoMapper.homeBox();
+        list.get(list.size() - 1).put("details", tCntrnoMapper.homeBoxCount());
+        return list;
     }
 
     @Override

+ 31 - 1
ruoyi-shipping/src/main/resources/mapper/shipping/TCntrnoMapper.xml

@@ -32,11 +32,13 @@
         <result property="fBoxWeight"    column="f_box_weight"    />
         <result property="onHireStart"    column="on_hire_start"    />
         <result property="onHireEnd"    column="on_hire_end"    />
+        <result property="fVsl" column="f_vsl"/>
+        <result property="fVoy" column="f_voy"/>
     </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,f_box_lord,f_pact_deal_horn,f_mblno,f_box_weight,on_hire_start,on_hire_end from t_cntrno
+               f_build_box_time,f_box_turtle_year,f_box_turtle_month,f_box_lord,f_pact_deal_horn,f_mblno,f_box_weight,on_hire_start,on_hire_end, f_vsl, f_voy from t_cntrno
     </sql>
 
     <select id="selectTCntrnoList" parameterType="TCntrno" resultMap="TCntrnoResult">
@@ -314,6 +316,8 @@
             <if test="fBoxWeight != null">f_box_weight,</if>
             <if test="onHireStart != null">on_hire_start,</if>
             <if test="onHireEnd != null">on_hire_end,</if>
+            <if test="fVsl != null">f_vsl,</if>
+            <if test="fVoy != null">f_voy,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="fId != null">#{fId},</if>
@@ -343,6 +347,8 @@
             <if test="fBoxWeight != null">#{fBoxWeight},</if>
             <if test="onHireStart != null">#{onHireStart},</if>
             <if test="onHireEnd != null">#{onHireEnd},</if>
+            <if test="fVsl != null">#{fVsl},</if>
+            <if test="fVoy != null">#{fVoy},</if>
         </trim>
     </insert>
 
@@ -375,6 +381,8 @@
             <if test="fBoxWeight != null">f_box_weight = #{fBoxWeight},</if>
             <if test="onHireStart != null">on_hire_start = #{onHireStart},</if>
             <if test="onHireEnd != null">on_hire_end = #{onHireEnd},</if>
+            <if test="fVsl != null">f_vsl = #{fVsl},</if>
+            <if test="fVoy != null">f_voy = #{fVoy},</if>
         </trim>
         where f_id = #{fId}
     </update>
@@ -408,6 +416,8 @@
             <if test="fBoxWeight != null">f_box_weight = #{fBoxWeight},</if>
             <if test="onHireStart != null">on_hire_start = #{onHireStart},</if>
             <if test="onHireEnd != null">on_hire_end = #{onHireEnd},</if>
+            <if test="fVsl != null">f_vsl = #{fVsl},</if>
+            <if test="fVoy != null">f_voy = #{fVoy},</if>
         </trim>
         where f_no = #{fNo}
     </update>
@@ -542,6 +552,8 @@
             <if test="updateBy != null">update_by,</if>
             <if test="updateTime != null">update_time,</if>
             <if test="remark != null">remark,</if>
+            <if test="fVsl != null">f_vsl,</if>
+            <if test="fVoy != null">f_voy,</if>
         </trim>
         <foreach collection="list" item="item" separator=",">
             <trim prefix="values (" suffix=")" suffixOverrides=",">
@@ -563,6 +575,8 @@
                 <if test="updateBy != null">#{updateBy},</if>
                 <if test="updateTime != null">#{updateTime},</if>
                 <if test="remark != null">#{remark},</if>
+                <if test="fVsl != null">#{fVsl},</if>
+                <if test="fVoy != null">#{fVoy},</if>
             </trim>
         </foreach>
     </insert>
@@ -686,6 +700,7 @@ FROM
 	f_updateaddress = #{fUpdateaddress}
 	AND remark IS NOT NULL
     </select>
+
     <select id="homeBox" resultType="map">
         SELECT
 	ta.f_name addressName,
@@ -708,6 +723,19 @@ WHERE
 	ta.f_name = '在船'
     AND tc.f_status != 'F'
     </select>
+
+    <select id="homeBoxCount" resultType="map">
+        SELECT tc.f_vsl,
+               tc.f_voy,
+               IFNULL(COUNT(1), 0) boxNumber
+        FROM t_cntrno tc LEFT JOIN t_address ta ON ta.f_id = tc.f_updateaddress
+        WHERE tc.f_status != 'F'
+            AND ta.f_name = '在船'
+            AND f_vsl IS NOT NULL
+            AND f_voy IS NOT NULL
+        GROUP BY f_voy, f_vsl
+    </select>
+
     <update id="updateHire" parameterType="TCntrno">
         update t_cntrno
         <trim prefix="SET" suffixOverrides=",">
@@ -737,6 +765,8 @@ WHERE
             <if test="fBoxWeight != null">f_box_weight = #{fBoxWeight},</if>
             <if test="onHireStart != null">on_hire_start = #{onHireStart},</if>
             <if test="onHireEnd != null">on_hire_end = #{onHireEnd},</if>
+            <if test="fVsl != null">f_vsl = #{fVsl},</if>
+            <if test="fVoy != null">f_voy = #{fVoy},</if>
         </trim>
         where f_id in
         <foreach item="fId" collection="cntrnoList" open="(" separator="," close=")">

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

@@ -6953,7 +6953,8 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
                         cntrno.setUpdateTime(date);
                         cntrno.setUpdateBy(loginUser.getUser().getUserName());
                         cntrno.setfUpdatetime(date);
-                        cntrno.setRemark(remark);
+                        cntrno.setfVsl(tCntrno.getfVsl());
+                        cntrno.setfVoy(tCntrno.getfVoy());
                         cntrno.setfUpdateaddress(aLong.toString());
                         cntrno.setfOpctnstatus(fOpCTnsTaTus);
                         cntrno.setfCntrstatus(warehousebillsCntr.getfCntrstatus());

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

@@ -397,7 +397,7 @@
             <if test="fBillingway != null ">and bill.f_billingway = #{fBillingway}</if>
             <if test="fSbu != null ">and bill.f_sbu = #{fSbu}</if>
             <if test="fFeetunit != null  and fFeetunit != ''">and bill.f_feetunit = #{fFeetunit}</if>
-            <if test="fMblno != null  and fMblno != ''">and item.f_mblno like concat('%', #{fMblno}, '%')</if>
+            <if test="fMblno != null  and fMblno != ''">and (bill.f_mblno like concat('%', #{fMblno}, '%') or item.f_mblno like concat('%', #{fMblno}, '%'))</if>
             <if test="fEmblno != null  and fEmblno != ''">and bill.f_emblno like concat('%', #{fEmblno}, '%')</if>
             <if test="fVslvoy != null  and fVslvoy != ''">and bill.f_vslvoy = #{fVslvoy}</if>
             <if test="fEta != null ">and bill.f_eta = #{fEta}</if>