fix:需求单问题
This commit is contained in:
@@ -8,6 +8,7 @@ import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.annotation.Mock;
|
||||
import org.nl.common.base.ResponseData;
|
||||
import org.nl.common.domain.constant.RegionConstant;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.config.SpringContextHolder;
|
||||
import org.nl.wms.ext_manage.purchase.service.dto.BillChangeDto;
|
||||
@@ -134,7 +135,7 @@ public class WmsToZDWmdServiceImpl implements WmsToZDWmdService {
|
||||
if(!StrUtil.isEmptyIfStr(skuCode)){
|
||||
requestBody.put("SkuCode", skuCode);
|
||||
}
|
||||
requestBody.put("HouseCode", "6.002");
|
||||
requestBody.put("HouseCode", RegionConstant.R001);
|
||||
requestBody.put("HouseCodeLis", new JSONArray());
|
||||
try {
|
||||
String resultMsg = HttpRequest.post(url)
|
||||
@@ -148,7 +149,9 @@ public class WmsToZDWmdServiceImpl implements WmsToZDWmdService {
|
||||
if (respCode == null || respCode != 0) {
|
||||
throw new BadRequestException("中鼎库存查询失败:" + result.getString("respMsg"));
|
||||
}
|
||||
inventorys = result.getJSONArray("data").toJavaList(ZDInventory.class);
|
||||
JSONArray data = result.getJSONArray("data");
|
||||
if (data != null)
|
||||
inventorys = data.toJavaList(ZDInventory.class);
|
||||
return new ResponseEntity(inventorys, HttpStatus.OK);
|
||||
} catch (BadRequestException e) {
|
||||
throw e;
|
||||
|
||||
@@ -121,15 +121,15 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
|
||||
);
|
||||
com.github.pagehelper.Page<Object> page = PageHelper.startPage(pageQuery.getPage() + 1, pageQuery.getSize(), false);
|
||||
List<PmDemandDto> records = this.baseMapper.queryPage(query);
|
||||
// ResponseEntity<List<ZDInventory>> responseEntity = wmsToZDWmdService.queryInventory("");
|
||||
// List<ZDInventory> zdInventorys = responseEntity.getBody();
|
||||
// Map<String, BigDecimal> collect = zdInventorys.stream().collect(Collectors.toMap(
|
||||
// ZDInventory::getSkuCode,
|
||||
// ZDInventory::getQty
|
||||
// ));
|
||||
// for (PmDemandDto record : records) {
|
||||
// record.setLkInv(collect.get(record.getSkuCode()));
|
||||
// }
|
||||
ResponseEntity<List<ZDInventory>> responseEntity = wmsToZDWmdService.queryInventory("");
|
||||
List<ZDInventory> zdInventorys = responseEntity.getBody();
|
||||
Map<String, BigDecimal> collect = zdInventorys.stream().collect(Collectors.toMap(
|
||||
ZDInventory::getSkuCode,
|
||||
ZDInventory::getQty
|
||||
));
|
||||
for (PmDemandDto record : records) {
|
||||
record.setLkInv(collect.get(record.getSkuCode()));
|
||||
}
|
||||
Page<PmDemandDto> dtoPage = new Page<>(page.getPageNum(), page.getPageSize(), total);
|
||||
dtoPage.setRecords(records);
|
||||
return dtoPage;
|
||||
|
||||
@@ -540,7 +540,7 @@ export default {
|
||||
return
|
||||
}
|
||||
const ids = this.multipleSelection.map(item => item.id)
|
||||
const inventoryDis = this.batchAllocateHouses.join(',')
|
||||
const inventoryDis = this.batchAllocateHouses[0]
|
||||
this.batchAllocateSaving = true
|
||||
batchAllocate({ ids, inventoryDis }).then(() => {
|
||||
this.$message.success('批量分配成功')
|
||||
|
||||
Reference in New Issue
Block a user