| 
					
				 | 
			
			
				@@ -115,6 +115,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <result property="fSubmitUpdate"    column="f_submit_update"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <result property="fDeleteStatus"    column="f_delete_status"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <result property="fRemarksFees"    column="f_remarks_fees"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <result property="fCargoPlanning"    column="f_cargo_planning"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </resultMap> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <sql id="selectTWarehousebillsVo"> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -127,7 +128,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         f_consigneeattn, f_consigneetel, f_insurance, f_insuranceamt, f_closedate, f_docmentdate, f_vslid, f_voyid, f_typeid, f_paymode, f_laneid, f_cntval, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         free_container_date, f_business_attribution, f_supervision_unit, f_declaration_elements, f_part_number, f_ifinspection, f_value, f_weighing_date, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         f_ifsampling, send_sample_date, f_ifweight_recovery, weight_recovery_date, warehouse_status, f_times ,f_date_changed, f_chargetype,f_weigh_weight, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-               f_predict_branch,f_grade,f_delivery_details,f_salesman_id,f_itemstatus,f_updete_status, f_submit_update, f_delete_status,f_remarks_fees from t_warehousebills 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+               f_predict_branch,f_grade,f_delivery_details,f_salesman_id,f_itemstatus,f_updete_status, f_submit_update, f_delete_status,f_remarks_fees,f_cargo_planning from t_warehousebills 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </sql> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <select id="selectTWarehousebillsList" parameterType="TWarehousebills" resultMap="TWarehousebillsResult"> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -385,7 +386,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="fNewTrademodeid != null ">and bill.f_new_trademodeid = #{fNewTrademodeid}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         ${params.dataScope} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        ORDER BY bill.f_billstatus , bill.f_bsdate DESC 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        ORDER BY bill.f_bsdate DESC, bill.f_bstime DESC,bill.f_id DESC,bill.f_billstatus 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <select id="selectWarehouseBusinessList1" parameterType="TWarehousebills" resultType="Map"> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -537,7 +538,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="fNewTrademodeid != null ">and bill.f_new_trademodeid = #{fNewTrademodeid}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         ${params.dataScope} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        ORDER BY bill.f_billstatus , bill.f_bsdate DESC 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        ORDER BY bill.f_bsdate DESC, bill.f_bstime DESC,bill.f_id DESC,bill.f_billstatus 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <select id="selectTWarehousebillsById" parameterType="Long" resultMap="TWarehousebillsResult"> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -891,6 +892,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="fSubmitUpdate != null">f_submit_update,</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="fDeleteStatus != null">f_delete_status,</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="fRemarksFees != null">f_remarks_fees,</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="fCargoPlanning != null">f_cargo_planning,</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </trim> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <trim prefix="values (" suffix=")" suffixOverrides=","> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="fBillno != null">#{fBillno},</if> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1002,6 +1004,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="fSubmitUpdate != null">#{fSubmitUpdate},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="fDeleteStatus != null">#{fDeleteStatus},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="fRemarksFees != null">#{fRemarksFees},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="fCargoPlanning != null">#{fCargoPlanning},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </trim> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </insert> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1117,6 +1120,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="fSubmitUpdate != null">f_submit_update = #{fSubmitUpdate},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="fDeleteStatus != null">f_delete_status = #{fDeleteStatus},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="fRemarksFees != null">f_remarks_fees = #{fRemarksFees},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="fCargoPlanning != null">f_cargo_planning = #{fCargoPlanning},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </trim> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         where f_id = #{fId} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </update> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1234,6 +1238,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="fSubmitUpdate != null">f_submit_update = #{fSubmitUpdate},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="fDeleteStatus != null">f_delete_status = #{fDeleteStatus},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="fRemarksFees != null">f_remarks_fees = #{fRemarksFees},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="fCargoPlanning != null">f_cargo_planning = #{fCargoPlanning},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </trim> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         where f_id = #{fId} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </update> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1502,7 +1507,8 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             tr.f_name laneidName, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             tw.f_updete_status, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             tw.f_submit_update, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            tw.f_delete_status 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            tw.f_delete_status, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            tw.f_cargo_planning 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         FROM t_warehousebills tw 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             LEFT JOIN t_address address ON address.f_id = tw.f_loadportid 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             LEFT JOIN t_address ta ON ta.f_id = tw.f_loadportid 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1709,7 +1715,8 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         END AS moneyStatus, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         tw.f_updete_status fUpdeteStatus, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         tw.f_submit_update fSubmitUpdate, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        tw.f_delete_status fDeleteStatus 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        tw.f_delete_status fDeleteStatus, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        tw.f_cargo_planning fCargoPlanning 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         FROM 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         t_warehousebills tw 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         LEFT JOIN t_address ta ON ta.f_id = tw.f_laneid 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1958,7 +1965,8 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         tw.f_updete_status fUpdeteStatus, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         tw.f_submit_update fSubmitUpdate, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         tw.f_delete_status fDeleteStatus, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        ROUND(IFNULL(tf.fAmount,0),2) fAmount 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        ROUND(IFNULL(tf.fAmount,0),2) fAmount, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        tw.f_cargo_planning fCargoPlanning 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         FROM 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         t_warehousebills tw 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         LEFT JOIN t_address ta ON ta.f_id = tw.f_laneid 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -2215,7 +2223,8 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                tr.f_name      laneidName, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                tw.f_updete_status, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                tw.f_submit_update, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-               tw.f_delete_status 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+               tw.f_delete_status, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+               tw.f_cargo_planning 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         FROM t_warehousebills tw 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                  LEFT JOIN t_address address ON address.f_id = tw.f_loadportid 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                  LEFT JOIN t_address ta ON ta.f_id = tw.f_loadportid 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -2476,7 +2485,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, /*货名*/ 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -2539,5 +2552,45 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             #{fId} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </foreach> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </update> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <!--凯和单航次配船--> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <select id="singleVoyageByShip" parameterType="TWarehousebills" resultType="com.ruoyi.shipping.excel.singleVoyageByShipExcel"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+       SELECT 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        tv.f_name vslName, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        ty.f_no voyNo, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				ty.f_ATD fAtd, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				ty.f_ATA fAta, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+				ta.f_name fName, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        tre.f_name loadportName, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        ts.f_name  destportName 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        FROM 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        t_warehousebills tw 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        LEFT JOIN t_address ta ON ta.f_id = tw.f_laneid 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        LEFT JOIN t_address tre ON tre.f_id = tw.f_loadportid 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        LEFT JOIN t_address ts ON ts.f_id = tw.f_destportid 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        LEFT JOIN sys_dict_data sd ON sd.dict_value = tw.f_serviceitems 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        AND sd.dict_type = 'f_serviceitems' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        LEFT JOIN t_vessel tv ON tw.f_vslid = tv.f_id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        LEFT JOIN t_voyage ty ON tw.f_voyid = ty.f_id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        LEFT JOIN t_corps tp ON tw.f_corpid = tp.f_id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        LEFT JOIN ( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        SELECT 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        th.f_pid, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        th.f_cntrcount, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        tr.f_no, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        th.f_cntrid, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        tg.f_name 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        FROM 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        t_warehousebills_cntr th 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        LEFT JOIN t_cntr tr ON th.f_cntrid = tr.f_id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        LEFT JOIN t_goods tg ON th.f_goodsid = tg.f_id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        ) tc ON tc.f_pid = tw.f_id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        LEFT JOIN (SELECT f_pid,f_billstatus FROM t_warehousebillsfees GROUP BY f_pid,f_billstatus)tf ON tf.f_pid = tw.f_id 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        where 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            tw.f_typeid = '1' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            and tw.del_flag = '0' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <if test="fVslid != null ">and tw.f_vslid = #{fVslid}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <if test="fVoyid != null ">and tw.f_voyid = #{fVoyid}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    </select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </mapper> 
			 |