代码更新
This commit is contained in:
@@ -15,12 +15,10 @@
|
||||
*/
|
||||
package org.nl.modules.quartz.task;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.modules.mnt.websocket.MsgType;
|
||||
import org.nl.modules.mnt.websocket.SocketMsg;
|
||||
import org.nl.modules.mnt.websocket.WebSocketServer;
|
||||
import org.nl.wql.core.bean.WQLObject;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
@@ -32,33 +30,4 @@ import org.springframework.stereotype.Component;
|
||||
@Component
|
||||
public class Test {
|
||||
|
||||
public void run(){
|
||||
|
||||
try {
|
||||
log.info("run 执行成功");
|
||||
JSONObject json = new JSONObject();
|
||||
JSONArray device = new JSONArray();
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("name","A1");
|
||||
JSONObject jo2 = new JSONObject();
|
||||
jo2.put("name","B1");
|
||||
JSONObject jo3 = new JSONObject();
|
||||
jo3.put("name","C1");
|
||||
device.add(jo);
|
||||
device.add(jo2);
|
||||
device.add(jo3);
|
||||
json.put("device",device);
|
||||
json.put("print","0");
|
||||
json.put("cpbh","A111111");
|
||||
json.put("cpmc","123456");
|
||||
SocketMsg deviceInfo = new SocketMsg(json, MsgType.INFO);
|
||||
WebSocketServer.sendInfo(deviceInfo, "test_data");
|
||||
|
||||
} catch (Exception e) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -97,23 +97,11 @@ public class StoragevehicleinfoServiceImpl implements StoragevehicleinfoService
|
||||
String code = "";
|
||||
switch (storagevehicle_type) {
|
||||
case "00":
|
||||
code = "VEHICCLE_CODE_XMTPT";
|
||||
code = "VEHICCLE_CODE_MTP";
|
||||
break;
|
||||
case "01":
|
||||
code = "VEHICCLE_CODE_CDMTP";
|
||||
break;
|
||||
case "02":
|
||||
code = "VEHICCLE_CODE_TLD";
|
||||
break;
|
||||
case "03":
|
||||
code = "VEHICCLE_CODE_TTP";
|
||||
break;
|
||||
case "04":
|
||||
code = "VEHICCLE_CODE_XMTPC";
|
||||
break;
|
||||
case "05":
|
||||
code = "VEHICCLE_CODE_LX";
|
||||
break;
|
||||
}
|
||||
JSONArray resultCodeArr = new JSONArray();
|
||||
int num = MapUtil.getInt(map, "num");
|
||||
@@ -202,23 +190,11 @@ public class StoragevehicleinfoServiceImpl implements StoragevehicleinfoService
|
||||
String term = "";
|
||||
switch (code) {
|
||||
case "00":
|
||||
term = "VEHICCLE_CODE_XMTPT";
|
||||
term = "VEHICCLE_CODE_MTP";
|
||||
break;
|
||||
case "01":
|
||||
term = "VEHICCLE_CODE_CDMTP";
|
||||
break;
|
||||
case "02":
|
||||
term = "VEHICCLE_CODE_TLD";
|
||||
break;
|
||||
case "03":
|
||||
term = "VEHICCLE_CODE_TTP";
|
||||
break;
|
||||
case "04":
|
||||
term = "VEHICCLE_CODE_XMTPC";
|
||||
break;
|
||||
case "05":
|
||||
term = "VEHICCLE_CODE_LX";
|
||||
break;
|
||||
}
|
||||
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
|
||||
Binary file not shown.
@@ -70,6 +70,7 @@
|
||||
point.inv_code,
|
||||
point.is_used,
|
||||
point.is_delete,
|
||||
point.vehicle_qty,
|
||||
point.create_name,
|
||||
point.create_time,
|
||||
point.update_optname,
|
||||
|
||||
Binary file not shown.
@@ -11,6 +11,7 @@ import com.alibaba.fastjson.JSONObject;
|
||||
import org.junit.Test;
|
||||
import org.nl.exception.BadRequestException;
|
||||
import org.nl.modules.system.util.CodeUtil;
|
||||
import org.nl.utils.SecurityUtils;
|
||||
import org.nl.wql.WQL;
|
||||
import org.nl.wql.core.bean.WQLObject;
|
||||
|
||||
@@ -1219,6 +1220,47 @@ public class Test3 extends BaseTest {
|
||||
System.out.println(date);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void createPoint() {
|
||||
// 1-2 46 ; 3-9 50 ; 10-11 35 ; 12-13 37
|
||||
WQLObject tab = WQLObject.getWQLObject("ST_IVT_StructAttr");
|
||||
|
||||
for (int i = 12; i <=13; i++) {
|
||||
String code1 = "";
|
||||
if (i<10) {
|
||||
code1 = "0"+ String.valueOf(i);
|
||||
} else {
|
||||
code1 = String.valueOf(i);
|
||||
}
|
||||
for (int j = 1; j <= 37; j++) {
|
||||
String code = "";
|
||||
if (j<10) {
|
||||
code = "0"+ String.valueOf(j);
|
||||
} else {
|
||||
code = String.valueOf(j);
|
||||
}
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("struct_id", IdUtil.getSnowflake(1,1).nextId());
|
||||
json.put("struct_code", code1+"01"+ code);
|
||||
json.put("struct_name", String.valueOf(i) + "排" + "1 层" + String.valueOf(j) + "列");
|
||||
json.put("simple_name",json.getString("struct_name"));
|
||||
json.put("sect_id", "1556544422710218752");
|
||||
json.put("sect_code","YSQ01");
|
||||
json.put("sect_name","二楼养生区A");
|
||||
json.put("stor_id","1528627964823080960");
|
||||
json.put("stor_code","F103");
|
||||
json.put("stor_name","永裕仓库");
|
||||
json.put("stor_type","01");
|
||||
json.put("create_id","1");
|
||||
json.put("create_name","管理员");
|
||||
json.put("create_time", DateUtil.now());
|
||||
json.put("material_height_type", "1");
|
||||
tab.insert(json);
|
||||
}
|
||||
}
|
||||
System.out.println("创建成功");
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user