初始化项目
This commit is contained in:
@@ -3,7 +3,7 @@ package org.nl;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.nl.wql.WQLCore;
|
||||
import org.nl.modules.wql.WQLCore;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
|
||||
@@ -9,10 +9,11 @@ import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.junit.Test;
|
||||
import org.nl.exception.BadRequestException;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.modules.system.util.CodeUtil;
|
||||
import org.nl.wql.WQL;
|
||||
import org.nl.wql.core.bean.WQLObject;
|
||||
import org.nl.modules.wql.WQL;
|
||||
import org.nl.modules.wql.core.bean.WQLObject;
|
||||
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Calendar;
|
||||
@@ -130,7 +131,7 @@ public class Test3 extends BaseTest {
|
||||
public void syncStruct() {
|
||||
JSONArray structArray = WQLObject.getWQLObject("st_ivt_structattr").query("is_delete='0'").getResultJSONArray(0);
|
||||
WQLObject wo = WQLObject.getWQLObject("st_rule_iodisstruct");
|
||||
String now = DateUtil.now();
|
||||
|
||||
for (int i = 0; i < structArray.size(); i++) {
|
||||
JSONObject structObject = structArray.getJSONObject(i);
|
||||
JSONObject iodObject = new JSONObject();
|
||||
@@ -150,10 +151,10 @@ public class Test3 extends BaseTest {
|
||||
iodObject.put("load_series", 1);
|
||||
iodObject.put("create_id", 1);
|
||||
iodObject.put("create_name", "管理员");
|
||||
iodObject.put("create_time", now);
|
||||
iodObject.put("create_time", DateUtil.now());
|
||||
iodObject.put("update_optid", 1);
|
||||
iodObject.put("update_optname", "管理员");
|
||||
iodObject.put("update_time", now);
|
||||
iodObject.put("update_time", DateUtil.now());
|
||||
wo.insert(iodObject);
|
||||
}
|
||||
}
|
||||
@@ -162,7 +163,7 @@ public class Test3 extends BaseTest {
|
||||
public void syncStruct1() {
|
||||
JSONArray structArray = WQLObject.getWQLObject("st_ivt_structattr").query("is_delete='0'").getResultJSONArray(0);
|
||||
WQLObject wo = WQLObject.getWQLObject("ST_IVT_StructRelaMaterial");
|
||||
String now = DateUtil.now();
|
||||
|
||||
for (int i = 0; i < structArray.size(); i++) {
|
||||
String material_id = "";
|
||||
for (int j = 0; j < 4; j++) {
|
||||
@@ -185,10 +186,10 @@ public class Test3 extends BaseTest {
|
||||
map.put("material_id", material_id);
|
||||
map.put("create_id", 1);
|
||||
map.put("create_name", "管理员");
|
||||
map.put("create_time", now);
|
||||
map.put("create_time", DateUtil.now());
|
||||
map.put("update_optid", 1);
|
||||
map.put("update_optname", "管理员");
|
||||
map.put("update_time", now);
|
||||
map.put("update_time", DateUtil.now());
|
||||
wo.insert(map);
|
||||
}
|
||||
|
||||
@@ -199,7 +200,7 @@ public class Test3 extends BaseTest {
|
||||
public void syncStruct2() {
|
||||
JSONArray structArray = WQLObject.getWQLObject("st_ivt_structattr").query("is_delete='0'").getResultJSONArray(0);
|
||||
WQLObject wo = WQLObject.getWQLObject("st_ivt_structrelavehicletype");
|
||||
String now = DateUtil.now();
|
||||
|
||||
for (int i = 0; i < structArray.size(); i++) {
|
||||
for (int j = 1; j <= 3; j++) {
|
||||
JSONObject jsonObject = structArray.getJSONObject(i);
|
||||
@@ -209,10 +210,10 @@ public class Test3 extends BaseTest {
|
||||
map.put("vehicle_type", "0" + j);
|
||||
map.put("create_id", 1);
|
||||
map.put("create_name", "管理员");
|
||||
map.put("create_time", now);
|
||||
map.put("create_time", DateUtil.now());
|
||||
map.put("update_optid", 1);
|
||||
map.put("update_optname", "管理员");
|
||||
map.put("update_time", now);
|
||||
map.put("update_time", DateUtil.now());
|
||||
wo.insert(map);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user