Browse Source

增加跳单夹

single_db
汤建军 10 months ago
parent
commit
8f707f8112
  1. 2
      blade-biz-common/src/main/java/org/springblade/common/constant/ModuleNameConstant.java
  2. 25
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionReservationController.java

2
blade-biz-common/src/main/java/org/springblade/common/constant/ModuleNameConstant.java

@ -8,7 +8,7 @@ public interface ModuleNameConstant {
/**
* 如果不需要 ""
*/
public static final String DEVAUTH ="";
public static final String DEVAUTH ="-tjj";
/**
* 工厂对接服务名称

25
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionReservationController.java

@ -16,6 +16,7 @@
*/
package com.logpm.distribution.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
@ -32,6 +33,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import org.springblade.common.constant.reservation.ReservationStatusConstant;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.excel.util.ExcelUtil;
import org.springblade.core.mp.support.Condition;
@ -84,18 +86,37 @@ public class DistributionReservationController extends BladeController {
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入distrbutionReservation")
public R<IPage<DistributionReservationVO>> list(@ApiIgnore @RequestParam Map<String, Object> distrbutionReservation, Query query) {
String excludeId = (String) distrbutionReservation.get("excludeId");
if (Func.isNotEmpty(excludeId)){
distrbutionReservation.remove("excludeId");
}
QueryWrapper<DistributionReservationEntity> queryWrapper = Condition.getQueryWrapper(distrbutionReservation, DistributionReservationEntity.class);
//获取当前登录人仓库
List<BasicdataWarehouseEntity> myWatchWarehouse = basicdataWarehouseClient.getMyWatchWarehouse();
List<Long> collect = myWatchWarehouse.stream()
.map(BasicdataWarehouseEntity::getId)
.collect(Collectors.toList());
queryWrapper.lambda().in(collect.size()>0,DistributionReservationEntity::getWarehouseId,collect);
IPage<DistributionReservationEntity> pages = reservationService.page(Condition.getPage(query),queryWrapper );
LambdaQueryWrapper<DistributionReservationEntity> lambda = queryWrapper.lambda();
lambda.in(collect.size()>0,DistributionReservationEntity::getWarehouseId,collect);
if (Func.isNotBlank(excludeId)){
List<Long> ids = Func.toLongList(",", excludeId);
lambda.notIn(DistributionReservationEntity::getId,ids);
}
IPage<DistributionReservationEntity> pages = reservationService.page(Condition.getPage(query),lambda );
return R.data(DistributionReservationWrapper.build().pageVO(pages));
}
@GetMapping("/isDelivery")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入distrbutionReservation")
public Boolean isDelivery(@RequestParam String ids) {
List<Long> list = Func.toLongList(ids);
List<DistributionReservationEntity> distributionReservationEntities = reservationService.listByIds(list);
return distributionReservationEntities.stream().anyMatch(distributionReservationEntity -> distributionReservationEntity.getReservationStatus() == ReservationStatusConstant.daipeisong.getValue());
}
/**
* 商场客户预约列表 分页
*/

Loading…
Cancel
Save