Browse Source

9-12

master
fkf 2 years ago
parent
commit
f693c78e58
  1. 28
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/stockrecordindex/StockRecordIndexRest.java
  2. 2
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/warehouseinformation/WarehouseInformationRest.java
  3. 49
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/ShRequester.java
  4. 18
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/req/In_stockIndex.java
  5. 30
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/req/Out_stockIndex.java
  6. 42
      yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/req/StockRecord_Index.java

28
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/stockrecordindex/StockRecordIndexRest.java

@ -2,15 +2,13 @@ package com.yxt.supervise.gf.biz.stockrecordindex;
import com.yxt.common.core.result.ResultBean;
import com.yxt.supervise.gf.shanhai.ShRequester;
import com.yxt.supervise.gf.shanhai.req.StockRecord_Index;
import com.yxt.supervise.gf.shanhai.resp.BaseResponse;
import com.yxt.supervise.gf.shanhai.resp.BaseResponseListObj;
import com.yxt.supervise.gf.shanhai.resp.StockRecordIndex;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
@ -25,9 +23,9 @@ public class StockRecordIndexRest {
@PostMapping("/getStockRecordList")
@ApiOperation(value = "查询出入库记录")
public ResultBean getStockRecordList(@RequestBody Map<String, Object> map){
public ResultBean getStockRecordList(@RequestBody StockRecord_Index stockRecordIndex){
ResultBean rb = ResultBean.fireFail();
BaseResponse<BaseResponseListObj<StockRecordIndex>> api$system$stock_record$index = ShRequester.getApi$system$stock_record$index(null,map);
BaseResponse<BaseResponseListObj<StockRecordIndex>> api$system$stock_record$index = ShRequester.getApi$system$stock_record$index(stockRecordIndex);
return rb.success().setData(api$system$stock_record$index);
}
@ -38,4 +36,22 @@ public class StockRecordIndexRest {
BaseResponse<BaseResponseListObj<StockRecordIndex>> api$system$stock_record$index = ShRequester.getApi$system$stock_record$indexY(map);
return rb.success().setData(api$system$stock_record$index);
}
@GetMapping("/getAgentList")
@ApiOperation(value = "获取代理商")
public ResultBean getAgentList(){
ResultBean rb = ResultBean.fireFail();
BaseResponse api$system$search$get_agent_list = ShRequester.getApi$system$search$get_agent_list();
return rb.success().setData(api$system$search$get_agent_list);
}
@GetMapping("/getStatus")
@ApiOperation(value = "获取审核状态")
public ResultBean getStatus(){
ResultBean rb = ResultBean.fireFail();
BaseResponse api$system$out_stock$get_status = ShRequester.getApi$system$out_stock$get_status();
return rb.success().setData(api$system$out_stock$get_status);
}
}

2
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/biz/warehouseinformation/WarehouseInformationRest.java

@ -33,7 +33,7 @@ public class WarehouseInformationRest {
@PostMapping("/getWarehouse")
public ResultBean getWarehouse(@RequestBody Map<String, Object> map){
ResultBean rb = ResultBean.fireFail();
BaseResponse<BaseResponseListObj<StorehouseIndex>> api$system$storehouse$index = ShRequester.getApi$system$storehouse$index(null, null, map);
BaseResponse<BaseResponseListObj<StorehouseIndex>> api$system$storehouse$index = ShRequester.getApi$system$storehouse$index(map);
return rb.success().setData(api$system$storehouse$index);
}
}

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

@ -42,6 +42,8 @@ public class ShRequester {
private static String materiel$get_materiel_group = "/api/system/materiel/get_materiel_group"; //27.获取物料组
private static String out_stock$get_type = "/api/system/out_stock/get_type"; //28.获取出库类型
private static String in_stock$get_type = "/api/system/in_stock/get_type"; //29.获取入库类型
private static String search$get_agent_list = "/api/system/search/get_agent_list"; //30.获取代理商
private static String out_stock$get_status = "/api/system/out_stock/get_status"; //31.获取审核状态
/**
* 1.待配货列表
*
@ -406,12 +408,12 @@ public class ShRequester {
* @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,Map<String, Object> params){
public static BaseResponse<BaseResponseListObj<StockRecordIndex>> getApi$system$stock_record$index(StockRecord_Index stockRecord_Index){
BaseResponse<BaseResponseListObj<StockRecordIndex>> req = new BaseResponse<>();
BaseResponseListObj<StockRecordIndex> reqObj = new BaseResponseListObj<>();
params.put("record_type", record_type);
params.put("storehouse_type", 0);
String s = ShHttp.doGet(stock_record$index, params);
Map<String, Object> param = BeanUtil.beanToMap(stockRecord_Index);
param.put("storehouse_type", 0);
String s = ShHttp.doGet(stock_record$index, param);
BaseResponse<BaseResponseListObj<JSONObject>> baseResponse = toBean(s, req, reqObj);
List<JSONObject> list = baseResponse.getData().getList();
List<StockRecordIndex> stockRecordIndices = new ArrayList<>();
@ -473,11 +475,9 @@ public class ShRequester {
* @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,Map<String,Object> map){
public static BaseResponse<BaseResponseListObj<StorehouseIndex>> getApi$system$storehouse$index(Map<String,Object> map){
BaseResponse<BaseResponseListObj<StorehouseIndex>> req = new BaseResponse<>();
BaseResponseListObj<StorehouseIndex> reqObj = new BaseResponseListObj<>();
map.put("storehouse_code", storehouse_code);
map.put("storehouse_name", storehouse_name);
String s = ShHttp.doGet(storehouse$index, map);
BaseResponse<BaseResponseListObj<JSONObject>> baseResponse = toBean(s, req, reqObj);
List<JSONObject> list = baseResponse.getData().getList();
@ -636,6 +636,41 @@ public class ShRequester {
return resp;
}
/**
* @Description //描述: 30. 获取代理商
* @Param []
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse
**/
public static BaseResponse getApi$system$search$get_agent_list(){
BaseResponse resp = new BaseResponse<>();
String s = ShHttp.dopost(search$get_agent_list, null);
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);
resp.setData(jsonObject.get("data"));
return resp;
}
/**
* @Description //描述: 31.获取审核状态
* @Param []
* @return com.yxt.supervise.gf.shanhai.resp.BaseResponse
**/
public static BaseResponse getApi$system$out_stock$get_status(){
BaseResponse resp = new BaseResponse<>();
String s = ShHttp.doGet(out_stock$get_status, null);
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);
resp.setData(jsonObject.get("data"));
return resp;
}
/**
* @Description //描述: 将Json格式数据封装成统一返回对象
* @Param [s, resp, respObj]

18
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/req/In_stockIndex.java

@ -13,24 +13,22 @@ import lombok.Data;
public class In_stockIndex {
@ApiModelProperty("入库仓库id")
private String storehouse_id;
@ApiModelProperty("来源仓库id")
private String inp_storehouse_id;
@ApiModelProperty("供应商")
private String supplier_id;
@ApiModelProperty("代理商")
private String agent_id;
@ApiModelProperty("客户名称")
private String customer_name;
@ApiModelProperty("批次号")
private String batch_number;
@ApiModelProperty("入库类型(参考入库类型接口)")
private String type;
@ApiModelProperty("发生时间")
private String happen_time;
@ApiModelProperty("目标id")
private String target_id;
@ApiModelProperty("目标类型")
private String target_type;
@ApiModelProperty("审核人id")
private String admin_id;
@ApiModelProperty("审核时间")
private String opinion_time;
@ApiModelProperty("审核状态 1为审核通过,2为审核拒绝,0为待审核")
private String status;
@ApiModelProperty("审核级别 1为初审核,2为复审 ,0为无需审核")
private String current_examine;
private String page;
private String limit;
}

30
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/req/Out_stockIndex.java

@ -12,26 +12,24 @@ import sun.management.resources.agent;
@Data
@ApiModel(value = "出库申请记录")
public class Out_stockIndex {
@ApiModelProperty("出库仓库id")
private Integer storehouse_id;
@ApiModelProperty("入库仓库id")
private String storehouse_id;
@ApiModelProperty("来源仓库id")
private String out_storehouse_id;
@ApiModelProperty("供应商")
private String supplier_id;
@ApiModelProperty("代理商")
private String agent_id;
@ApiModelProperty("客户名称")
private String customer_name;
@ApiModelProperty("批次号")
private String batch_number;
@ApiModelProperty("出库类型")
private Integer type;
@ApiModelProperty("入库类型(参考入库类型接口)")
private String type;
@ApiModelProperty("发生时间")
private String happen_time;
@ApiModelProperty("目标id")
private Integer target_id;
@ApiModelProperty("目前类型(agent=代理商类型,agent_stock=代理商库存,customer=用户,storehouse=仓库,supplier=供应商) 目标id不为空时此项必填写")
private String target_type;
@ApiModelProperty("审核人id")
private Integer admin_id;
@ApiModelProperty("审核时间")
private String opinion_time;
@ApiModelProperty("审核状态1为审核通过,2为审核拒绝,0为待审核")
private Integer status;
@ApiModelProperty("审核级别1为初审核,2为复审 ,0为无需审核")
private Integer current_examine;
@ApiModelProperty("审核状态 1为审核通过,2为审核拒绝,0为待审核")
private String status;
private String page;
private String limit;
}

42
yxt-supervise-gf-biz/src/main/java/com/yxt/supervise/gf/shanhai/req/StockRecord_Index.java

@ -0,0 +1,42 @@
package com.yxt.supervise.gf.shanhai.req;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author feikefei
* @create 2023-09-12-9:57
*/
@Data
@ApiModel(value = "出入库记录")
public class StockRecord_Index {
@ApiModelProperty("出库仓库")
private String out_storehouse_id;
@ApiModelProperty("入库仓库")
private String inp_storehouse_id;
@ApiModelProperty("供应商")
private String supplier_id;
@ApiModelProperty("代理商")
private String agent_id;
@ApiModelProperty("客户名称")
private String customer_name;
@ApiModelProperty("批次号")
private String batch_number;
@ApiModelProperty("审核状态")
private String status;
@ApiModelProperty("出入库类型")
private String type;
@ApiModelProperty("物料编号")
private String materiel_no;
@ApiModelProperty("物料名称")
private String materiel_name;
@ApiModelProperty("物料组")
private String materiel_group;
@ApiModelProperty("出入库筛选")
private String record_type;
private String page;
private String limit;
// @ApiModelProperty("出入库日期")
// private String[] create_time;
}
Loading…
Cancel
Save