|
|
@ -71,6 +71,7 @@ public class PlaceController { |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 用于创建库位 |
|
|
* 用于创建库位 |
|
|
|
|
|
* |
|
|
* @param map |
|
|
* @param map |
|
|
* @return |
|
|
* @return |
|
|
*/ |
|
|
*/ |
|
|
@ -111,8 +112,7 @@ public class PlaceController { |
|
|
insert.put("quantity", 0); |
|
|
insert.put("quantity", 0); |
|
|
insert.put("flagType", 1); |
|
|
insert.put("flagType", 1); |
|
|
success += placeService.InsertPlace(insert); |
|
|
success += placeService.InsertPlace(insert); |
|
|
} |
|
|
} else if ("list".equals(type)) { |
|
|
else if("list".equals(type)){ |
|
|
|
|
|
//获取起始、终止行
|
|
|
//获取起始、终止行
|
|
|
Integer place_start_x = ObjectFormatUtil.toInteger(map.get("place_start_x")); |
|
|
Integer place_start_x = ObjectFormatUtil.toInteger(map.get("place_start_x")); |
|
|
Integer place_end_x = ObjectFormatUtil.toInteger(map.get("place_end_x")); |
|
|
Integer place_end_x = ObjectFormatUtil.toInteger(map.get("place_end_x")); |
|
|
@ -150,8 +150,7 @@ public class PlaceController { |
|
|
} |
|
|
} |
|
|
// }
|
|
|
// }
|
|
|
} |
|
|
} |
|
|
} |
|
|
} else { |
|
|
else{ |
|
|
|
|
|
throw new MyException("所需请求参数缺失!"); |
|
|
throw new MyException("所需请求参数缺失!"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -165,7 +164,6 @@ public class PlaceController { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/addTray") |
|
|
@PostMapping("/addTray") |
|
|
public RestResponse addTray(@RequestBody Map<String, Object> map) { |
|
|
public RestResponse addTray(@RequestBody Map<String, Object> map) { |
|
|
String type = (String) map.get("type"); |
|
|
String type = (String) map.get("type"); |
|
|
@ -180,7 +178,12 @@ public class PlaceController { |
|
|
insert.put("min", 0); |
|
|
insert.put("min", 0); |
|
|
} |
|
|
} |
|
|
if (!"".equals(max)) { |
|
|
if (!"".equals(max)) { |
|
|
|
|
|
Double maxQuantity = ObjectFormatUtil.toDouble(max); |
|
|
|
|
|
if (maxQuantity >= 999999999) { |
|
|
|
|
|
insert.put("max", 999999999); |
|
|
|
|
|
} else { |
|
|
insert.put("max", map.get("max")); |
|
|
insert.put("max", map.get("max")); |
|
|
|
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
insert.put("max", 0); |
|
|
insert.put("max", 0); |
|
|
} |
|
|
} |
|
|
@ -215,8 +218,10 @@ public class PlaceController { |
|
|
throw new MyException("请求参数错误!"); |
|
|
throw new MyException("请求参数错误!"); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 将库位状态改为删除 |
|
|
* 将库位状态改为删除 |
|
|
|
|
|
* |
|
|
* @param map |
|
|
* @param map |
|
|
* @return |
|
|
* @return |
|
|
*/ |
|
|
*/ |
|
|
@ -284,9 +289,14 @@ public class PlaceController { |
|
|
update.put("min", 0); |
|
|
update.put("min", 0); |
|
|
} |
|
|
} |
|
|
if (!"".equals(max)) { |
|
|
if (!"".equals(max)) { |
|
|
|
|
|
Double maxQuantity = ObjectFormatUtil.toDouble(max); |
|
|
|
|
|
if (maxQuantity >= 999999999) { |
|
|
|
|
|
update.put("max", 999999999); |
|
|
|
|
|
} else { |
|
|
update.put("max", map.get("max")); |
|
|
update.put("max", map.get("max")); |
|
|
|
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
update.put("max", 500); |
|
|
update.put("max", 50000); |
|
|
} |
|
|
} |
|
|
update.put("id", id); |
|
|
update.put("id", id); |
|
|
return CrudUtil.insertHandle(placeService.UpdatePlace(update), 1); |
|
|
return CrudUtil.insertHandle(placeService.UpdatePlace(update), 1); |
|
|
@ -314,13 +324,19 @@ public class PlaceController { |
|
|
update.put("min", 0); |
|
|
update.put("min", 0); |
|
|
} |
|
|
} |
|
|
if (!"".equals(max)) { |
|
|
if (!"".equals(max)) { |
|
|
|
|
|
Double maxQuantity = ObjectFormatUtil.toDouble(max); |
|
|
|
|
|
if (maxQuantity >= 999999999) { |
|
|
|
|
|
update.put("max", 999999999); |
|
|
|
|
|
} else { |
|
|
update.put("max", map.get("max")); |
|
|
update.put("max", map.get("max")); |
|
|
|
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
update.put("max", 500); |
|
|
update.put("max", 50000); |
|
|
} |
|
|
} |
|
|
update.put("code", code); |
|
|
update.put("code", code); |
|
|
update.put("id", map.get("id")); |
|
|
update.put("id", map.get("id")); |
|
|
return CrudUtil.insertHandle(placeService.UpdatePlace(update),1); } |
|
|
return CrudUtil.insertHandle(placeService.UpdatePlace(update), 1); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/editPlaceState") |
|
|
@PostMapping("/editPlaceState") |
|
|
@ -380,6 +396,7 @@ public class PlaceController { |
|
|
} |
|
|
} |
|
|
return new RestResponse(placeList); |
|
|
return new RestResponse(placeList); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 根据物料编码以及仓库编号获取具体库位
|
|
|
// 根据物料编码以及仓库编号获取具体库位
|
|
|
@PostMapping("/findPlaceByMcodeAndDid") |
|
|
@PostMapping("/findPlaceByMcodeAndDid") |
|
|
public RestResponse findPlaceByMcodeAndDid(@RequestBody Map<String, Object> map, HttpServletRequest request) { |
|
|
public RestResponse findPlaceByMcodeAndDid(@RequestBody Map<String, Object> map, HttpServletRequest request) { |
|
|
|