作者 王智

baoxiu

@@ -242,27 +242,8 @@ class Index extends Api @@ -242,27 +242,8 @@ class Index extends Api
242 if (empty($arr[3])) { 242 if (empty($arr[3])) {
243 $num = '001'; 243 $num = '001';
244 } else { 244 } else {
245 - if (strstr($arr[3], '00') && $arr[3] < 100) {  
246 - $str = substr($arr[3], 2);  
247 - if ($str == 9) {  
248 - $num = '0' . '10';  
249 - } else {  
250 - $str2 = $str + 1;  
251 - $num = '00' . $str2;  
252 - }  
253 - }  
254 - if (strstr($arr[3], '0')) {  
255 - $str = substr($arr[3], 1);  
256 - if ($str == 99) {  
257 - $num = '100';  
258 - } else {  
259 - $str2 = $str + 1;  
260 - $num = '0' . $str2;  
261 - }  
262 - }  
263 - if (strlen($arr[3] > 2)) {  
264 - $num = $arr[3] + 1;  
265 - } 245 + $str = $arr[3] + 1;
  246 + $num = str_pad($str, 3, '0', STR_PAD_LEFT);
266 } 247 }
267 $up_time = substr($param['up_time'], 0, 10); 248 $up_time = substr($param['up_time'], 0, 10);
268 $data = [ 249 $data = [