| | |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.vincent.rsf.framework.exception.CoolException; |
| | | import com.vincent.rsf.openApi.entity.dto.CommonResponse; |
| | | import com.vincent.rsf.openApi.entity.phyz.*; |
| | |
| | | throw new CoolException("参数不能为空!!"); |
| | | } |
| | | // 返回模拟数据 |
| | | if (SIMULATED_DATA_ENABLE.equals("0")) { |
| | | if (SIMULATED_DATA_ENABLE.equals("1")) { |
| | | JSONArray params = paramsFormat(objParams); |
| | | List<MatPreparationOrder> orders = JSON.parseArray(params.toJSONString(), MatPreparationOrder.class); |
| | | JSONArray array = ERPController.map; |
| | | for (int i = 0; i < ERPController.map.size(); i++) { |
| | | JSONObject obj = array.getJSONObject(i); |
| | | obj.put("orderNo", orders.get(0).getOrderNo()); |
| | | obj.put("matNr", orders.get(0).getOrderItems().get(0).getMatNr()); |
| | | } |
| | | ERPController.map = array; |
| | | |
| | | return CommonResponse.ok(); |
| | | } |
| | | |
| | |
| | | throw new CoolException("参数不能为空!!"); |
| | | } |
| | | // 返回模拟数据 |
| | | if (SIMULATED_DATA_ENABLE.equals("0")) { |
| | | if (SIMULATED_DATA_ENABLE.equals("1")) { |
| | | return CommonResponse.ok(); |
| | | } |
| | | |