fkf 2 years ago
parent
commit
f7501eb453
  1. 84
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/ShRequester.java
  2. 28
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/resp/AreaList.java
  3. 23
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/resp/PurchaseContractGetInfo.java
  4. 54
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/resp/StockRecordIndex.java
  5. 46
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/resp/StorehouseIndex.java
  6. 36
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/resp/SupplierIndex.java
  7. 26
      yxt-supervise-gf-biz/src/test/java/demo/tool/SecurTest.java

84
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/ShRequester.java

@ -30,6 +30,10 @@ public class ShRequester {
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.入库记录 入库记录列表
private static String stock_record$index = "/api/system/stock_record/index"; //19.出入库记录 出入库记录列表
private static String purchase_contract$get_info = "/api/system/purchase_contract/get_info"; //20.出入库合同详情
private static String storehouse$index = "/api/system/storehouse/index"; //22.仓库列表
private static String supplier$index = "/api/system/supplier/index"; //23.获取供应商 供应商列表
/**
* 1.待配货列表
*
@ -113,7 +117,7 @@ public class ShRequester {
/**
* @Description //描述: 7. 出库申请 出库申请详情
* @Param [id]
* @Param [id] 申请id
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse<com.yxt.supervise.gf.shanhai.resp.OutStock>
**/
public static BaseResponse<OutStockGetInfo> getApi$system$out_stock$get_info(String id){
@ -170,7 +174,7 @@ public class ShRequester {
/**
* @Description //描述: 10. 导出出库单
* @Param [id]
* @Param [id] 记录id
* @return java.lang.String
**/
public static String getApi$system$out_stock$export_bill(String id){
@ -214,7 +218,7 @@ public class ShRequester {
/**
* @Description //描述: 13. 入库申请
* @Param [id]
* @Param [id] 申请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){
@ -248,7 +252,7 @@ public class ShRequester {
/**
* @Description //描述: 15. 入库单导出
* @Param [id]
* @Param [id] 申请id
* @return java.lang.String
**/
public static String getApi$system$in_stock$export_bill(String id){
@ -306,6 +310,78 @@ public class ShRequester {
return baseResponse;
}
/**
* @Description //描述: 19. 出入库记录 出入库记录列表 //1为出库 2为入库
* @Param [record_type]
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse<com.yxt.supervise.gf.shanhai.resp.BaseResponseListObj<com.yxt.supervise.gf.shanhai.resp.StockRecordIndex>>
**/
public static BaseResponse<BaseResponseListObj<StockRecordIndex>> getApi$system$stock_record$index(String record_type){
BaseResponse<BaseResponseListObj<StockRecordIndex>> req = new BaseResponse<>();
BaseResponseListObj<StockRecordIndex> reqObj = new BaseResponseListObj<>();
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;
}
/**
* @Description //描述: 20. 出入库合同详情
* @Param [id] 合同id
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse<com.yxt.supervise.gf.shanhai.resp.PurchaseContractGetInfo>
**/
public static BaseResponse<PurchaseContractGetInfo> getApi$system$purchase_contract$get_info(String id){
BaseResponse<PurchaseContractGetInfo> resp = new BaseResponse<>();
Map<String, Object> params = new HashMap<>();
params.put("id", id);
String s = ShHttp.doGet(purchase_contract$get_info, params);
JSONObject jsonObject = JSONUtil.parseObj(s);
String code = jsonObject.get("code").toString();
String msg = jsonObject.get("msg").toString();
resp.setCode(Integer.parseInt(code));
resp.setMsg(msg);
Boolean a = jsonObject.get("data").toString().equals("null") || jsonObject.get("data") == null;
JSONObject data = a ? null : (JSONObject)jsonObject.get("data");
PurchaseContractGetInfo purchaseContractGetInfo = JSONUtil.toBean(data, PurchaseContractGetInfo.class);
resp.setData(purchaseContractGetInfo);
return resp;
}
/**
* @Description //描述: 21. 预付款仓库 todo 此url跟19.出入库记录一样
* @Param
* @return
**/
/**
* @Description //描述: 22. 仓库列表
* @Param [storehouse_code, storehouse_name] storehouse_code 仓库编号 storehouse_name 仓库名称
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse<com.yxt.supervise.gf.shanhai.resp.BaseResponseListObj<com.yxt.supervise.gf.shanhai.resp.StorehouseIndex>>
**/
public static BaseResponse<BaseResponseListObj<StorehouseIndex>> getApi$system$storehouse$index(String storehouse_code,String storehouse_name){
BaseResponse<BaseResponseListObj<StorehouseIndex>> req = new BaseResponse<>();
BaseResponseListObj<StorehouseIndex> reqObj = new BaseResponseListObj<>();
Map<String, Object> params = new HashMap<>();
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;
}
/**
* @Description //描述: 23. 获取供应商 供应商列表
* @Param []
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse<com.yxt.supervise.gf.shanhai.resp.BaseResponseListObj<com.yxt.supervise.gf.shanhai.resp.SupplierIndex>>
**/
public static BaseResponse<BaseResponseListObj<SupplierIndex>> getApi$system$supplier$index(){
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;
}
/**
* @Description //描述: 将Json格式数据封装成统一返回对象
* @Param [s, resp, respObj]

28
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/resp/AreaList.java

@ -0,0 +1,28 @@
package com.yxt.supervise.gf.shanhai.resp;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author feikefei
* @create 2023-07-07-9:35
*/
@Data
@ApiModel(value = "22.仓库列表",description = "地区数组")
public class AreaList {
@ApiModelProperty("地区id")
private String id;
@ApiModelProperty("地区名称")
private String name;
@ApiModelProperty("地区级别")
private String level;
@ApiModelProperty("地区父级唯一编码")
private String parent_code;
@ApiModelProperty("地区唯一编码")
private String area_code;
@ApiModelProperty("经度")
private String lng;
@ApiModelProperty("纬度")
private String lat;
}

23
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/resp/PurchaseContractGetInfo.java

@ -0,0 +1,23 @@
package com.yxt.supervise.gf.shanhai.resp;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import sun.management.resources.agent;
/**
* @author feikefei
* @create 2023-07-07-9:14
*/
@Data
@ApiModel(value = "出入库合同详情")
public class PurchaseContractGetInfo {
// private String id; 合同id
// private String type; 合同类型 1为代理商授权运维合同 2采购合同 3电站销售合同
// private String contract_name; 名称
// private String contract_date; 批次合同签订的时间 Y-m-d
// private String pic; 文件地址
// private String create_time; 创建时间
// private String ident_id; 关联id
// private String ident_type; 关联类型 (supplier=供应商,agent=代理商,customer=客户)
// private String contract_no; 合同编号
}

54
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/resp/StockRecordIndex.java

@ -0,0 +1,54 @@
package com.yxt.supervise.gf.shanhai.resp;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author feikefei
* @create 2023-07-07-8:54
*/
@Data
@ApiModel(value = "出入库记",description = "出入库记录列表")
public class StockRecordIndex {
@ApiModelProperty("物料名称")
private String materiel_name;
@ApiModelProperty("品牌")
private String brand_name;
@ApiModelProperty("物料编码")
private String materiel_no;
@ApiModelProperty("批次号")
private String batch_number;
@ApiModelProperty("物料分组说明")
private String materiel_group_text;
@ApiModelProperty("库存数量")
private String num;
@ApiModelProperty("单价")
private String price;
@ApiModelProperty("实际价格")
private String actual_price;
@ApiModelProperty("物料单位")
private String unit;
@ApiModelProperty("操作人姓名")
private String admin_name;
@ApiModelProperty("入库仓库名称")
private String storehouse_name;
@ApiModelProperty("发生时间")
private String happen_time;
@ApiModelProperty("入库类型")
private String type;
@ApiModelProperty("入库类型明文")
private String type_text;
@ApiModelProperty("审核状态")
private String status;
@ApiModelProperty("原数量")
private String orig_num;
@ApiModelProperty("更新后的数量")
private String new_num;
@ApiModelProperty("创建时间")
private String create_time;
@ApiModelProperty("来源名称")
private String source_name;
@ApiModelProperty("来源类型")
private String source_type;
}

46
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/resp/StorehouseIndex.java

@ -0,0 +1,46 @@
package com.yxt.supervise.gf.shanhai.resp;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* @author feikefei
* @create 2023-07-07-9:33
*/
@Data
@ApiModel(value = "22.仓库列表")
public class StorehouseIndex {
@ApiModelProperty("仓库id")
private String id;
@ApiModelProperty("仓库编码")
private String storehouse_code;
@ApiModelProperty("仓库名称")
private String storehouse_name;
@ApiModelProperty("区域id")
private String area_id;
@ApiModelProperty("详细地址")
private String address;
@ApiModelProperty("仓库状态")
private String status;
@ApiModelProperty("仓库备注")
private String remarks;
@ApiModelProperty("仓库类型")
private String storehouse_type;
@ApiModelProperty("创建时间")
private String create_time;
@ApiModelProperty("数据分组")
private String data_id;
@ApiModelProperty("审核次数(进销存审核次数)")
private String examine;
@ApiModelProperty("是否交货审核 1为审核,2为不审核")
private String delivery_examine;
@ApiModelProperty("地区数组")
private List<AreaList> area_list;
@ApiModelProperty("地区说明")
private String area_text;
@ApiModelProperty("创建时间说明")
private String create_time_text;
}

36
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/resp/SupplierIndex.java

@ -0,0 +1,36 @@
package com.yxt.supervise.gf.shanhai.resp;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author feikefei
* @create 2023-07-07-15:06
*/
@Data
@ApiModel(value = "获取供应商",description = "供应商列表")
public class SupplierIndex {
@ApiModelProperty("供应商id")
private String id;
@ApiModelProperty("供应商名称")
private String supplier_name;
@ApiModelProperty("供应商星级")
private String supplie_grade;
@ApiModelProperty("物料组")
private String materiel_group;
@ApiModelProperty("联系人")
private String link_man;
@ApiModelProperty("联系方式")
private String link_phone;
@ApiModelProperty("创建时间")
private String create_time;
@ApiModelProperty("修改时间")
private String update_time;
@ApiModelProperty("数据分组")
private String data_id;
@ApiModelProperty("创建时间")
private String c_t;
@ApiModelProperty("分组名称")
private String group_name;
}

26
yxt-supervise-gf-biz/src/test/java/demo/tool/SecurTest.java

@ -8,10 +8,7 @@ import cn.hutool.crypto.asymmetric.RSA;
import cn.hutool.http.HttpRequest;
import com.yxt.supervise.gf.shanhai.ShRequester;
import com.yxt.supervise.gf.shanhai.req.In_stockExamine;
import com.yxt.supervise.gf.shanhai.resp.BaseResponse;
import com.yxt.supervise.gf.shanhai.resp.BaseResponseListObj;
import com.yxt.supervise.gf.shanhai.resp.InStockGetRecordMaterielList;
import com.yxt.supervise.gf.shanhai.resp.InStockIndex;
import com.yxt.supervise.gf.shanhai.resp.*;
import org.junit.Test;
import sun.misc.BASE64Decoder;
@ -91,7 +88,7 @@ public class SecurTest {
// BaseResponse<BaseResponseListObj<Inventory>> api$system$inventory$index = ShRequester.getApi$system$inventory$index(null);
// System.out.println(api$system$inventory$index);
// BaseResponse<GetInfo> api$system$out_stock$get_info = ShRequester.getApi$system$out_stock$get_info("10888");
// BaseResponse<OutStockGetInfo> api$system$out_stock$get_info = ShRequester.getApi$system$out_stock$get_info("10888");
// System.out.println(api$system$out_stock$get_info);
// Examine examine = new Examine();
@ -134,8 +131,23 @@ public class SecurTest {
// BaseResponse<BaseResponseListObj> api$system$in_stock$examine = ShRequester.getApi$system$in_stock$examine(in_stockExamine);
// System.out.println(api$system$in_stock$examine);
BaseResponse<BaseResponseListObj<InStockGetRecordMaterielList>> api$system$in_stock$get_record_materiel_list = ShRequester.getApi$system$in_stock$get_record_materiel_list(null);
System.out.println(api$system$in_stock$get_record_materiel_list);
// BaseResponse<BaseResponseListObj<InStockGetRecordMaterielList>> api$system$in_stock$get_record_materiel_list = ShRequester.getApi$system$in_stock$get_record_materiel_list(null);
// System.out.println(api$system$in_stock$get_record_materiel_list);
// BaseResponse<BaseResponseListObj<StockRecordIndex>> api$system$stock_record$index = ShRequester.getApi$system$stock_record$index(null);
// System.out.println(api$system$stock_record$index);
// BaseResponse<PurchaseContractGetInfo> api$system$purchase_contract$get_info = ShRequester.getApi$system$purchase_contract$get_info("10814");
// System.out.println(api$system$purchase_contract$get_info);
// BaseResponse<BaseResponseListObj<StorehouseIndex>> api$system$storehouse$index = ShRequester.getApi$system$storehouse$index(null, null);
// System.out.println(api$system$storehouse$index);
// BaseResponse<BaseResponseListObj<SupplierIndex>> api$system$supplier$index = ShRequester.getApi$system$supplier$index();
// System.out.println(api$system$supplier$index);
}
/**

Loading…
Cancel
Save