–1、將箱號作為棧板新建
declare
cursor CC is
select carton_id from WMS_STORE_CURRENT_detail where PALLET_ID='DV515AEL';
begin
for C1 in CC loop
insert into WMS_STORE_CURRENT_PALLET (PALLET_ID,PALLET_GROUP,WH,WH_TYPE,AREA,BIN,CREATE_TIME,length,WIDTH,HEIGHT,NET_WEIGHT,GROSS_WEIGHT,CONTAINER_NO) values (C1.carton_id,C1.carton_id,'HB_SG','SemiFinished','HB_TV','KR',TO_DATE('2018-11-22 07:24:50','YYYY-MM-DD HH24:MI:SS'),0,0,0,0,0,null);
end loop;
end;
–將箱號作為棧板新建
–2、將棧板update成箱號就OK
declare
cursor CC is
select carton_id from WMS_STORE_CURRENT_PALLET where PALLET_ID='DV515AEL';
begin
for C1 in CC loop
update WMS_STORE_CURRENT_DETAIL set pallet_id=C1.carton_id where carton_id=c1.carton_id and PALLET_ID='DV515AEL';
end loop;
end;