diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataDriverArteryController.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataDriverArteryController.java index 9fab28ab2..7da08f9b2 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataDriverArteryController.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/controller/BasicdataDriverArteryController.java @@ -16,6 +16,8 @@ */ package com.logpm.basicdata.controller; +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.logpm.basicdata.dto.BasicdataDriverArteryDTO; import com.logpm.basicdata.entity.BasicdataVehicleEntity; import com.logpm.basicdata.service.IBasicdataVehicleService; @@ -116,6 +118,13 @@ public class BasicdataDriverArteryController extends BladeController { @ApiOperationSupport(order = 4) @ApiOperation(value = "新增", notes = "传入basicdataDriverArtery") public R save(@Valid @RequestBody BasicdataDriverArteryDTO basicdataDriverArtery) { + List list = basicdataDriverArteryService.list(Wrappers.query().lambda() + .eq(BasicdataDriverArteryEntity::getUserId, basicdataDriverArtery.getUserId()) + .eq(BasicdataDriverArteryEntity::getIsDeleted, 0) + ); + if(list.size() > 0){ + return R.fail("绑定的用户已存在!不要重复绑定!!!"); + } boolean save = basicdataDriverArteryService.save(basicdataDriverArtery); //加入关联表 if (null !=basicdataDriverArtery.getBindVehicles()&& save){ diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataDriverArteryClient.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataDriverArteryClient.java index ed62a3234..0ed58a383 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataDriverArteryClient.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/feign/BasicdataDriverArteryClient.java @@ -18,6 +18,7 @@ package com.logpm.basicdata.feign; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.logpm.basicdata.mapper.BasicdataDriverArteryMapper; import lombok.AllArgsConstructor; import org.springblade.core.mp.support.BladePage; @@ -56,8 +57,9 @@ public class BasicdataDriverArteryClient implements IBasicdataDriverArteryClient @Override @GetMapping(GETENTITY) public BasicdataDriverArteryEntity getDriverArtery(Long id) { - BasicdataDriverArteryEntity basicdataDriverArteryEntity = basicdataDriverArteryMapper.selectOne(new QueryWrapper().lambda() + BasicdataDriverArteryEntity basicdataDriverArteryEntity = basicdataDriverArteryMapper.selectOne(Wrappers.query().lambda() .eq(BasicdataDriverArteryEntity::getUserId,id) + .eq(BasicdataDriverArteryEntity::getIsDeleted,0) ); return basicdataDriverArteryEntity; } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignforService.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignforService.java index ee6ef0797..fbdcef33b 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignforService.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/IDistributionSignforService.java @@ -25,7 +25,6 @@ import com.logpm.distribution.vo.DistributionSignforVO; import com.logpm.distribution.excel.DistributionSignforExcel; import com.baomidou.mybatisplus.core.metadata.IPage; import com.logpm.distribution.vo.DistributionSignforsnmbVO; -import com.logpm.distribution.vo.DistributionstatisticsnmbVO; import com.logpm.distribution.vo.app.*; import org.springblade.core.mp.base.BaseService; import org.springblade.core.tool.api.R; diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java index aa4f6aecb..9efdad0c1 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java @@ -1057,8 +1057,10 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl deliveryIds = distributionDeliverySelfMapper.selectdeliveryList(driverArtery.getId()); if (deliveryIds.size() > 0) { distributionAppDeliveryListVOS = baseMapper.selectDistributionAppDeliveryListPage(page, distributionAppDeliveryListDTO, deliveryIds); @@ -1123,9 +1125,9 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl().lambda() - .in(DistributionStockEntity::getReservationId, reList) - ).intValue(); - Integer deliveryNumber = distributionAppDeliveryListVO.getDeliveryNumber(); + .in(reList.size() > 0,DistributionStockEntity::getReservationId, reList) + ).intValue(); //扫描件数 + Integer deliveryNumber = distributionAppDeliveryListVO.getDeliveryNumber(); //配送件数 if (reNub < deliveryNumber) { distributionAppDeliveryListVO.setIsstock("备货未完成"); } diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java index 971ad33bf..3513cd76e 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSignforServiceImpl.java @@ -61,6 +61,7 @@ import java.util.stream.Collectors; @Service @AllArgsConstructor public class DistributionSignforServiceImpl extends BaseServiceImpl implements IDistributionSignforService { + private final DistributionLoadscanServiceImpl distributionLoadscanService; private final DistributionLoadscaninvnServiceImpl distributionLoadscaninvnService; private final DistributionLoadscanMapper distributionLoadscanMapper; @@ -405,7 +406,9 @@ public class DistributionSignforServiceImpl extends BaseServiceImpl deliveryIds = distributionDeliverySelfMapper.selectdeliveryList(driverArtery.getId()); if (deliveryIds.size()>0){ distributionAppDeliveryListVOS = baseMapper.selectDistributionAppDeliveryInListPage(page, distributionAppDeliveryListDTO,deliveryIds);