|
|
@ -238,8 +238,17 @@ public class ShRequester { |
|
|
|
if (reqParams != null) |
|
|
|
param = BeanUtil.beanToMap(reqParams); |
|
|
|
String s = ShHttp.doGet(out_stock$index, param); |
|
|
|
BaseResponse<BaseResponseListObj<OutStock>> baseResponse = toBean(s, resp, respObj); |
|
|
|
return baseResponse; |
|
|
|
BaseResponse<BaseResponseListObj<JSONObject>> baseResponse = toBean(s, resp, respObj); |
|
|
|
BeanUtil.copyProperties(baseResponse,resp); |
|
|
|
List<JSONObject> list = baseResponse.getData().getList(); |
|
|
|
List<OutStock> outStocks = new ArrayList<>(); |
|
|
|
for (JSONObject jsonObject : list) { |
|
|
|
OutStock outStock = JSONUtil.toBean(jsonObject, OutStock.class); |
|
|
|
outStocks.add(outStock); |
|
|
|
} |
|
|
|
respObj.setList(outStocks); |
|
|
|
resp.setData(respObj); |
|
|
|
return resp; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@ -254,8 +263,17 @@ public class ShRequester { |
|
|
|
if (reqParams != null) |
|
|
|
param = BeanUtil.beanToMap(reqParams); |
|
|
|
String s = ShHttp.doGet(out_stock$get_record_materiel_list, param); |
|
|
|
BaseResponse<BaseResponseListObj<RecordMaterielList>> baseResponse = toBean(s, req, reqObj); |
|
|
|
return baseResponse; |
|
|
|
BaseResponse<BaseResponseListObj<JSONObject>> baseResponse = toBean(s, req, reqObj); |
|
|
|
BeanUtil.copyProperties(baseResponse,req); |
|
|
|
List<JSONObject> list = baseResponse.getData().getList(); |
|
|
|
List<RecordMaterielList> recordMaterielLists = new ArrayList<>(); |
|
|
|
for (JSONObject jsonObject : list) { |
|
|
|
RecordMaterielList recordMaterielList = JSONUtil.toBean(jsonObject, RecordMaterielList.class); |
|
|
|
recordMaterielLists.add(recordMaterielList); |
|
|
|
} |
|
|
|
reqObj.setList(recordMaterielLists); |
|
|
|
req.setData(reqObj); |
|
|
|
return req; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@ -316,8 +334,17 @@ public class ShRequester { |
|
|
|
if (reqParams != null) |
|
|
|
param = BeanUtil.beanToMap(reqParams); |
|
|
|
String s = ShHttp.doGet(in_stock$index, param); |
|
|
|
BaseResponse<BaseResponseListObj<InStockIndex>> baseResponse = toBean(s, req, reqObj); |
|
|
|
return baseResponse; |
|
|
|
BaseResponse<BaseResponseListObj<JSONObject>> baseResponse = toBean(s, req, reqObj); |
|
|
|
BeanUtil.copyProperties(baseResponse,req); |
|
|
|
List<JSONObject> list = baseResponse.getData().getList(); |
|
|
|
List<InStockIndex> inStockIndices = new ArrayList<>(); |
|
|
|
for (JSONObject jsonObject : list) { |
|
|
|
InStockIndex inStockIndex = JSONUtil.toBean(jsonObject, InStockIndex.class); |
|
|
|
inStockIndices.add(inStockIndex); |
|
|
|
} |
|
|
|
reqObj.setList(inStockIndices); |
|
|
|
req.setData(reqObj); |
|
|
|
return req; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@ -372,8 +399,17 @@ public class ShRequester { |
|
|
|
Map<String, Object> params = new HashMap<>(); |
|
|
|
params.put("record_type", record_type); |
|
|
|
String s = ShHttp.doGet(stock_record$index, params); |
|
|
|
BaseResponse<BaseResponseListObj<StockRecordIndex>> baseResponse = toBean(s, req, reqObj); |
|
|
|
return baseResponse; |
|
|
|
BaseResponse<BaseResponseListObj<JSONObject>> baseResponse = toBean(s, req, reqObj); |
|
|
|
BeanUtil.copyProperties(baseResponse,req); |
|
|
|
List<JSONObject> list = baseResponse.getData().getList(); |
|
|
|
List<StockRecordIndex> stockRecordIndices = new ArrayList<>(); |
|
|
|
for (JSONObject jsonObject : list) { |
|
|
|
StockRecordIndex stockRecordIndex = JSONUtil.toBean(jsonObject, StockRecordIndex.class); |
|
|
|
stockRecordIndices.add(stockRecordIndex); |
|
|
|
} |
|
|
|
reqObj.setList(stockRecordIndices); |
|
|
|
req.setData(reqObj); |
|
|
|
return req; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@ -416,8 +452,17 @@ public class ShRequester { |
|
|
|
params.put("storehouse_code", storehouse_code); |
|
|
|
params.put("storehouse_name", storehouse_name); |
|
|
|
String s = ShHttp.doGet(storehouse$index, params); |
|
|
|
BaseResponse<BaseResponseListObj<StorehouseIndex>> baseResponse = toBean(s, req, reqObj); |
|
|
|
return baseResponse; |
|
|
|
BaseResponse<BaseResponseListObj<JSONObject>> baseResponse = toBean(s, req, reqObj); |
|
|
|
BeanUtil.copyProperties(baseResponse,req); |
|
|
|
List<JSONObject> list = baseResponse.getData().getList(); |
|
|
|
List<StorehouseIndex> storehouseIndices = new ArrayList<>(); |
|
|
|
for (JSONObject jsonObject : list) { |
|
|
|
StorehouseIndex storehouseIndex = JSONUtil.toBean(jsonObject, StorehouseIndex.class); |
|
|
|
storehouseIndices.add(storehouseIndex); |
|
|
|
} |
|
|
|
reqObj.setList(storehouseIndices); |
|
|
|
req.setData(reqObj); |
|
|
|
return req; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@ -429,8 +474,17 @@ public class ShRequester { |
|
|
|
BaseResponse<BaseResponseListObj<SupplierIndex>> req = new BaseResponse<>(); |
|
|
|
BaseResponseListObj<SupplierIndex> reqObj = new BaseResponseListObj<>(); |
|
|
|
String s = ShHttp.doGet(supplier$index, null); |
|
|
|
BaseResponse<BaseResponseListObj<SupplierIndex>> baseResponse = toBean(s, req, reqObj); |
|
|
|
return baseResponse; |
|
|
|
BaseResponse<BaseResponseListObj<JSONObject>> baseResponse = toBean(s, req, reqObj); |
|
|
|
BeanUtil.copyProperties(baseResponse,req); |
|
|
|
List<JSONObject> list = baseResponse.getData().getList(); |
|
|
|
List<SupplierIndex> supplierIndices = new ArrayList<>(); |
|
|
|
for (JSONObject jsonObject : list) { |
|
|
|
SupplierIndex supplierIndex = JSONUtil.toBean(jsonObject, SupplierIndex.class); |
|
|
|
supplierIndices.add(supplierIndex); |
|
|
|
} |
|
|
|
reqObj.setList(supplierIndices); |
|
|
|
req.setData(reqObj); |
|
|
|
return req; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|