mdf:手持出库接口更新
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
package org.nl.pda.st.out.rest;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@@ -44,7 +45,7 @@ public class HandXCOutIvtController {
|
||||
@PostMapping("/confirmoutstore")
|
||||
@Log("出库确认")
|
||||
@ApiOperation("出库确认")
|
||||
public ResponseEntity<Object> confirmOutStore(@RequestBody Map whereJson) {
|
||||
public ResponseEntity<Object> confirmOutStore(@RequestBody JSONObject whereJson) {
|
||||
return new ResponseEntity<>(handXCOutIvtService.confirmOutStore(whereJson), HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package org.nl.pda.st.out.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.nl.wql.core.content.HttpContext;
|
||||
|
||||
import java.util.Map;
|
||||
@@ -25,7 +26,7 @@ public interface HandXCOutIvtService {
|
||||
* @param jsonObject 条件
|
||||
* @return Map<String, Object>
|
||||
*/
|
||||
Map<String, Object> confirmOutStore(Map jsonObject);
|
||||
Map<String, Object> confirmOutStore(JSONObject jsonObject);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -91,12 +91,12 @@ public class HandXCOutIvtServiceImpl implements HandXCOutIvtService {
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public Map<String, Object> confirmOutStore(Map jsonObject) {
|
||||
public Map<String, Object> confirmOutStore(JSONObject jsonObject) {
|
||||
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||
UserDto userDto = userService.findById(currentUserId);
|
||||
|
||||
String storagevehicle_code = (String) jsonObject.get("storagevehicle_code");
|
||||
String workorder_code = (String) jsonObject.get("workorder_code");
|
||||
JSONObject mst = jsonObject.getJSONObject("mst");
|
||||
String storagevehicle_code = mst.getString("vehicle_cod");
|
||||
String workorder_code = mst.getString("workorder_code");
|
||||
|
||||
if (StrUtil.isEmpty(storagevehicle_code)) {
|
||||
throw new PdaRequestException("载具不能为空!");
|
||||
@@ -123,7 +123,7 @@ public class HandXCOutIvtServiceImpl implements HandXCOutIvtService {
|
||||
if(!workorder_code2.equals(workorder_code)){
|
||||
throw new PdaRequestException("该载具"+storagevehicle_code+"组盘工令与所选工令不一致!");
|
||||
}
|
||||
JSONArray dtls = (JSONArray) jsonObject.get("dtl");
|
||||
JSONArray dtls = jsonObject.getJSONArray("dtl");
|
||||
Set set = new HashSet();
|
||||
for(int i=0;i<dtls.size();i++){
|
||||
JSONObject dtl = dtls.getJSONObject(i);
|
||||
|
||||
Reference in New Issue
Block a user