go update kwjbxx set 双伸位都有货=0,hdh=1, wckw = CASE WHEN (0+pai)=1 THEN '02' END + lie + CASE WHEN ceng=1 THEN '01' WHEN ceng=2 THEN '02' WHEN ceng=3 THEN '03' WHEN ceng=4 THEN '04' WHEN ceng=5 THEN '05' WHEN ceng=6 THEN '06' END where xnkw = 0 and pai =1; -- 设定外侧库位 update kwjbxx set 双伸位都有货=0,hdh=1, nckw = CASE WHEN (0+pai)=2 THEN '01' END + lie + CASE WHEN ceng=1 THEN '01' WHEN ceng=2 THEN '02' WHEN ceng=3 THEN '03' WHEN ceng=4 THEN '04' WHEN ceng=5 THEN '05' WHEN ceng=6 THEN '06' END where xnkw = 0 and pai =2; -- 设定内侧库位 --如果转弯需要安排库位的顺序为堆垛机所在乡道1-4排安排后在安排5-8 --update kwjbxx set storeDist = 1718000 * 4 + storeDist where xnkw = 0 and pai IN('05','06', '07', '08'); --update kwjbxx set storeDist = 1718000 * 4 + storeDist where xnkw = 0 and pai IN('13','14', '15', '16'); -- update kwjbxx set storeDist = 1718000 * 4 + storeDist where xnkw = 0 and pai IN('21','22', '23', '24'); -- update kwjbxx set storeDist = 1718000 * 4 + storeDist where xnkw = 0 and pai IN('29','30', '31', '32');