代码更新
This commit is contained in:
@@ -1,10 +1,7 @@
|
||||
package org.nl.start;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.modules.wql.core.bean.WQLObject;
|
||||
import org.springframework.boot.ApplicationArguments;
|
||||
import org.springframework.boot.ApplicationRunner;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -18,23 +15,7 @@ import org.springframework.stereotype.Component;
|
||||
public class Init implements ApplicationRunner {
|
||||
@Override
|
||||
public void run(ApplicationArguments args) throws Exception {
|
||||
WQLObject point_tab = WQLObject.getWQLObject("sch_base_point");
|
||||
JSONArray arr = point_tab.query("region_code = 'CPQYA01'").getResultJSONArray(0);
|
||||
for (int i = 0; i < arr.size(); i++) {
|
||||
JSONObject json = arr.getJSONObject(i);
|
||||
json.put("in_order_seq",Integer.parseInt(json.getString("point_code").replace("-","")));
|
||||
json.put("in_empty_seq",Integer.parseInt(json.getString("point_code").replace("-","")));
|
||||
point_tab.update(json);
|
||||
|
||||
}
|
||||
System.out.println("项目启动成功!");
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
int i = Integer.parseInt("01-07-02".replace("-",""));
|
||||
System.out.println(i);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user