23 lines
		
	
	
		
			989 B
		
	
	
	
		
			SQL
		
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			989 B
		
	
	
	
		
			SQL
		
	
	
alter table  TMS_ROUTE_FEE  add TRANSPORTATIONAGING8  float;
 | 
						|
update TMS_ROUTE_FEE set TRANSPORTATIONAGING8=0 where TRANSPORTATIONAGING8 is null;
 | 
						|
alter table  TMS_TRANS_LOCATION  add Brand  VARCHAR2(50);
 | 
						|
 | 
						|
alter table  BMS_CONTRACT_RATE  add (ZONE_ID  NUMBER(19));
 | 
						|
alter table BMS_CONTRACT_RATE
 | 
						|
 	 add constraint FK351215568D25E36D foreign key (ZONE_ID)
 | 
						|
 	 references TMS_ZONE (ID);
 | 
						|
 	 
 | 
						|
create or replace view lf_item_view as
 | 
						|
select oh.relatebill3,oh.id oh_id ,od.id id,it.l length,it.w width,it.h height,od.quantity,oh.group_index,
 | 
						|
nvl(t.s5,0) price1,nvl(t.s8,0) price2,
 | 
						|
nvl(t.s6,0) shf
 | 
						|
 | 
						|
   from DJ_item_T it
 | 
						|
  left join TMS_ORDER_DETAIL od on od.materiel_code=it.s2
 | 
						|
  left join TMS_ORDER_HEAD oh on oh.id=od.order_id
 | 
						|
  left join DJ_xf_PRICE  t on t.s9=oh.from_city_countiy_id and t.s11=oh.to_city_countiy_id
 | 
						|
  left join wms_package_unit pu on pu.item_id=od.item_id
 | 
						|
 -- where it.s2='CB1Y952167'
 | 
						|
 --where it.s2 in  ('DP30014045','DP30024550','DP300342','DP30044550A')
 | 
						|
  order by oh.id desc
 | 
						|
; |