更新
This commit is contained in:
parent
e201b58b3b
commit
5a57668b4e
|
|
@ -106,8 +106,9 @@ public class EbsConfirmController extends BaseController {
|
|||
// 获取token
|
||||
JSONObject token = JSON.parseObject(HttpUtils.httpPostJson(configService.selectConfigByKey("token_ip"), "", ""));
|
||||
// 一起查询
|
||||
String params = JSON.toJSONString(createJsonList(stockList, ebsStock.getSubInventory(), null));
|
||||
String params = JSON.toJSONString(createJsonList(stockList, ebsStock.getSubInventory(), EbsUtils.LOCATOR_AREA_MAP.get(ebsStock.getSubInventory())));
|
||||
String result = HttpUtils.httpPostJson(configService.selectConfigByKey("ebs_ip"), params, token.get("access_token").toString());
|
||||
logger.info("现有量查询参数:{},结果:{}", params, result);
|
||||
JSONObject resultJson = (JSONObject) JSON.parseObject(result).get("obj");
|
||||
List<ExistingStock> datas = JSON.parseArray(resultJson.getString("rows"), ExistingStock.class);
|
||||
// 生成现有量数据
|
||||
|
|
@ -238,11 +239,26 @@ public class EbsConfirmController extends BaseController {
|
|||
}
|
||||
// 获取token
|
||||
JSONObject token = JSON.parseObject(HttpUtils.httpPostJson(configService.selectConfigByKey("token_ip"), "", ""));
|
||||
|
||||
// TODO 分批查询
|
||||
List<ExistingStock> datas = new ArrayList<>();
|
||||
int batchNum = stockList.size()/200;
|
||||
for (int i=0; i<=batchNum; i++) {
|
||||
List<TMiStock> tempStockList;
|
||||
if (i == batchNum) {
|
||||
tempStockList = stockList.subList(i*200, stockList.size());
|
||||
} else {
|
||||
tempStockList = stockList.subList(i*200, (i+1)*200);
|
||||
}
|
||||
// 一起查询
|
||||
String params = JSON.toJSONString(createJsonList(stockList, ebsStock.getSubInventory(), null));
|
||||
String params = JSON.toJSONString(createJsonList(tempStockList, ebsStock.getSubInventory(), EbsUtils.LOCATOR_AREA_MAP.get(ebsStock.getSubInventory())));
|
||||
String result = HttpUtils.httpPostJson(configService.selectConfigByKey("ebs_ip"), params, token.get("access_token").toString());
|
||||
logger.info("现有量(按批次)查询参数:{},结果:{}", params, result);
|
||||
JSONObject resultJson = (JSONObject) JSON.parseObject(result).get("obj");
|
||||
List<ExistingStock> datas = JSON.parseArray(resultJson.getString("rows"), ExistingStock.class);
|
||||
// 添加数据
|
||||
datas.addAll(JSON.parseArray(resultJson.getString("rows"), ExistingStock.class));
|
||||
}
|
||||
|
||||
// 生成现有量数据
|
||||
for (TMiStock stock : stockList) {
|
||||
// 插入的EBS现有量数据
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
</div>
|
||||
<div class="col-sm-1 pl20">
|
||||
<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.table.exportExcel()"
|
||||
shiro:hasPermission="business:inreport:export">导出出库记录报表</a>
|
||||
shiro:hasPermission="business:outreport:export">导出出库记录报表</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content ibox-content-1" style="margin: 0;height: 150px">
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user