add:出库一键设置

This commit is contained in:
2024-02-21 18:35:27 +08:00
parent b6baccc8a9
commit 64e3d286cc
10 changed files with 608 additions and 59 deletions

View File

@@ -21,6 +21,7 @@ public class Init implements ApplicationRunner {
@Override
public void run(ApplicationArguments args) throws Exception {
// initTwoAttr(4,30,3,2, "2");
// createAttr();
}
/**
@@ -152,27 +153,27 @@ public class Init implements ApplicationRunner {
String now = DateUtil.now();
for (int i = 1; i <= 2000; i++) {
for (int i = 1; i <= 3000; i++) {
JSONObject json = new JSONObject();
json.put("struct_id", IdUtil.getSnowflake(1,1).nextId());
if (i < 10) {
json.put("struct_code", "B01-"+"000"+i+"-01");
json.put("struct_name", "B01排"+"000"+i+"列-01层");
json.put("struct_code", "81-"+"000"+i+"-01");
json.put("struct_name", "81排"+"000"+i+"列-01层");
}else if (i >= 10 && i < 100) {
json.put("struct_code", "B01-"+"00"+i+"-01");
json.put("struct_name", "B01排"+"00"+i+"列-01层");
json.put("struct_code", "81-"+"00"+i+"-01");
json.put("struct_name", "81排"+"00"+i+"列-01层");
}else if (i >= 100 && i < 1000) {
json.put("struct_code", "B01-"+"0"+i+"-01");
json.put("struct_name", "B01排"+"0"+i+"列-01层");
json.put("struct_code", "81-"+"0"+i+"-01");
json.put("struct_name", "81排"+"0"+i+"列-01层");
} else {
json.put("struct_code", "B01-"+i+"-01");
json.put("struct_name", "B01排"+i+"列-01层");
json.put("struct_code", "81-"+i+"-01");
json.put("struct_name", "81排"+i+"列-01层");
}
JSONObject jsonObject = tab2.query("stor_id = '1582991156504039455'").uniqueResult(0);
JSONObject jsonObjec2 = tab3.query("stor_id = '1582991156504039455' and sect_code = 'BXN01'").uniqueResult(0);
JSONObject jsonObject = tab2.query("stor_id = '1597073830499717137'").uniqueResult(0);
JSONObject jsonObjec2 = tab3.query("stor_id = '1597073830499717137' and sect_code = 'XN81'").uniqueResult(0);
// 新增仓位
json.put("simple_name", json.getString("struct_name"));