| 
					
				 | 
			
			
				@@ -1560,6 +1560,43 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <select id="selectfOriginalbillno" resultType="java.lang.String"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         select f_originalbillno from t_whgenleg where f_mblno = #{billNo} LIMIT 1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <select id="selectStockListCk" resultType="Map"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        select DISTINCT 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        t3.dict_label as cargoType, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        t2.f_no as cargoNo, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        t2.f_name as cargoName, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        t1.f_qtyD as number, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        t1.f_qtyblc as numberLeft, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        t1.f_grossweightD as weight, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        t1.f_grossweightblc as weightLeft, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        t6.f_packagespecs as speci, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        t6.f_sealno as bondedStatus, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        t4.f_no as shelvesName, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        t5.f_no as warehouseNo, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        t5.f_name as warehouseName, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        t1.f_originalbillno as takeVoucher, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        date_format(t1.f_bsdate, '%Y-%m-%d %H:%i:%S') as inStorageDate, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        t1.f_mblno as blNumber, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        date_format(t1.update_time, '%Y-%m-%d %H:%i:%S') as latestOptDate, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        t1.lock_status as lockStatus, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        t1.belong_to as belongTo, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        t1.lock_time as lockTime, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        t1.unlock_time as unlockTime, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        t1.wr_number as wrNumber 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        from t_whgenleg t1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        left join t_goods t2 on t2.f_id = t1.f_goodsid 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        left join sys_dict_data t3 on t3.dict_value = t2.f_typeid 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        left join t_warehouse t4 on t4.f_id = t1.f_warehouse_locationid 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        left join t_warehouse t5 on t5.f_id = t1.f_warehouseid 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        left join t_warehousebillsitems t6 on t6.f_billno = t1.f_originalbillno 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            t3.dict_type = 'data_goods_category' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="fMblno != null and fMblno != ''"> AND t1.f_mblno = #{fMblno}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            AND t3.status = 0 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="corpId != null "> AND t1.f_corpid = #{corpId}</if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    </select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <update id="changeBelongTo" parameterType="TWhgenleg"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         update t_whgenleg 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <trim prefix="SET" suffixOverrides=","> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1572,5 +1609,4 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </trim> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         where f_mblno = #{fOriginalbillno} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </update> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </mapper> 
			 |