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