|
|
@ -69,6 +69,11 @@ public class PlaceController { |
|
|
return new RestResponse(placePList, placeService.findPlaceCountByCondition(map), 200); |
|
|
return new RestResponse(placePList, placeService.findPlaceCountByCondition(map), 200); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 用于创建库位 |
|
|
|
|
|
* @param map |
|
|
|
|
|
* @return |
|
|
|
|
|
*/ |
|
|
@PostMapping("/addPlace") |
|
|
@PostMapping("/addPlace") |
|
|
public RestResponse insertPlace(@RequestBody Map<String, Object> map) { |
|
|
public RestResponse insertPlace(@RequestBody Map<String, Object> map) { |
|
|
String type = (String) map.get("type"); |
|
|
String type = (String) map.get("type"); |
|
|
@ -117,9 +122,9 @@ public class PlaceController { |
|
|
total = (place_end_x - place_start_x) * (place_end_z - place_start_z); |
|
|
total = (place_end_x - place_start_x) * (place_end_z - place_start_z); |
|
|
String min = (String) map.get("min"); |
|
|
String min = (String) map.get("min"); |
|
|
String max = (String) map.get("max"); |
|
|
String max = (String) map.get("max"); |
|
|
for (int i = place_start_x; i < place_end_x; i++) { |
|
|
for (int i = place_start_x; i <= place_end_x; i++) { |
|
|
// for (int j = place_start_y; j < place_end_y; j++) {
|
|
|
// for (int j = place_start_y; j < place_end_y; j++) {
|
|
|
for (int k = place_start_z; k < place_end_z; k++) { |
|
|
for (int k = place_start_z; k <= place_end_z; k++) { |
|
|
// String code = String.format("%02d", i) + String.format("%02d", j) + String.format("%02d", k);
|
|
|
// String code = String.format("%02d", i) + String.format("%02d", j) + String.format("%02d", k);
|
|
|
String code = String.format("%02d", i) + String.format("%02d", k); |
|
|
String code = String.format("%02d", i) + String.format("%02d", k); |
|
|
insert.put("x",i); |
|
|
insert.put("x",i); |
|
|
@ -184,11 +189,13 @@ public class PlaceController { |
|
|
String min = (String) map.get("min"); |
|
|
String min = (String) map.get("min"); |
|
|
String max = (String) map.get("max"); |
|
|
String max = (String) map.get("max"); |
|
|
// String code = String.format("%02d", place_x) + String.format("%02d", place_y) + String.format("%02d", place_z);
|
|
|
// String code = String.format("%02d", place_x) + String.format("%02d", place_y) + String.format("%02d", place_z);
|
|
|
|
|
|
String oldCode = (String)map.get("code"); |
|
|
String code = String.format("%02d", place_x) + String.format("%02d", place_z); |
|
|
String code = String.format("%02d", place_x) + String.format("%02d", place_z); |
|
|
update.put("x", place_x); |
|
|
update.put("x", place_x); |
|
|
// update.put("y", place_y);
|
|
|
// update.put("y", place_y);
|
|
|
update.put("z", place_z); |
|
|
update.put("z", place_z); |
|
|
update.put("code", code); |
|
|
update.put("code", code); |
|
|
|
|
|
update.put("oldCode", oldCode); |
|
|
update.put("did", map.get("depositoryId")); |
|
|
update.put("did", map.get("depositoryId")); |
|
|
if (!"".equals(min)) { |
|
|
if (!"".equals(min)) { |
|
|
update.put("min", map.get("min")); |
|
|
update.put("min", map.get("min")); |
|
|
|