Browse Source

Merge branch 'dev' into pre-production

pre-production
zhaoqiaobo 1 week ago
parent
commit
9c32a54779
  1. 1
      blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/controller/ExpenseDispatchPriceServiceController.java
  2. 13
      blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/controller/ExpenseDispatchPriceTemplateController.java

1
blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/controller/ExpenseDispatchPriceServiceController.java

@ -150,6 +150,7 @@ public class ExpenseDispatchPriceServiceController extends BladeController {
List<ExpenseDispatchPriceServiceEntity> list = expenseDispatchPriceServiceService.list();
if (CollUtil.isNotEmpty(list)) {
Set<Long> collect = list.stream()
.filter(item -> ObjectUtil.isNotEmpty(item.getDriverId()))
.filter(item -> !item.getDriverId().equals(byId.getDriverId()))
.map(ExpenseDispatchPriceServiceEntity::getDriverId).collect(Collectors.toSet());
if (collect.contains(expenseDispatchPriceService.getDriverId())) {

13
blade-service/logpm-statisticsdata/src/main/java/com/logpm/statistics/controller/ExpenseDispatchPriceTemplateController.java

@ -16,13 +16,17 @@
*/
package com.logpm.statistics.controller;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.convert.Convert;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.logpm.statistics.entity.ExpenseDispatchPriceServiceEntity;
import com.logpm.statistics.entity.ExpenseDispatchPriceTemplateEntity;
import com.logpm.statistics.excel.ExpenseDispatchPriceTemplateExcel;
import com.logpm.statistics.query.ExpenseDispatchPriceTemplateQuery;
import com.logpm.statistics.service.IExpenseDispatchPriceServiceService;
import com.logpm.statistics.service.IExpenseDispatchPriceTemplateService;
import com.logpm.statistics.vo.ExpenseDispatchPriceTemplateVO;
import com.logpm.statistics.wrapper.ExpenseDispatchPriceTemplateWrapper;
@ -65,6 +69,7 @@ import java.util.Map;
public class ExpenseDispatchPriceTemplateController extends BladeController {
private final IExpenseDispatchPriceTemplateService expenseDispatchPriceTemplateService;
private final IExpenseDispatchPriceServiceService expenseDispatchPriceServiceService;
/**
* 成本配送价格模版 详情
@ -136,7 +141,13 @@ public class ExpenseDispatchPriceTemplateController extends BladeController {
@ApiOperationSupport(order = 7)
@ApiOperation(value = "逻辑删除", notes = "传入ids")
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
return R.status(expenseDispatchPriceTemplateService.deleteLogic(Func.toLongList(ids)));
List<ExpenseDispatchPriceServiceEntity> list = expenseDispatchPriceServiceService.list(Wrappers.<ExpenseDispatchPriceServiceEntity>lambdaQuery()
.in(ExpenseDispatchPriceServiceEntity::getTemplateId, Func.toLong(ids)));
if(CollUtil.isNotEmpty(list)){
return R.fail("选择的模版存在绑定的服务商,不能删除");
}
boolean b = expenseDispatchPriceTemplateService.deleteLogic(Func.toLongList(ids));
return R.status(b);
}

Loading…
Cancel
Save