|
@@ -50,6 +50,7 @@ import java.time.LocalDateTime;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Iterator;
|
|
|
import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
@@ -282,22 +283,19 @@ public class YongyouServiceImpl implements YongyouService {
|
|
|
/**
|
|
|
* 领用单用友回调,回写实际数量和状态
|
|
|
*
|
|
|
- * @param jsonStr
|
|
|
+ * @param jsonObject
|
|
|
*/
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
- public void backOutForm(String jsonStr) {
|
|
|
- JSONObject jsonObject = JSON.parseObject(jsonStr);
|
|
|
+ public void backOutForm(JSONObject jsonObject) {
|
|
|
String id = (String) jsonObject.get("id");
|
|
|
- String status = (String) jsonObject.get("status");
|
|
|
+ Integer status = (Integer) jsonObject.get("status");
|
|
|
String time = (String) jsonObject.get("time");
|
|
|
- JSONArray detailList = (JSONArray) jsonObject.get("detailList");
|
|
|
-
|
|
|
- for (Iterator<Object> iterator = detailList.iterator(); iterator.hasNext(); ) {
|
|
|
- JSONObject next = (JSONObject) iterator.next();
|
|
|
+ List<Map<String, String>> detailList = jsonObject.getObject("detailList", List.class);
|
|
|
+ for (Map<String, String> next: detailList ) {
|
|
|
// spareId = next.getString("spareId");
|
|
|
- String spareNum = next.getString("spareNum");
|
|
|
- String detailId = next.getString("detailId");
|
|
|
+ String spareNum = next.get("spareNum");
|
|
|
+ String detailId = next.get("detailId");
|
|
|
// String spareGGXH = next.getString("spareGGXH");
|
|
|
OutStoreDetail sparePickDetail = new OutStoreDetail();
|
|
|
sparePickDetail.setId(detailId);
|