diff --git a/blade-biz-common/src/main/java/org/springblade/common/constant/ModuleNameConstant.java b/blade-biz-common/src/main/java/org/springblade/common/constant/ModuleNameConstant.java index 1e2dbc087..d4d3b3676 100644 --- a/blade-biz-common/src/main/java/org/springblade/common/constant/ModuleNameConstant.java +++ b/blade-biz-common/src/main/java/org/springblade/common/constant/ModuleNameConstant.java @@ -8,7 +8,7 @@ public interface ModuleNameConstant { /** * 如果不需要 "" */ - public static final String DEVAUTH ="-pref"; + public static final String DEVAUTH ="-zhy"; /** * 工厂对接服务名称 diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataClientUserServiceImpl.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataClientUserServiceImpl.java index 092e0b59d..0cc4e0a16 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataClientUserServiceImpl.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataClientUserServiceImpl.java @@ -1,19 +1,26 @@ package com.logpm.basicdata.service.impl; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.logpm.basicdata.entity.BasicdataClientEntity; import com.logpm.basicdata.entity.BasicdataClientUserEntity; +import com.logpm.basicdata.entity.BasicdataStorageServicesEntity; +import com.logpm.basicdata.entity.BasicdataWarehouseEntity; import com.logpm.basicdata.mapper.BasicdataClientUserMapper; import com.logpm.basicdata.service.IBasicdataClientService; import com.logpm.basicdata.service.IBasicdataClientUserService; +import com.logpm.basicdata.service.IBasicdataStorageServicesService; +import com.logpm.basicdata.service.IBasicdataWarehouseService; import com.logpm.basicdata.vo.BasicdataClientAccountVO; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springblade.common.constant.DictBizConstant; +import org.springblade.common.exception.CustomerException; import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.secure.utils.AuthUtil; import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.ObjectUtil; +import org.springblade.core.tool.utils.StringUtil; import org.springblade.system.cache.DictBizCache; import org.springblade.system.entity.User; import org.springblade.system.entity.UserInfo; @@ -33,6 +40,10 @@ public class BasicdataClientUserServiceImpl extends BaseServiceImpl getBasicdataClientUserEntityListByUserId(Long userId) { return baseMapper.getBasicdataClientUserEntityListByUserId(userId); @@ -114,7 +125,26 @@ public class BasicdataClientUserServiceImpl extends BaseServiceImpl queryWrapper = new QueryWrapper<>(); + queryWrapper.eq("client_id",clientId) + .eq("is_deleted",0); + List storageServicesEntityList = basicdataStorageServicesService.list(queryWrapper); + if(storageServicesEntityList.size() == 0){ + throw new CustomerException(403,"该用户未配置服务仓"); + } + for (BasicdataStorageServicesEntity storageServicesEntity:storageServicesEntityList){ + Long serveWarehouseId = storageServicesEntity.getServeWarehouseId();//服务仓id + BasicdataWarehouseEntity warehouseEntity = basicdataWarehouseService.getById(serveWarehouseId); + Long department = warehouseEntity.getDepartment(); + if(StringUtil.isBlank(defaultDeptId)){ + defaultDeptId = defaultDeptId + department; + }else{ + defaultDeptId = defaultDeptId + "," + department; + } + } u.setDeptId(defaultDeptId); userClient.saveUser(u); diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java index fbc52354f..0f2d944c9 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseTrayTypeServiceImpl.java @@ -2072,20 +2072,24 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl addList = new ArrayList<>(); for (WarehouseTrayGoodsEntity trayGoodsEntity:sourceTrayGoodsList){ - Long associationId = trayGoodsEntity.getAssociationId(); String associationValue = trayGoodsEntity.getAssociationValue(); + Long marketId = trayGoodsEntity.getMarketId(); + String incomingBatch = trayGoodsEntity.getIncomingBatch(); Integer newNum = trayGoodsEntity.getNum(); QueryWrapper queryWrapper = new QueryWrapper<>(); queryWrapper.eq("association_id",associationId) .eq("association_value",associationValue) + .eq("market_id",marketId) + .eq("incoming_batch",incomingBatch) .eq("tray_type_id",trayTypeId); WarehouseTrayGoodsEntity oldTrayGoodsEntity = warehouseTrayGoodsService.getOne(queryWrapper); if(!Objects.isNull(oldTrayGoodsEntity)){ Integer num = oldTrayGoodsEntity.getNum(); oldTrayGoodsEntity.setNum(num+newNum); - addList.add(oldTrayGoodsEntity); - sourceTrayGoodsList.remove(trayGoodsEntity); + warehouseTrayGoodsService.updateById(oldTrayGoodsEntity); +// addList.add(oldTrayGoodsEntity); +// sourceTrayGoodsList.remove(trayGoodsEntity); continue; } @@ -2097,7 +2101,7 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl sourceTrayGoodsList, Long filterId, String filterValue,WarehouseTrayTypeEntity targetTrayTypeEntity) { @@ -2108,17 +2112,22 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl queryWrapper = new QueryWrapper<>(); queryWrapper.eq("association_id",associationId) .eq("association_value",associationValue) + .eq("market_id",marketId) + .eq("incoming_batch",incomingBatch) .eq("tray_type_id",trayTypeId); WarehouseTrayGoodsEntity oldTrayGoodsEntity = warehouseTrayGoodsService.getOne(queryWrapper); if(!Objects.isNull(oldTrayGoodsEntity)){ Integer num = oldTrayGoodsEntity.getNum(); oldTrayGoodsEntity.setNum(num+newNum); - addList.add(oldTrayGoodsEntity); - sourceTrayGoodsList.remove(trayGoodsEntity); + warehouseTrayGoodsService.updateById(oldTrayGoodsEntity); +// addList.add(oldTrayGoodsEntity); +// sourceTrayGoodsList.remove(trayGoodsEntity); continue; } @@ -2130,7 +2139,7 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl sourceTrayGoodsList, Long filterId, String filterValue,WarehouseTrayTypeEntity targetTrayTypeEntity) { @@ -2150,8 +2159,9 @@ public class WarehouseTrayTypeServiceImpl extends BaseServiceImpl