|
|
@ -3,10 +3,7 @@ package com.yxt.supervise.gf.shanhai; |
|
|
|
import cn.hutool.core.bean.BeanUtil; |
|
|
|
import cn.hutool.json.JSONObject; |
|
|
|
import cn.hutool.json.JSONUtil; |
|
|
|
import com.yxt.supervise.gf.shanhai.req.Apply_materialIndex; |
|
|
|
import com.yxt.supervise.gf.shanhai.req.Examine; |
|
|
|
import com.yxt.supervise.gf.shanhai.req.ExportData; |
|
|
|
import com.yxt.supervise.gf.shanhai.req.InventoryIndex; |
|
|
|
import com.yxt.supervise.gf.shanhai.req.*; |
|
|
|
import com.yxt.supervise.gf.shanhai.resp.*; |
|
|
|
|
|
|
|
import java.util.HashMap; |
|
|
@ -24,6 +21,15 @@ public class ShRequester { |
|
|
|
private static String out_stock$get_info = "/api/system/out_stock/get_info";//7.出库申请 出库申请详情
|
|
|
|
private static String out_stock$examine = "/api/system/out_stock/examine"; //8. 出库审核 出库审核
|
|
|
|
private static String out_stock$export_data = "/api/system/out_stock/export_data"; //9. 出库记录导出 出库记录导出
|
|
|
|
private static String out_stock$export_bill = "/api/system/out_stock/export_bill"; //10.导出出库单
|
|
|
|
private static String out_stock$index = "/api/system/out_stock/index"; //11.出库申请记录
|
|
|
|
private static String out_stock$get_record_materiel_list = "/api/system/out_stock/get_record_materiel_list";// 12.出库记录列表
|
|
|
|
private static String in_stock$get_info = "/api/system/in_stock/get_info"; //13.入库申请 入库申请详情
|
|
|
|
private static String in_stock$export_data = "/api/system/in_stock/export_data"; //14.入库导出
|
|
|
|
private static String in_stock$export_bill = "/api/system/in_stock/export_bill"; //15.入库单导出
|
|
|
|
private static String in_stock$index = "/api/system/in_stock/index"; //16.入库申请
|
|
|
|
private static String in_stock$examine = "/api/system/in_stock/examine"; //17.入库审核
|
|
|
|
private static String in_stock$get_record_materiel_list = "/api/system/in_stock/get_record_materiel_list"; //18.入库记录 入库记录列表
|
|
|
|
/** |
|
|
|
* 1.待配货列表 |
|
|
|
* |
|
|
@ -110,8 +116,8 @@ public class ShRequester { |
|
|
|
* @Param [id] |
|
|
|
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse<com.yxt.supervise.gf.shanhai.resp.OutStock> |
|
|
|
**/ |
|
|
|
public static BaseResponse<GetInfo> getApi$system$out_stock$get_info(String id){ |
|
|
|
BaseResponse<GetInfo> resp = new BaseResponse<>(); |
|
|
|
public static BaseResponse<OutStockGetInfo> getApi$system$out_stock$get_info(String id){ |
|
|
|
BaseResponse<OutStockGetInfo> resp = new BaseResponse<>(); |
|
|
|
Map<String, Object> params = new HashMap<>(); |
|
|
|
params.put("id", id); |
|
|
|
String s = ShHttp.doGet(out_stock$get_info, params); |
|
|
@ -121,45 +127,185 @@ public class ShRequester { |
|
|
|
resp.setCode(Integer.parseInt(code)); |
|
|
|
resp.setMsg(msg); |
|
|
|
JSONObject data = (JSONObject)jsonObject.get("data"); |
|
|
|
GetInfo outStock = JSONUtil.toBean(data, GetInfo.class); |
|
|
|
OutStockGetInfo outStock = JSONUtil.toBean(data, OutStockGetInfo.class); |
|
|
|
resp.setData(outStock); |
|
|
|
return resp; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description //描述: 8. 出库审核 出库审核
|
|
|
|
* @Description //描述: 8. 出库审核 出库审核 todo 暂不知参数是什么,返回值待定
|
|
|
|
* @Param [reqParams] |
|
|
|
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse |
|
|
|
**/ |
|
|
|
public static BaseResponse getApi$system$out_stock$examine(Examine reqParams){ |
|
|
|
BaseResponse resp = new BaseResponse<>(); |
|
|
|
public static BaseResponse getApi$system$out_stock$examine(Out_stockExamine reqParams){ |
|
|
|
BaseResponse<BaseResponseListObj> resp = new BaseResponse<>(); |
|
|
|
BaseResponseListObj<Object> resObj = new BaseResponseListObj<>(); |
|
|
|
Map<String, Object> param = null; |
|
|
|
if (reqParams != null) |
|
|
|
param = BeanUtil.beanToMap(reqParams); |
|
|
|
String s = ShHttp.dopost(out_stock$examine, param); |
|
|
|
BaseResponse<BaseResponseListObj> baseResponse = toBean(s, resp, resObj); |
|
|
|
// JSONObject jsonObject = JSONUtil.parseObj(s);
|
|
|
|
// String code = jsonObject.get("code").toString();
|
|
|
|
// String msg = jsonObject.get("msg").toString();
|
|
|
|
// JSONObject data = (JSONObject)jsonObject.get("data");
|
|
|
|
// resp.setCode(Integer.parseInt(code));
|
|
|
|
// resp.setMsg(msg);
|
|
|
|
// resp.setData(data);
|
|
|
|
return baseResponse; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description //描述: 9. 出库记录导出
|
|
|
|
* @Param [reqParams] |
|
|
|
* @return java.lang.String |
|
|
|
**/ |
|
|
|
public static String getApi$system$out_stock$export_data(Out_stockExportData reqParams){ |
|
|
|
Map<String, Object> param = null; |
|
|
|
if (reqParams != null) |
|
|
|
param = BeanUtil.beanToMap(reqParams); |
|
|
|
String s = ShHttp.doGet(out_stock$export_data, param); |
|
|
|
return s; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description //描述: 10. 导出出库单
|
|
|
|
* @Param [id] |
|
|
|
* @return java.lang.String |
|
|
|
**/ |
|
|
|
public static String getApi$system$out_stock$export_bill(String id){ |
|
|
|
Map<String, Object> params = new HashMap<>(); |
|
|
|
params.put("id", id); |
|
|
|
String s = ShHttp.doGet(out_stock$export_bill, params); |
|
|
|
return s; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description //描述: 11. 出库申请记录
|
|
|
|
* @Param [reqParams] |
|
|
|
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse<com.yxt.supervise.gf.shanhai.resp.BaseResponseListObj<com.yxt.supervise.gf.shanhai.resp.OutStock>> |
|
|
|
**/ |
|
|
|
public static BaseResponse<BaseResponseListObj<OutStock>> getApi$system$out_stock$index(Out_stockIndex reqParams){ |
|
|
|
BaseResponse<BaseResponseListObj<OutStock>> resp = new BaseResponse<>(); |
|
|
|
BaseResponseListObj<OutStock> respObj = new BaseResponseListObj<>(); |
|
|
|
Map<String, Object> param = null; |
|
|
|
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; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description //描述: 12. 出库记录列表 出库导出
|
|
|
|
* @Param [reqParams] |
|
|
|
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse<com.yxt.supervise.gf.shanhai.resp.BaseResponseListObj<com.yxt.supervise.gf.shanhai.resp.RecordMaterielList>> |
|
|
|
**/ |
|
|
|
public static BaseResponse<BaseResponseListObj<RecordMaterielList>> getApi$system$out_stock$get_record_materiel_list(Out_stockGetRecordMaterielList reqParams){ |
|
|
|
BaseResponse<BaseResponseListObj<RecordMaterielList>> req = new BaseResponse<>(); |
|
|
|
BaseResponseListObj<RecordMaterielList> reqObj = new BaseResponseListObj<>(); |
|
|
|
Map<String, Object> param = null; |
|
|
|
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; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description //描述: 13. 入库申请
|
|
|
|
* @Param [id] |
|
|
|
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse<com.yxt.supervise.gf.shanhai.resp.InStockGetInfo> |
|
|
|
**/ |
|
|
|
public static BaseResponse<InStockGetInfo> getApi$system$in_stock$get_info(String id){ |
|
|
|
BaseResponse<InStockGetInfo> resp = new BaseResponse<>(); |
|
|
|
Map<String, Object> params = new HashMap<>(); |
|
|
|
params.put("id", id); |
|
|
|
String s = ShHttp.doGet(in_stock$get_info, params); |
|
|
|
JSONObject jsonObject = JSONUtil.parseObj(s); |
|
|
|
String code = jsonObject.get("code").toString(); |
|
|
|
String msg = jsonObject.get("msg").toString(); |
|
|
|
JSONObject data = (JSONObject)jsonObject.get("data"); |
|
|
|
resp.setCode(Integer.parseInt(code)); |
|
|
|
resp.setMsg(msg); |
|
|
|
resp.setData(data); |
|
|
|
JSONObject data = (JSONObject)jsonObject.get("data"); |
|
|
|
InStockGetInfo outStock = JSONUtil.toBean(data, InStockGetInfo.class); |
|
|
|
resp.setData(outStock); |
|
|
|
return resp; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description //描述: 9. 出库记录导出
|
|
|
|
* @Description //描述: 14. 入库导出
|
|
|
|
* @Param [reqParams] |
|
|
|
* @return java.lang.String |
|
|
|
**/ |
|
|
|
public static String getApi$system$out_stock$export_data(ExportData reqParams){ |
|
|
|
public static String getApi$system$in_stock$export_data(In_stockExportData reqParams){ |
|
|
|
Map<String, Object> param = null; |
|
|
|
if (reqParams != null) |
|
|
|
param = BeanUtil.beanToMap(reqParams); |
|
|
|
String s = ShHttp.doGet(out_stock$export_data, param); |
|
|
|
String s = ShHttp.doGet(in_stock$export_data, param); |
|
|
|
return s; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description //描述: 15. 入库单导出
|
|
|
|
* @Param [id] |
|
|
|
* @return java.lang.String |
|
|
|
**/ |
|
|
|
public static String getApi$system$in_stock$export_bill(String id){ |
|
|
|
Map<String, Object> params = new HashMap<>(); |
|
|
|
params.put("id", id); |
|
|
|
String s = ShHttp.doGet(in_stock$export_bill, params); |
|
|
|
return s; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description //描述: 16. 入库申请
|
|
|
|
* @Param [reqParams] |
|
|
|
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse<com.yxt.supervise.gf.shanhai.resp.BaseResponseListObj<com.yxt.supervise.gf.shanhai.resp.InStockIndex>> |
|
|
|
**/ |
|
|
|
public static BaseResponse<BaseResponseListObj<InStockIndex>> getApi$system$in_stock$index(In_stockIndex reqParams){ |
|
|
|
BaseResponse<BaseResponseListObj<InStockIndex>> req = new BaseResponse<>(); |
|
|
|
BaseResponseListObj<InStockIndex> reqObj = new BaseResponseListObj<>(); |
|
|
|
Map<String, Object> param = null; |
|
|
|
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; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description //描述: 17. 入库审核 todo 暂不知参数是什么,返回值待定
|
|
|
|
* @Param [reqParams] |
|
|
|
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse<com.yxt.supervise.gf.shanhai.resp.BaseResponseListObj> |
|
|
|
**/ |
|
|
|
public static BaseResponse<BaseResponseListObj> getApi$system$in_stock$examine(In_stockExamine reqParams){ |
|
|
|
BaseResponse<BaseResponseListObj> resp = new BaseResponse<>(); |
|
|
|
BaseResponseListObj<Object> resObj = new BaseResponseListObj<>(); |
|
|
|
Map<String, Object> param = null; |
|
|
|
if (reqParams != null) |
|
|
|
param = BeanUtil.beanToMap(reqParams); |
|
|
|
String s = ShHttp.doGet(in_stock$examine, param); |
|
|
|
BaseResponse<BaseResponseListObj> baseResponse = toBean(s, resp, resObj); |
|
|
|
return baseResponse; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description //描述: 18. 入库记录 入库记录列表
|
|
|
|
* @Param [reqParams] |
|
|
|
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse<com.yxt.supervise.gf.shanhai.resp.BaseResponseListObj<com.yxt.supervise.gf.shanhai.resp.InStockGetRecordMaterielList>> |
|
|
|
**/ |
|
|
|
public static BaseResponse<BaseResponseListObj<InStockGetRecordMaterielList>> getApi$system$in_stock$get_record_materiel_list(In_stockGetRecordMaterielList reqParams){ |
|
|
|
BaseResponse<BaseResponseListObj<InStockGetRecordMaterielList>> req = new BaseResponse<>(); |
|
|
|
BaseResponseListObj<InStockGetRecordMaterielList> reqObj = new BaseResponseListObj<>(); |
|
|
|
Map<String, Object> param = null; |
|
|
|
if (reqParams != null) |
|
|
|
param = BeanUtil.beanToMap(reqParams); |
|
|
|
String s = ShHttp.doGet(in_stock$get_record_materiel_list, param); |
|
|
|
BaseResponse<BaseResponseListObj<InStockGetRecordMaterielList>> baseResponse = toBean(s, req, reqObj); |
|
|
|
return baseResponse; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description //描述: 将Json格式数据封装成统一返回对象
|
|
|
|
* @Param [s, resp, respObj] |
|
|
|