Просмотр исходного кода

1、运需求购查询/导出接口匹配运营端;

zk 2 лет назад
Родитель
Сommit
18f140b4c8

+ 3 - 1
sckw-modules/sckw-order/src/main/java/com/sckw/order/serivce/KwoTransportDemandService.java

@@ -9,6 +9,7 @@ import com.sckw.core.common.enums.enums.DictEnum;
 import com.sckw.core.common.enums.enums.DictTypeEnum;
 import com.sckw.core.exception.BusinessException;
 import com.sckw.core.model.constant.Global;
+import com.sckw.core.model.enums.SystemTypeEnum;
 import com.sckw.core.model.page.PageResult;
 import com.sckw.core.model.vo.TableBottom;
 import com.sckw.core.model.vo.TableStatisticRes;
@@ -210,8 +211,9 @@ public class KwoTransportDemandService {
      * @return: com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper<com.sckw.order.model.KwoTransportDemand>
      */
     private LambdaQueryWrapper<KwoTransportDemand> buildWrapper(ExportTransportDemandParam param) {
+        Long entId = LoginUserHolder.getSystemType() != SystemTypeEnum.MANAGE.getCode() ? LoginUserHolder.getEntId() : null;
         LambdaQueryWrapper<KwoTransportDemand> wrapper = new LambdaQueryWrapper<>();
-        wrapper.eq(KwoTransportDemand::getEntId, LoginUserHolder.getEntId()).eq(KwoTransportDemand::getDelFlag, Global.NO);
+        wrapper.eq(KwoTransportDemand::getEntId, entId).eq(KwoTransportDemand::getDelFlag, Global.NO);
         if (StringUtils.isNotBlank(param.getIds())) {
             List<Long> ids = StringUtils.splitStrToList(param.getIds(), ",", Long.class);
             wrapper.in(KwoTransportDemand::getId, ids).orderByDesc(KwoTransportDemand::getCreateTime);

+ 4 - 4
sckw-modules/sckw-order/src/main/java/com/sckw/order/serivce/KwpWantBuyService.java

@@ -8,6 +8,7 @@ import com.sckw.core.common.enums.enums.DictEnum;
 import com.sckw.core.common.enums.enums.DictTypeEnum;
 import com.sckw.core.exception.BusinessException;
 import com.sckw.core.model.constant.Global;
+import com.sckw.core.model.enums.SystemTypeEnum;
 import com.sckw.core.model.page.PageRes;
 import com.sckw.core.model.vo.TableBottom;
 import com.sckw.core.model.vo.TableStatisticRes;
@@ -131,7 +132,6 @@ public class KwpWantBuyService {
      * @Date 11:50 2023/8/1 0001
      **/
     public PageRes<WantBuySelectRes> select(WantBuySelectParam wantBuySelectParam) {
-
         if (StringUtils.isNotBlank(wantBuySelectParam.getTrading())) {
             List<String> longList = stringToLongList(wantBuySelectParam.getTrading());
             wantBuySelectParam.setTradings(longList);
@@ -142,7 +142,7 @@ public class KwpWantBuyService {
             List<String> goodsTypes = goodsTypeHandle(wantBuySelectParam);
             wantBuySelectParam.setGoodsTypeValueSearch(goodsTypes);
         }
-        wantBuySelectParam.setEntId(LoginUserHolder.getEntId());
+        wantBuySelectParam.setEntId(LoginUserHolder.getSystemType() != SystemTypeEnum.MANAGE.getCode() ? LoginUserHolder.getEntId() : null);
         PageHelper.startPage(wantBuySelectParam.getPage(), wantBuySelectParam.getPageSize());
         List<WantBuySelectRes> wantBuyDto = kwpWantBuyMapper.pageSelect(wantBuySelectParam);
         if (CollectionUtils.isEmpty(wantBuyDto)) {
@@ -444,7 +444,7 @@ public class KwpWantBuyService {
             List<String> goodsTypes = goodsTypeHandle(params);
             params.setGoodsTypeValueSearch(goodsTypes);
         }
-        params.setEntId(LoginUserHolder.getEntId());
+        params.setEntId(LoginUserHolder.getSystemType() != SystemTypeEnum.MANAGE.getCode() ? LoginUserHolder.getEntId() : null);
         List<WantBuySelectRes> result = kwpWantBuyMapper.pageSelect(params);
         Map<Integer, List<WantBuySelectRes>> map = result.stream().collect(Collectors.groupingBy(WantBuySelectRes::getStatus));
         List<TableTop> tableTops = new ArrayList<>();
@@ -483,7 +483,7 @@ public class KwpWantBuyService {
                 selectParam.setGoodsTypeValueSearch(goodsTypes);
             }
         }
-        selectParam.setEntId(LoginUserHolder.getEntId());
+        selectParam.setEntId(LoginUserHolder.getSystemType() != SystemTypeEnum.MANAGE.getCode() ? LoginUserHolder.getEntId() : null);
         List<WantBuySelectRes> wantBuyDto = kwpWantBuyMapper.pageSelect(selectParam);
         if (CollectionUtils.isEmpty(wantBuyDto)) {
             return Collections.emptyList();