Browse Source

Merge branch 'dev' into pre-production

newStockUp
pref_mail@163.com 1 year ago
parent
commit
a4b4786a0a
  1. 8
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockupController.java
  2. 3
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockupService.java
  3. 11
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java

8
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionStockupController.java

@ -18,6 +18,7 @@ package com.logpm.distribution.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
import com.logpm.basicdata.feign.IBasicdataWarehouseClient;
import com.logpm.distribution.entity.DistributionStockupEntity;
import com.logpm.distribution.excel.DistributionCityExcel;
@ -203,13 +204,8 @@ public class DistributionStockupController extends BladeController {
@ApiOperationSupport(order = 2)
@ApiOperation(value = "查询备货人员信息", notes = "传入distributionStockup")
public R<List<User>> listUser() {
//获取当前登录用户
BladeUser user = AuthUtil.getUser();
//查询备货岗位
List<User> cc = distributionStockupService.getRoleList(user.getDeptId(), user.getTenantId());
List<User> cc = distributionStockupService.getRoleList();
// List<User> cc = distributionStockupService.getRoleList(user.getDeptId(), user.getTenantId(), "叉车");
return R.data(cc);
}

3
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionStockupService.java

@ -216,9 +216,10 @@ public interface IDistributionStockupService extends BaseService<DistributionSto
List<DistributionStockupTrayVO> getLocationMarketSelectionOrder(StockupDTO stockupDTO);
/**
* 查询备货人员
* @return
*/
List<User> getRoleList(String deptId, String tenantId);
List<User> getRoleList();
/**
* 修改备货任务的备货区

11
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java

@ -2318,20 +2318,26 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
* @return
*/
@Override
public List<User> getRoleList(String deptId, String tenantId) {
public List<User> getRoleList() {
//获取当前登录用户
BladeUser user = AuthUtil.getUser();
String tenantId = user.getTenantId();
// String deptId = user.getDeptId();
//查询备货岗位
List<DictBiz> warehouseType = DictBizCache.getList("stock_personnel");
if (warehouseType.isEmpty()) {
throw new ServiceException("注意,注意!拣货人员字典未配置!请配置!");
} else {
List<String> stringList = new ArrayList<>();
warehouseType.stream().forEach(i -> {
//查询这个角色ID
R<String> roleId = sysClient.getRoleIds(tenantId, i.getDictValue());
if (ObjectUtils.isNotNull(roleId.getData())) {
stringList.add(roleId.getData());
}
});
String roleIds = stringList.stream().collect(Collectors.joining(","));
R<List<User>> listR = userSearchClient.listByRole(roleIds);
R<List<User>> listR = userSearchClient.listByRole(roleIds); //查询角色下的所有人员数据
BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse();
//有没有选择仓库信息
if (ObjectUtils.isNotNull(myCurrentWarehouse)) {
@ -2950,6 +2956,7 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl<Distribution
DistributionStockListEntity distributionStockListEntity = distributionStockListMapper.selectOne(Wrappers.<DistributionStockListEntity>query().lambda()
.eq(DistributionStockListEntity::getIncomingBatch, byId.getOrderCode())
.eq(DistributionStockListEntity::getWarehouseId,myCurrentWarehouse.getId())
.eq(DistributionStockListEntity::getCargoNumber,stockupDTO.getCargoNumber())
);
if(ObjectUtils.isNull(distributionStockListEntity)){
return R.fail("该包件不是库存品!");

Loading…
Cancel
Save