| 
					
				 | 
			
			
				@@ -117,6 +117,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <result property="fRemarksFees"    column="f_remarks_fees"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <result property="fCargoPlanning"    column="f_cargo_planning"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <result property="fArrivalStatus"    column="f_arrival_status"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <result property="fDismountStatus"    column="f_dismount_status"    /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </resultMap> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <sql id="selectTWarehousebillsVo"> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -129,7 +130,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,f_cargo_planning,f_arrival_status 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,f_arrival_status,f_dismount_status from t_warehousebills 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </sql> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <select id="selectTWarehousebillsList" parameterType="TWarehousebills" resultMap="TWarehousebillsResult"> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -907,6 +908,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="fRemarksFees != null">f_remarks_fees,</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="fCargoPlanning != null">f_cargo_planning,</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="fArrivalStatus != null">f_arrival_status,</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="fDismountStatus != null">f_dismount_status,</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </trim> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <trim prefix="values (" suffix=")" suffixOverrides=","> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="fBillno != null">#{fBillno},</if> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1020,6 +1022,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="fRemarksFees != null">#{fRemarksFees},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="fCargoPlanning != null">#{fCargoPlanning},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="fArrivalStatus != null">#{fArrivalStatus},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="fDismountStatus != null">#{fDismountStatus},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </trim> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </insert> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1137,6 +1140,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="fRemarksFees != null">f_remarks_fees = #{fRemarksFees},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="fCargoPlanning != null">f_cargo_planning = #{fCargoPlanning},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="fArrivalStatus != null">f_arrival_status = #{fArrivalStatus},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="fDismountStatus != null">f_dismount_status = #{fDismountStatus},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </trim> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         where f_id = #{fId} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </update> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1256,6 +1260,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="fRemarksFees != null">f_remarks_fees = #{fRemarksFees},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="fCargoPlanning != null">f_cargo_planning = #{fCargoPlanning},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="fArrivalStatus != null">f_arrival_status = #{fArrivalStatus},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="fDismountStatus != null">f_dismount_status = #{fDismountStatus},</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </trim> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         where f_id = #{fId} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </update> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1526,7 +1531,8 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             tw.f_submit_update, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             tw.f_delete_status, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             tw.f_cargo_planning, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            tw.f_arrival_status 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            tw.f_arrival_status, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            tw.f_dismount_status 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         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 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1651,6 +1657,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         DISTINCT 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         tw.f_id fId, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         tw.f_billno fBillno, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        tw.f_originalbillno fOriginalbillno, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         tw.f_mblno fMblno, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         sd.dict_label fServiceitems, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         tw.f_consigneername fConsigneername, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1670,54 +1677,62 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         ts.f_name  destportName, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         tc.f_name goodsName, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         CASE 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        WHEN tw.f_billstatus = '1' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHEN tw.f_billstatus = '1' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' and tw.f_dismount_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         '下单新建' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        WHEN tw.f_billstatus = '2' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHEN tw.f_billstatus = '2' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' and tw.f_dismount_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         '下单暂存' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        WHEN tw.f_billstatus = '3' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHEN tw.f_billstatus = '3' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' and tw.f_dismount_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         '下单驳回' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        WHEN tw.f_billstatus = '4' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHEN tw.f_billstatus = '4' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' and tw.f_dismount_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         '下单提交' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        WHEN tw.f_billstatus = '5' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHEN tw.f_billstatus = '5' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' and tw.f_dismount_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         '下单审批中' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        WHEN tw.f_billstatus = '6' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHEN tw.f_billstatus = '6' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' and tw.f_dismount_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         '下单审批通过' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        WHEN tw.f_billstatus = '7' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHEN tw.f_billstatus = '7' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' and tw.f_dismount_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         '配船暂存' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        WHEN tw.f_billstatus = '8' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHEN tw.f_billstatus = '8' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' and tw.f_dismount_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         '配船驳回' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        WHEN tw.f_billstatus = '9' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHEN tw.f_billstatus = '9' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' and tw.f_dismount_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         '配船提交' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        WHEN tw.f_billstatus = '10' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHEN tw.f_billstatus = '10' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' and tw.f_dismount_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         '配船审批中' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        WHEN tw.f_billstatus = '11' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHEN tw.f_billstatus = '11' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' and tw.f_dismount_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         '配船审批通过' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        WHEN tw.f_billstatus = '12' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHEN tw.f_billstatus = '12' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' and tw.f_dismount_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         '运单变更' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        WHEN  tw.f_updete_status = '3'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHEN  tw.f_updete_status = '3'and tw.f_submit_update = '2' and tw.f_delete_status = '2' and tw.f_dismount_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         '申请变更驳回' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        WHEN  tw.f_updete_status = '4'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHEN  tw.f_updete_status = '4'and tw.f_submit_update = '2' and tw.f_delete_status = '2' and tw.f_dismount_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         '申请变更提交' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        WHEN  tw.f_updete_status = '5'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHEN  tw.f_updete_status = '5'and tw.f_submit_update = '2' and tw.f_delete_status = '2' and tw.f_dismount_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         '申请变更审批中' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        WHEN  tw.f_updete_status = '6'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHEN  tw.f_updete_status = '6'and tw.f_submit_update = '2' and tw.f_delete_status = '2' and tw.f_dismount_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         '申请变更通过' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        WHEN  tw.f_submit_update = '3' and tw.f_delete_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHEN  tw.f_submit_update = '3' and tw.f_delete_status = '2' and tw.f_dismount_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         '提交变更驳回' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        WHEN  tw.f_submit_update = '4' and tw.f_delete_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHEN  tw.f_submit_update = '4' and tw.f_delete_status = '2' and tw.f_dismount_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         '提交变更审批' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        WHEN  tw.f_submit_update = '5' and tw.f_delete_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHEN  tw.f_submit_update = '5' and tw.f_delete_status = '2' and tw.f_dismount_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         '提交变更审批中' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        WHEN  tw.f_submit_update = '6' and tw.f_delete_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHEN  tw.f_submit_update = '6' and tw.f_delete_status = '2' and tw.f_dismount_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         '提交变更通过' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        WHEN  tw.f_delete_status = '3' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHEN  tw.f_delete_status = '3' and tw.f_dismount_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         '申请删单驳回' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        WHEN  tw.f_delete_status = '4' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHEN  tw.f_delete_status = '4' and tw.f_dismount_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         '申请删单提交' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        WHEN  tw.f_delete_status = '5' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHEN  tw.f_delete_status = '5' and tw.f_dismount_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         '申请删单审批中' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        WHEN  tw.f_delete_status = '6' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHEN  tw.f_delete_status = '6' and tw.f_dismount_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         '申请删单通过' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHEN  tw.f_dismount_status = '3' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        '拆单审批驳回' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHEN  tw.f_dismount_status = '4' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        '拆单审批提交' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHEN  tw.f_dismount_status = '5' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        '拆单审批中' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHEN  tw.f_dismount_status = '6' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        '拆单审批通过' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         END AS fBillstatus, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         CASE 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         WHEN tf.f_billstatus = '1' THEN 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1912,6 +1927,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         SELECT 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         tw.f_id fId, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         tw.f_billno fBillno, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        tw.f_originalbillno fOriginalbillno, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         tw.f_mblno fMblno, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         sd.dict_label fServiceitems, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         tw.f_consigneername fConsigneername, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1933,54 +1949,62 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         tw.f_billstatus fBillstatus, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         CASE 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        WHEN tw.f_billstatus = '1' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHEN tw.f_billstatus = '1' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' and tw.f_dismount_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         '下单新建' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        WHEN tw.f_billstatus = '2' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHEN tw.f_billstatus = '2' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' and tw.f_dismount_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         '下单暂存' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        WHEN tw.f_billstatus = '3' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHEN tw.f_billstatus = '3' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' and tw.f_dismount_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         '下单驳回' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        WHEN tw.f_billstatus = '4' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHEN tw.f_billstatus = '4' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' and tw.f_dismount_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         '下单提交' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        WHEN tw.f_billstatus = '5' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHEN tw.f_billstatus = '5' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' and tw.f_dismount_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         '下单审批中' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        WHEN tw.f_billstatus = '6' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHEN tw.f_billstatus = '6' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' and tw.f_dismount_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         '下单审批通过' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        WHEN tw.f_billstatus = '7' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHEN tw.f_billstatus = '7' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' and tw.f_dismount_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         '配船暂存' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        WHEN tw.f_billstatus = '8' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHEN tw.f_billstatus = '8' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' and tw.f_dismount_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         '配船驳回' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        WHEN tw.f_billstatus = '9' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHEN tw.f_billstatus = '9' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' and tw.f_dismount_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         '配船提交' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        WHEN tw.f_billstatus = '10' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHEN tw.f_billstatus = '10' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' and tw.f_dismount_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         '配船审批中' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        WHEN tw.f_billstatus = '11' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHEN tw.f_billstatus = '11' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' and tw.f_dismount_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         '配船审批通过' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        WHEN tw.f_billstatus = '12' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHEN tw.f_billstatus = '12' and tw.f_updete_status = '2'and tw.f_submit_update = '2' and tw.f_delete_status = '2' and tw.f_dismount_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         '运单变更' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        WHEN  tw.f_updete_status = '3'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHEN  tw.f_updete_status = '3'and tw.f_submit_update = '2' and tw.f_delete_status = '2' and tw.f_dismount_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         '申请变更驳回' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        WHEN  tw.f_updete_status = '4'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHEN  tw.f_updete_status = '4'and tw.f_submit_update = '2' and tw.f_delete_status = '2' and tw.f_dismount_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         '申请变更提交' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        WHEN  tw.f_updete_status = '5'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHEN  tw.f_updete_status = '5'and tw.f_submit_update = '2' and tw.f_delete_status = '2' and tw.f_dismount_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         '申请变更审批中' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        WHEN  tw.f_updete_status = '6'and tw.f_submit_update = '2' and tw.f_delete_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHEN  tw.f_updete_status = '6'and tw.f_submit_update = '2' and tw.f_delete_status = '2' and tw.f_dismount_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         '申请变更通过' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        WHEN  tw.f_submit_update = '3' and tw.f_delete_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHEN  tw.f_submit_update = '3' and tw.f_delete_status = '2' and tw.f_dismount_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         '提交变更驳回' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        WHEN  tw.f_submit_update = '4' and tw.f_delete_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHEN  tw.f_submit_update = '4' and tw.f_delete_status = '2' and tw.f_dismount_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         '提交变更审批' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        WHEN  tw.f_submit_update = '5' and tw.f_delete_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHEN  tw.f_submit_update = '5' and tw.f_delete_status = '2' and tw.f_dismount_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         '提交变更审批中' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        WHEN  tw.f_submit_update = '6' and tw.f_delete_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHEN  tw.f_submit_update = '6' and tw.f_delete_status = '2' and tw.f_dismount_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         '提交变更通过' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        WHEN  tw.f_delete_status = '3' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHEN  tw.f_delete_status = '3' and tw.f_dismount_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         '申请删单驳回' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        WHEN  tw.f_delete_status = '4' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHEN  tw.f_delete_status = '4' and tw.f_dismount_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         '申请删单提交' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        WHEN  tw.f_delete_status = '5' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHEN  tw.f_delete_status = '5' and tw.f_dismount_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         '申请删单审批中' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        WHEN  tw.f_delete_status = '6' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHEN  tw.f_delete_status = '6' and tw.f_dismount_status = '2' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         '申请删单通过' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHEN  tw.f_dismount_status = '3' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        '拆单审批驳回' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHEN  tw.f_dismount_status = '4' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        '拆单审批提交' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHEN  tw.f_dismount_status = '5' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        '拆单审批中' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        WHEN  tw.f_dismount_status = '6' THEN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        '拆单审批通过' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         END AS fBillstatusName, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         CASE 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         WHEN tf.f_billstatus = '1' THEN 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -2262,7 +2286,8 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                tw.f_submit_update, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                tw.f_delete_status, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                tw.f_cargo_planning, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-               tw.f_arrival_status 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+               tw.f_arrival_status, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+               tw.f_dismount_status 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         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 
			 |