|
@@ -113,13 +113,14 @@ public class LogisticsInfoServiceImpl extends ServiceImpl<LogisticsInfoMapper, L
|
|
|
.orderByDesc("t1", ApplyPurchase::getId);
|
|
|
|
|
|
Page<LogisticsInfo> page = baseMapper.getPurchaseInStockPage(createPage(condition), wrapper);
|
|
|
- if (Func.isNotEmpty(page.getRecords())) {
|
|
|
- Map<Long, String> userNameMap = UserClientUtil.getUserNameMap(page.getRecords(), LogisticsInfo::getCreateUser);
|
|
|
- for (LogisticsInfo entity : page.getRecords()) {
|
|
|
- if (Func.isNotEmpty(userNameMap) && Func.isNotEmpty(userNameMap.get(entity.getCreateUser()))) {
|
|
|
- entity.setPurchaseName(userNameMap.get(entity.getCreateUser()));
|
|
|
- }
|
|
|
- }
|
|
|
+ List<LogisticsInfo> records = page.getRecords();
|
|
|
+ if (records.size() == 0) {
|
|
|
+ return page;
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<Long, String> userNameMap = UserClientUtil.getUserNameMap(records, LogisticsInfo::getCreateUser);
|
|
|
+ for (LogisticsInfo logisticsInfo : page.getRecords()) {
|
|
|
+ logisticsInfo.setPurchaseName(userNameMap.get(logisticsInfo.getCreateUser()));
|
|
|
}
|
|
|
|
|
|
return page;
|
|
@@ -194,7 +195,6 @@ public class LogisticsInfoServiceImpl extends ServiceImpl<LogisticsInfoMapper, L
|
|
|
* 根据采购ID查询
|
|
|
*
|
|
|
* @param purchaseIds 采购ID集合
|
|
|
- * @return
|
|
|
*/
|
|
|
@Override
|
|
|
public List<LogisticsInfo> getByPurchaseIds(List<Long> purchaseIds) {
|
|
@@ -208,7 +208,6 @@ public class LogisticsInfoServiceImpl extends ServiceImpl<LogisticsInfoMapper, L
|
|
|
* 根据采购ID查询
|
|
|
*
|
|
|
* @param purchaseIds 采购ID集合
|
|
|
- * @return
|
|
|
*/
|
|
|
@Override
|
|
|
public Map<Long, List<LogisticsInfo>> getByPurchaseIdsToMap(List<Long> purchaseIds) {
|
|
@@ -234,7 +233,6 @@ public class LogisticsInfoServiceImpl extends ServiceImpl<LogisticsInfoMapper, L
|
|
|
* 根据业务ID查询物流单号
|
|
|
*
|
|
|
* @param businessId 业务ID
|
|
|
- * @return
|
|
|
*/
|
|
|
@Override
|
|
|
public List<LogisticsInfo> codeSelectByBusinessId(Long businessId) {
|
|
@@ -314,7 +312,6 @@ public class LogisticsInfoServiceImpl extends ServiceImpl<LogisticsInfoMapper, L
|
|
|
purchase.setStatus(PurchaseStatusEnum.STATUS_40.getKey());
|
|
|
purchaseService.updateById(purchase);
|
|
|
|
|
|
-
|
|
|
}
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@@ -397,14 +394,13 @@ public class LogisticsInfoServiceImpl extends ServiceImpl<LogisticsInfoMapper, L
|
|
|
qualityDetails.setDisqualificationQuantity(BigDecimal.ZERO);
|
|
|
return qualityDetails;
|
|
|
}).collect(Collectors.toList());
|
|
|
+
|
|
|
qualityDetailsService.saveBatch(qualityDetailsList);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public Page<DataInfoPageVo> dataInfoPage(DataInfoPageDto dto) {
|
|
|
IWrapper<Object> wrapper = IWrapper.getWrapper(dto);
|
|
|
-
|
|
|
-
|
|
|
return baseMapper.dataInfoPage(dto.getPage(), wrapper);
|
|
|
}
|
|
|
|