代码更新
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
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;
|
||||
@@ -19,4 +22,32 @@ public class Init implements ApplicationRunner {
|
||||
System.out.println("项目启动成功!");
|
||||
}
|
||||
|
||||
private void initPoint() {
|
||||
WQLObject pointTab = WQLObject.getWQLObject("sch_base_point");
|
||||
JSONArray arr = WQLObject.getWQLObject("sch_base_point").query("block_num>0").getResultJSONArray(0);
|
||||
for (int i = 0; i < arr.size(); i++) {
|
||||
JSONObject json = arr.getJSONObject(i);
|
||||
Integer block_num = json.getInteger("block_num");
|
||||
Integer col_num = json.getInteger("col_num");
|
||||
|
||||
String col_numS = "0" + col_num;
|
||||
if (col_num > 9) {
|
||||
col_numS = String.valueOf(col_num);
|
||||
}
|
||||
|
||||
Integer row_num = json.getInteger("row_num");
|
||||
String row_numS = "0" + row_num;
|
||||
if (row_num > 9) {
|
||||
row_numS = String.valueOf(row_num);
|
||||
}
|
||||
|
||||
|
||||
String point_code = 2+""+block_num + col_numS+"-" + row_numS +"-"+ "01";
|
||||
String point_name = col_num + "排" + row_num + "列1层";
|
||||
json.put("point_code", point_code);
|
||||
json.put("point_name", point_name);
|
||||
pointTab.update(json);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ public class AutoCreateTask {
|
||||
taskList.forEach(item -> {
|
||||
JSONObject taskObj = new JSONObject();
|
||||
taskObj.put("task_id", item.getTask_id());
|
||||
taskObj.put("task_status", TaskStatusEnum.ISSUE.getCode());
|
||||
// taskObj.put("task_status", TaskStatusEnum.ISSUE.getCode());
|
||||
taskObj.put("remark", "下发失败:" + message);
|
||||
taskObj.put("update_time", DateUtil.now());
|
||||
taskTab.update(taskObj);
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user