|
@@ -13,6 +13,8 @@ import com.fjhx.common.utils.Assert;
|
|
import com.fjhx.item.entity.product.po.ProductInfo;
|
|
import com.fjhx.item.entity.product.po.ProductInfo;
|
|
import com.fjhx.item.service.product.ProductInfoService;
|
|
import com.fjhx.item.service.product.ProductInfoService;
|
|
import com.fjhx.item.util.excel.util.ExcelUtil;
|
|
import com.fjhx.item.util.excel.util.ExcelUtil;
|
|
|
|
+import com.fjhx.kd100.entity.company.po.CompanyInfo;
|
|
|
|
+import com.fjhx.kd100.service.company.CompanyInfoService;
|
|
import com.fjhx.wms.entity.ArrivalDetailPo;
|
|
import com.fjhx.wms.entity.ArrivalDetailPo;
|
|
import com.fjhx.wms.entity.PurchaseDetailPo;
|
|
import com.fjhx.wms.entity.PurchaseDetailPo;
|
|
import com.fjhx.wms.entity.arrival.po.ArrivalStockRecords;
|
|
import com.fjhx.wms.entity.arrival.po.ArrivalStockRecords;
|
|
@@ -84,6 +86,8 @@ public class StockWaitServiceImpl extends ServiceImpl<StockWaitMapper, StockWait
|
|
private StockFrozenService stockFrozenService;
|
|
private StockFrozenService stockFrozenService;
|
|
@Autowired
|
|
@Autowired
|
|
private PurService purService;
|
|
private PurService purService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private CompanyInfoService companyInfoService;
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public Page<StockWaitVo> getPage(StockWaitSelectDto dto) {
|
|
public Page<StockWaitVo> getPage(StockWaitSelectDto dto) {
|
|
@@ -132,6 +136,15 @@ public class StockWaitServiceImpl extends ServiceImpl<StockWaitMapper, StockWait
|
|
Page<StockWaitVo> page = this.baseMapper.getPage(dto.getPage(), wrapper);
|
|
Page<StockWaitVo> page = this.baseMapper.getPage(dto.getPage(), wrapper);
|
|
|
|
|
|
List<StockWaitVo> records = page.getRecords();
|
|
List<StockWaitVo> records = page.getRecords();
|
|
|
|
+ if(ObjectUtil.isEmpty(records)){
|
|
|
|
+ return page;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ List<String> logisticsCompanyCodes = records.stream().map(StockWaitVo::getLogisticsCompanyCode).distinct().collect(Collectors.toList());
|
|
|
|
+ //物流公司名称map
|
|
|
|
+ Map<String, String> logisticsCompanyMap = companyInfoService.mapKV(CompanyInfo::getCode, CompanyInfo::getName,
|
|
|
|
+ q -> q.in(CompanyInfo::getCode, logisticsCompanyCodes));
|
|
|
|
+
|
|
//赋值操作人
|
|
//赋值操作人
|
|
UserUtil.assignmentNickName(records, StockWaitVo::getCreateUser, StockWaitVo::setOperatorName);
|
|
UserUtil.assignmentNickName(records, StockWaitVo::getCreateUser, StockWaitVo::setOperatorName);
|
|
//赋值仓库名称和id
|
|
//赋值仓库名称和id
|
|
@@ -159,6 +172,12 @@ public class StockWaitServiceImpl extends ServiceImpl<StockWaitMapper, StockWait
|
|
}
|
|
}
|
|
JSONObject json = JSONObject.parseObject(victoriatouristJson);
|
|
JSONObject json = JSONObject.parseObject(victoriatouristJson);
|
|
json.put("receiptWarehouseName", warehousesMap.get(json.getLong("receiptWarehouseId")));
|
|
json.put("receiptWarehouseName", warehousesMap.get(json.getLong("receiptWarehouseId")));
|
|
|
|
+
|
|
|
|
+ //重新赋值物流信息
|
|
|
|
+ json.put("logisticsCompanyName",logisticsCompanyMap.get(stockWaitVo.getLogisticsCompanyCode()));
|
|
|
|
+ json.put("logisticsCompanyCode",stockWaitVo.getLogisticsCompanyCode());
|
|
|
|
+ json.put("code",stockWaitVo.getLogisticsCode());
|
|
|
|
+
|
|
stockWaitVo.setVictoriatouristJson(JSONObject.toJSONString(json, JSONWriter.Feature.WriteLongAsString));
|
|
stockWaitVo.setVictoriatouristJson(JSONObject.toJSONString(json, JSONWriter.Feature.WriteLongAsString));
|
|
}
|
|
}
|
|
|
|
|