diff --git a/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataPricePageV2VO.java b/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataPricePageV2VO.java index 35419f81c..dab712392 100644 --- a/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataPricePageV2VO.java +++ b/blade-service-api/logpm-basicdata-api/src/main/java/com/logpm/basicdata/vo/BasicdataPricePageV2VO.java @@ -66,6 +66,18 @@ public class BasicdataPricePageV2VO implements Serializable { @ApiModelProperty(value = "修改时间") private String updateTime; + @ApiModelProperty(value = "修改人") + private String updateUser; + + @ApiModelProperty(value = "修改人id") + private String updateUserId; + + @ApiModelProperty(value = "创建人") + private String createUser; + + @ApiModelProperty(value = "创建人id") + private String createUserId; + @ApiModelProperty(value = "配送-上楼费免费楼层") private String dispatchStairsCarryingCharge; diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataPriceMapper.xml b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataPriceMapper.xml index 7b1595641..253649e52 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataPriceMapper.xml +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/mapper/BasicdataPriceMapper.xml @@ -123,6 +123,7 @@ else '' end effectiveStatus, t.update_time, + t.update_user updateUserId, t.effective_time, t.expiry_time from logpm_basicdata_store_brand lbsb @@ -177,6 +178,7 @@ else '' end effectiveStatus, t.update_time, + t.create_user createUserId, t.effective_time, t.expiry_time from logpm_basicdata_price t diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceServiceImpl.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceServiceImpl.java index afbb06221..ddf02093f 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceServiceImpl.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceServiceImpl.java @@ -108,10 +108,13 @@ import org.springblade.common.enums.BooleanZeroOneEnums; import org.springblade.common.model.IDict; import org.springblade.core.log.exception.ServiceException; import org.springblade.core.mp.base.BaseServiceImpl; +import org.springblade.core.secure.utils.AuthUtil; import org.springblade.core.tool.api.R; import org.springblade.system.entity.DictBiz; +import org.springblade.system.entity.User; import org.springblade.system.feign.IDictBizClient; import org.springblade.system.feign.ISysClient; +import org.springblade.system.feign.IUserClient; import org.springblade.system.vo.RegionAllVO; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -158,6 +161,7 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl selectBasicdataPricePage(IPage page, BasicdataPricePageVO basicdataPrice) { @@ -191,7 +195,23 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl selectBasicdataPricePageV2(IPage page, BasicdataPriceV2Query basicdataPrice) { List basicdataPriceVOS = baseMapper.selectBasicdataPricePageV2(page, basicdataPrice); if (CollUtil.isNotEmpty(basicdataPriceVOS)) { + String updateUserIds = basicdataPriceVOS.stream() + .filter(vo -> StrUtil.isNotEmpty(vo.getUpdateUserId())) + .map(BasicdataPricePageV2VO::getUpdateUserId) + .collect(Collectors.joining(",")); + R> listR = iUserClient.userInfoByIds(AuthUtil.getTenantId(), updateUserIds); + Map userMap = new HashMap<>(); + if (R.isSuccess(listR)) { + List data = listR.getData(); + for (User datum : data) { + userMap.put(Convert.toStr(datum.getId()), datum.getRealName()); + } + } for (BasicdataPricePageV2VO basicdataPriceVO : basicdataPriceVOS) { + String updateUserId = basicdataPriceVO.getUpdateUserId(); + if (StrUtil.isNotEmpty(updateUserId)) { + basicdataPriceVO.setUpdateUser(userMap.get(updateUserId)); + } // 服务类型 String serviceType = basicdataPriceVO.getServiceType(); if (StrUtil.isNotEmpty(serviceType)) { @@ -256,7 +276,23 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl basicdataPriceVOS = baseMapper.hisPageV2(page, basicdataPrice); if (CollUtil.isNotEmpty(basicdataPriceVOS)) { + String updateUserIds = basicdataPriceVOS.stream() + .filter(vo -> StrUtil.isNotEmpty(vo.getCreateUserId())) + .map(BasicdataPricePageV2VO::getCreateUserId) + .collect(Collectors.joining(",")); + R> listR = iUserClient.userInfoByIds(AuthUtil.getTenantId(), updateUserIds); + Map userMap = new HashMap<>(); + if (R.isSuccess(listR)) { + List data = listR.getData(); + for (User datum : data) { + userMap.put(Convert.toStr(datum.getId()), datum.getRealName()); + } + } for (BasicdataPricePageV2VO basicdataPriceVO : basicdataPriceVOS) { + String createUserId = basicdataPriceVO.getCreateUserId(); + if (StrUtil.isNotEmpty(createUserId)) { + basicdataPriceVO.setCreateUser(userMap.get(createUserId)); + } // 服务类型 String serviceType = basicdataPriceVO.getServiceType(); if (StrUtil.isNotEmpty(serviceType)) { @@ -921,7 +957,7 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl basicEntities = categoryBasicService.list(Wrappers.lambdaQuery().in(BasicdataPriceCategoryBasicEntity::getPriceId, priceIdSet)); List warehouseEntities = categoryWarehouseService.list(Wrappers.lambdaQuery().in(BasicdataPriceCategoryWarehouseEntity::getPriceId, priceIdSet)); List dispatchEntities = categoryDispatchService.list(Wrappers.lambdaQuery().in(BasicdataPriceCategoryDispatchEntity::getPriceId, priceIdSet)); - //价格 + 品类 + 路径 + // 价格 + 品类 + 路径 if (CollUtil.isNotEmpty(basicEntities)) { // 提货干线 有路径 + 有品类 List routeCategoryBaseList = basicEntities.stream() @@ -2130,12 +2166,6 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl routeCategoryBaseList = basicEntities.stream()