czh 2 жил өмнө
parent
commit
e930194036

+ 5 - 0
sckw-auth/src/main/java/com/sckw/auth/model/vo/res/LoginResVo1.java

@@ -49,6 +49,11 @@ public class LoginResVo1 implements Serializable {
      */
     private String roleName;
 
+    /**
+     * 机构名称
+     */
+    private String deptName;
+
     /**
      * 是否是企业管理(0是 1否)
      */

+ 1 - 0
sckw-auth/src/main/java/com/sckw/auth/service/impl/AuthServiceImpl.java

@@ -436,6 +436,7 @@ public class AuthServiceImpl implements IAuthService {
         loginRes.setIsMain(user.getIsMain());
         loginRes.setStatus(user.getStatus());
         loginRes.setRoleName(user.getRoleName());
+        loginRes.setDeptName(user.getDeptName());
         loginRes.setClientId(user.getClientId());
         loginRes.setEntId(user.getEntId());
         loginRes.setFirmName(enterprise != null ? enterprise.getFirmName() : null);

+ 2 - 1
sckw-modules-api/sckw-order-api/src/main/java/com/sckw/order/api/dubbo/TradeOrderStatisticsService.java

@@ -3,6 +3,7 @@ package com.sckw.order.api.dubbo;
 import com.sckw.order.api.model.TradeOrderCountStatisticsDTO;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * @desc: 贸易订单统计dubbo接口
@@ -18,5 +19,5 @@ public interface TradeOrderStatisticsService {
      * @Param topEntId:
      * @return: java.util.List<com.sckw.order.api.model.TradeOrderCountStatisticsDTO>
      */
-    List<TradeOrderCountStatisticsDTO> getOrderNumByTopEntId(Long topEntId);
+    Map<Integer, Integer> getOrderNumByTopEntId(Long topEntId);
 }

+ 5 - 0
sckw-modules-api/sckw-system-api/src/main/java/com/sckw/system/api/model/dto/res/KwsUserResDto.java

@@ -108,6 +108,11 @@ public class KwsUserResDto implements Serializable {
      */
     private String roleName;
 
+    /**
+     * 机构名称
+     */
+    private String deptName;
+
     /**
      * 企业Id
      */

+ 9 - 5
sckw-modules/sckw-contract/src/main/resources/mapper/KwcContractTradeMapper.xml

@@ -93,10 +93,12 @@
           FROM kwc_contract_trade a
           left join kwc_contract_trade_unit b on a.id = b.contract_id
          where a.`status` != 3
-           and b.ent_id in
-            <foreach collection="list" separator="," open="(" close=")" item="item">
-                #{item}
-            </foreach>
+           <if test="list != null and list.size() > 0">
+               and b.ent_id in
+               <foreach collection="list" separator="," open="(" close=")" item="item">
+                   #{item}
+               </foreach>
+           </if>
          GROUP BY b.unit_type
          union all
         SELECT b.unit_type,
@@ -104,10 +106,12 @@
           FROM kwc_contract_logistics a
           left join kwc_contract_logistics_unit b on a.id = b.contract_id
          where a.`status` != 3
-           and b.ent_id in
+        <if test="list != null and list.size() > 0">
+            and b.ent_id in
             <foreach collection="list" separator="," open="(" close=")" item="item">
                 #{item}
             </foreach>
+        </if>
          GROUP BY b.unit_type
     </select>
 

+ 6 - 1
sckw-modules/sckw-manage/src/main/java/com/sckw/manage/service/KwmCooperateApplyService.java

@@ -524,9 +524,14 @@ public class KwmCooperateApplyService {
             item.setUpdateTime(date);
             item.setApprovalRemark(remark);
             List<Integer> currentStatusList = kwmCooperateTypes.stream().map(KwmCooperateType::getStatus).toList();
-            if (type.equals(CooperateStatusEnum.OK.getCode()) || (type.equals(CooperateStatusEnum.CANCEL.getCode()) && !currentStatusList.contains(CooperateStatusEnum.OK.getCode()))) {
+            if (type.equals(CooperateStatusEnum.OK.getCode())) {
                 item.setStatus(type);
             }
+
+            if ((type.equals(CooperateStatusEnum.CANCEL.getCode()) || type.equals(CooperateStatusEnum.REFUSE.getCode())) && !currentStatusList.contains(CooperateStatusEnum.OK.getCode())) {
+                item.setStatus(type);
+            }
+
             if (kwmCooperateMapper.updateById(item) <= 0) {
                 throw new SystemException(HttpStatus.CRUD_FAIL_CODE, HttpStatus.UPDATE_FAIL);
             }

+ 21 - 7
sckw-modules/sckw-manage/src/main/java/com/sckw/manage/service/KwmCooperateManageService.java

@@ -512,6 +512,10 @@ public class KwmCooperateManageService {
             return Collections.emptyList();
         }
 
+        Long entId = reqVo.getEntId();
+        Map<Long, EntCacheResDto> entCacheResDtoMap = remoteSystemService.queryEntTreeByIds(Collections.singletonList(entId));
+        Long topId = entCacheResDtoMap.get(entId).getId();
+
         //获取合作属性
         List<Long> cooperateIdList = kwmCooperates.stream().map(KwmCooperate::getId).toList();
         LambdaQueryWrapper<KwmCooperateType> wrapper = new LambdaQueryWrapper<>();
@@ -556,9 +560,6 @@ public class KwmCooperateManageService {
             String inviteeEntName = Objects.isNull(inviteeEntCacheResDto) ? null : inviteeEntCacheResDto.getFirmName();
 
 
-            Long entId = reqVo.getEntId();
-            Map<Long, EntCacheResDto> entCacheResDtoMap = remoteSystemService.queryEntTreeByIds(Collections.singletonList(entId));
-            Long topId = entCacheResDtoMap.get(entId).getId();
             //设置合作属性
             List<KwmCooperateType> kwmCooperateTypeList = collect.get(kwmCooperate.getId());
             List<Long> userIds = kwmCooperateTypeList.stream().map(KwmCooperateType::getCreateBy).toList();
@@ -567,12 +568,24 @@ public class KwmCooperateManageService {
                 Long createBy = kwmCooperateType.getCreateBy();
                 UserCacheResDto userCacheResDto = userCacheResDtoMap.get(createBy);
                 Long id = userCacheResDto.getEntInfo().getId();
+                Integer type;
                 if (id.equals(topId)) {
-                    cooperateTypeList.add(kwmCooperateType.getType());
+                    type = kwmCooperateType.getType();
                 } else {
-                    cooperateTypeList.add(commonBusinessService.changeCooperateType(kwmCooperateType.getType()));
+                    type = commonBusinessService.changeCooperateType(kwmCooperateType.getType());
+                }
+
+                if (Objects.isNull(reqVo.getCooperateType())) {
+                    cooperateTypeList.add(type);
+                } else if (reqVo.getCooperateType().equals(type)) {
+                    cooperateTypeList.add(type);
                 }
             }
+
+            if (CollectionUtils.isEmpty(cooperateTypeList)) {
+                continue;
+            }
+
             String cooperateTypes = String.join(Global.COMMA, cooperateTypeList.stream().map(String::valueOf).distinct().toList());
             findCooperateByEntResVo.setCooperateTypes(cooperateTypes);
             //设置我方和对方企业信息、联系人
@@ -621,7 +634,7 @@ public class KwmCooperateManageService {
     public List<FindCooperateByEntResVo> findTargetEntCooperateInOur(FindCooperateByEntReqVo reqVo) {
         FindCooperateByEntReqVo param = new FindCooperateByEntReqVo();
         param.setEntId(reqVo.getTargetEntId());
-        param.setCooperateType(reqVo.getCooperateType());
+        param.setCooperateType(commonBusinessService.changeCooperateType(reqVo.getCooperateType()));
         //查对方有哪些合作单位,再筛选出我方的单位(包括我方主体单位)
         List<FindCooperateByEntResVo> cooperateByEnt = findCooperateByEnt(param);
         if (CollectionUtils.isEmpty(cooperateByEnt)) {
@@ -673,6 +686,7 @@ public class KwmCooperateManageService {
             findCooperateByEntResVo.setTargetContactsId(contactsId);
             findCooperateByEntResVo.setTargetContacts(contacts);
             findCooperateByEntResVo.setTargetPhone(phone);
+            findCooperateByEntResVo.setCooperateTypes(commonBusinessService.changeCooperateType(findCooperateByEntResVo.getCooperateTypes()));
         }
         return findCooperateByEntResVos;
     }
@@ -768,7 +782,7 @@ public class KwmCooperateManageService {
             queryAllCooperateInfoResVo.setCreateTime(item.getCreateTime());
 
             UserCacheResDto userCacheResDto = userCacheResDtoMap.get(item.getCreateBy());
-            queryAllCooperateInfoResVo.setCreateByName(Objects.nonNull(userCacheResDto) ? userCacheResDto.getName(): "");
+            queryAllCooperateInfoResVo.setCreateByName(Objects.nonNull(userCacheResDto) ? userCacheResDto.getName() : "");
             queryAllCooperateInfoResVo.setPhone(Objects.nonNull(userCacheResDto) ? userCacheResDto.getPhone() : "");
             queryAllCooperateInfoResVo.setUpdateTime(item.getUpdateTime());
             queryAllCooperateInfoResVo.setRemark(item.getRemark());

+ 8 - 8
sckw-modules/sckw-manage/src/main/resources/mapper/KwmCooperateMapper.xml

@@ -121,14 +121,14 @@
                 </if>
                 ))
 
-            <if test="cooperateType != null">
-                and exists (select 1
-                              from kwm_cooperate_type c
-                             where c.cooperate_id = a.id
-                               and c.del_flag = 0
-                               and c.type = #{cooperateType}
-                            )
-            </if>
+<!--            <if test="cooperateType != null">-->
+<!--                and exists (select 1-->
+<!--                              from kwm_cooperate_type c-->
+<!--                             where c.cooperate_id = a.id-->
+<!--                               and c.del_flag = 0-->
+<!--                               and c.type = #{cooperateType}-->
+<!--                            )-->
+<!--            </if>-->
     </select>
 
     <select id="findManageList" resultType="com.sckw.manage.model.dto.res.CooperateManageQueryResDto">

+ 12 - 5
sckw-modules/sckw-order/src/main/java/com/sckw/order/dubbo/TradeOrderStatisticsServiceImpl.java

@@ -1,5 +1,6 @@
 package com.sckw.order.dubbo;
 
+import com.sckw.core.model.constant.Global;
 import com.sckw.core.utils.CollectionUtils;
 import com.sckw.order.api.dubbo.TradeOrderStatisticsService;
 import com.sckw.order.api.model.TradeOrderCountStatisticsDTO;
@@ -10,7 +11,9 @@ import lombok.extern.slf4j.Slf4j;
 import org.apache.dubbo.config.annotation.DubboService;
 
 import java.util.Collections;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 /**
  * @desc: 贸易订单统计dubbo接口实现
@@ -25,14 +28,18 @@ public class TradeOrderStatisticsServiceImpl implements TradeOrderStatisticsServ
     private final KwoTradeOrderService kwoTradeOrderService;
 
     @Override
-    public List<TradeOrderCountStatisticsDTO> getOrderNumByTopEntId(Long topEntId) {
+    public Map<Integer, Integer> getOrderNumByTopEntId(Long topEntId) {
+        Map<Integer, Integer> map = new HashMap<>(Global.NUMERICAL_FOUR);
+        map.put(Global.NUMERICAL_ONE, Global.NUMERICAL_ZERO);
+        map.put(Global.NUMERICAL_TWO, Global.NUMERICAL_ZERO);
         List<TradeOrderCountStatisticsDTO> list = kwoTradeOrderService.getOrderNumByTopEntId(topEntId);
         if (CollectionUtils.isEmpty(list)) {
-            return Collections.emptyList();
+            return map;
         }
-        list.forEach(e -> {
-            e.setName(OrderTypeEnum.getLabel(e.getOrderType()));
+
+        list.forEach(item -> {
+            map.put(item.getOrderType(), item.getNum());
         });
-        return list;
+        return map;
     }
 }

+ 80 - 81
sckw-modules/sckw-report/src/main/java/com/sckw/report/service/KwWorkService.java

@@ -4,6 +4,7 @@ import com.sckw.contract.api.RemoteContractService;
 import com.sckw.core.model.constant.Global;
 import com.sckw.core.model.enums.CooperateTypeEnum;
 import com.sckw.core.model.enums.EntTypeEnum;
+import com.sckw.core.model.enums.SystemTypeEnum;
 import com.sckw.core.utils.CollectionUtils;
 import com.sckw.core.web.context.LoginUserHolder;
 import com.sckw.order.api.dubbo.TradeOrderStatisticsService;
@@ -53,76 +54,77 @@ public class KwWorkService {
      * @date: 2023/9/11
      */
     public List<QueryBusinessStatisticsResVo> queryBusinessStatistics() {
-        EntCacheResDto entCacheResDto = remoteSystemService.queryEntCacheById(LoginUserHolder.getEntId());
-        if(Objects.isNull(entCacheResDto)) {
-            return Collections.emptyList();
+        boolean isSystem = LoginUserHolder.getSystemType().equals(SystemTypeEnum.MANAGE.getCode());
+        Long entId = null;
+        String entTypes = "";
+
+        if (!isSystem) {
+            EntCacheResDto entCacheResDto = remoteSystemService.queryEntCacheById(LoginUserHolder.getEntId());
+            if (Objects.isNull(entCacheResDto)) {
+                return Collections.emptyList();
+            }
+            entId = entCacheResDto.getId();
+            entTypes = entCacheResDto.getEntTypes();
         }
-
-        String entTypes = entCacheResDto.getEntTypes();
         //承运
-        Boolean hasCarrier = entTypes.contains(String.valueOf(EntTypeEnum.LOGISTICS4.getCode())) || entTypes.contains(String.valueOf(EntTypeEnum.LOGISTICS3.getCode()));
+        boolean hasCarrier = entTypes.contains(String.valueOf(EntTypeEnum.LOGISTICS4.getCode())) || entTypes.contains(String.valueOf(EntTypeEnum.LOGISTICS3.getCode()));
         //托运
-        Boolean hasCheck = entTypes.contains(String.valueOf(EntTypeEnum.LOGISTICS3.getCode()));
+        boolean hasCheck = entTypes.contains(String.valueOf(EntTypeEnum.LOGISTICS3.getCode()));
         //采购
-        Boolean hasPurchase = entTypes.contains(String.valueOf(EntTypeEnum.PURCHASER.getCode()));
+        boolean hasPurchase = entTypes.contains(String.valueOf(EntTypeEnum.PURCHASER.getCode()));
         //供应
-        Boolean hasSupplier = entTypes.contains(String.valueOf(EntTypeEnum.SUPPLIER.getCode()));
+        boolean hasSupplier = entTypes.contains(String.valueOf(EntTypeEnum.SUPPLIER.getCode()));
 
         List<QueryBusinessStatisticsResVo> list = new ArrayList<>();
         //合同部分
-        Map<Integer, Integer> contractMap = remoteContractService.queryContractValidCount(entCacheResDto.getId());
-        if (!contractMap.isEmpty()) {
-            if (hasPurchase) {
-                QueryBusinessStatisticsResVo queryBusinessStatisticsResVo = new QueryBusinessStatisticsResVo();
-                queryBusinessStatisticsResVo.setType("采购合同");
-                queryBusinessStatisticsResVo.setNum(contractMap.getOrDefault(CooperateTypeEnum.PURCHASER.getCode(), Global.NUMERICAL_ZERO));
-                list.add(queryBusinessStatisticsResVo);
-            }
+        Map<Integer, Integer> contractMap = remoteContractService.queryContractValidCount(entId);
+        if (hasPurchase || isSystem) {
+            QueryBusinessStatisticsResVo queryBusinessStatisticsResVo = new QueryBusinessStatisticsResVo();
+            queryBusinessStatisticsResVo.setType("采购合同");
+            queryBusinessStatisticsResVo.setNum(contractMap.getOrDefault(CooperateTypeEnum.PURCHASER.getCode(), Global.NUMERICAL_ZERO));
+            list.add(queryBusinessStatisticsResVo);
+        }
 
-            if (hasSupplier) {
-                QueryBusinessStatisticsResVo queryBusinessStatisticsResVo = new QueryBusinessStatisticsResVo();
-                queryBusinessStatisticsResVo.setType("销售合同");
-                queryBusinessStatisticsResVo.setNum(contractMap.getOrDefault(CooperateTypeEnum.SUPPLIER.getCode(), Global.NUMERICAL_ZERO));
-                list.add(queryBusinessStatisticsResVo);
-            }
+        if (hasSupplier || isSystem) {
+            QueryBusinessStatisticsResVo queryBusinessStatisticsResVo = new QueryBusinessStatisticsResVo();
+            queryBusinessStatisticsResVo.setType("销售合同");
+            queryBusinessStatisticsResVo.setNum(contractMap.getOrDefault(CooperateTypeEnum.SUPPLIER.getCode(), Global.NUMERICAL_ZERO));
+            list.add(queryBusinessStatisticsResVo);
+        }
 
-            if (hasCarrier) {
-                QueryBusinessStatisticsResVo queryBusinessStatisticsResVo = new QueryBusinessStatisticsResVo();
-                queryBusinessStatisticsResVo.setType("承运合同");
-                queryBusinessStatisticsResVo.setNum(contractMap.getOrDefault(CooperateTypeEnum.CARRIAGE.getCode(), Global.NUMERICAL_ZERO));
-                list.add(queryBusinessStatisticsResVo);
-            }
+        if (hasCarrier || isSystem) {
+            QueryBusinessStatisticsResVo queryBusinessStatisticsResVo = new QueryBusinessStatisticsResVo();
+            queryBusinessStatisticsResVo.setType("承运合同");
+            queryBusinessStatisticsResVo.setNum(contractMap.getOrDefault(CooperateTypeEnum.CARRIAGE.getCode(), Global.NUMERICAL_ZERO));
+            list.add(queryBusinessStatisticsResVo);
+        }
 
-            if (hasCheck) {
-                QueryBusinessStatisticsResVo queryBusinessStatisticsResVo = new QueryBusinessStatisticsResVo();
-                queryBusinessStatisticsResVo.setType("托运合同");
-                queryBusinessStatisticsResVo.setNum(contractMap.getOrDefault(CooperateTypeEnum.CONSIGN.getCode(), Global.NUMERICAL_ZERO));
-                list.add(queryBusinessStatisticsResVo);
-            }
+        if (hasCheck || isSystem) {
+            QueryBusinessStatisticsResVo queryBusinessStatisticsResVo = new QueryBusinessStatisticsResVo();
+            queryBusinessStatisticsResVo.setType("托运合同");
+            queryBusinessStatisticsResVo.setNum(contractMap.getOrDefault(CooperateTypeEnum.CONSIGN.getCode(), Global.NUMERICAL_ZERO));
+            list.add(queryBusinessStatisticsResVo);
         }
 
         //订单部分
-        List<TradeOrderCountStatisticsDTO> orderNumByTopEntId = tradeOrderStatisticsService.getOrderNumByTopEntId(entCacheResDto.getId());
-        if (CollectionUtils.isNotEmpty(orderNumByTopEntId)) {
-            Map<Integer, Integer> collect = orderNumByTopEntId.stream().collect(Collectors.toMap(TradeOrderCountStatisticsDTO::getOrderType, TradeOrderCountStatisticsDTO::getNum, (o, n) -> n));
-            if (hasSupplier) {
-                QueryBusinessStatisticsResVo queryBusinessStatisticsResVo = new QueryBusinessStatisticsResVo();
-                queryBusinessStatisticsResVo.setType("销售订单");
-                queryBusinessStatisticsResVo.setNum(collect.getOrDefault(Global.NUMERICAL_TWO, Global.NUMERICAL_ZERO));
-                list.add(queryBusinessStatisticsResVo);
-            }
+        Map<Integer, Integer> orderNumByTopEntId = tradeOrderStatisticsService.getOrderNumByTopEntId(entId);
+        if (hasSupplier || isSystem) {
+            QueryBusinessStatisticsResVo queryBusinessStatisticsResVo = new QueryBusinessStatisticsResVo();
+            queryBusinessStatisticsResVo.setType("销售订单");
+            queryBusinessStatisticsResVo.setNum(orderNumByTopEntId.get(Global.NUMERICAL_TWO));
+            list.add(queryBusinessStatisticsResVo);
+        }
 
-            if (hasPurchase) {
-                QueryBusinessStatisticsResVo queryBusinessStatisticsResVo = new QueryBusinessStatisticsResVo();
-                queryBusinessStatisticsResVo.setType("采购订单");
-                queryBusinessStatisticsResVo.setNum(collect.getOrDefault(Global.NUMERICAL_ONE, Global.NUMERICAL_ZERO));
-                list.add(queryBusinessStatisticsResVo);
-            }
+        if (hasPurchase || isSystem) {
+            QueryBusinessStatisticsResVo queryBusinessStatisticsResVo = new QueryBusinessStatisticsResVo();
+            queryBusinessStatisticsResVo.setType("采购订单");
+            queryBusinessStatisticsResVo.setNum(orderNumByTopEntId.get(Global.NUMERICAL_ONE));
+            list.add(queryBusinessStatisticsResVo);
         }
 
         //承运订单
-        Integer integer = transportStatisticsService.statisticsLogistics(entCacheResDto.getId());
-        if (hasCarrier) {
+        Integer integer = transportStatisticsService.statisticsLogistics(entId);
+        if (hasCarrier || isSystem) {
             QueryBusinessStatisticsResVo queryBusinessStatisticsResVo = new QueryBusinessStatisticsResVo();
             queryBusinessStatisticsResVo.setType("承运订单");
             queryBusinessStatisticsResVo.setNum(Objects.isNull(integer) ? Global.NUMERICAL_ZERO : integer);
@@ -130,44 +132,41 @@ public class KwWorkService {
         }
 
         //托运订单
-        Integer integer1 = transportStatisticsService.statisticsPendingVerificationWaybill(entCacheResDto.getId());
-        if (hasCheck) {
+        Integer integer1 = transportStatisticsService.statisticsPendingVerificationWaybill(entId);
+        if (hasCheck || isSystem) {
             QueryBusinessStatisticsResVo queryBusinessStatisticsResVo = new QueryBusinessStatisticsResVo();
             queryBusinessStatisticsResVo.setType("托运订单");
             queryBusinessStatisticsResVo.setNum(Objects.isNull(integer1) ? Global.NUMERICAL_ZERO : integer1);
             list.add(queryBusinessStatisticsResVo);
         }
 
-        LedgerCount ledgerCount = paymentDubboService.countLedger(entCacheResDto.getId());
-        if (Objects.nonNull(ledgerCount)) {
-
-            if (hasSupplier) {
-                QueryBusinessStatisticsResVo queryBusinessStatisticsResVo = new QueryBusinessStatisticsResVo();
-                queryBusinessStatisticsResVo.setType("销售对账");
-                queryBusinessStatisticsResVo.setNum(Objects.isNull(ledgerCount.getSell()) ? Global.NUMERICAL_ZERO : ledgerCount.getSell());
-                list.add(queryBusinessStatisticsResVo);
-            }
+        LedgerCount ledgerCount = paymentDubboService.countLedger(entId);
+        if (hasSupplier || isSystem) {
+            QueryBusinessStatisticsResVo queryBusinessStatisticsResVo = new QueryBusinessStatisticsResVo();
+            queryBusinessStatisticsResVo.setType("销售对账");
+            queryBusinessStatisticsResVo.setNum(Objects.isNull(ledgerCount.getSell()) ? Global.NUMERICAL_ZERO : ledgerCount.getSell());
+            list.add(queryBusinessStatisticsResVo);
+        }
 
-            if (hasPurchase) {
-                QueryBusinessStatisticsResVo queryBusinessStatisticsResVo = new QueryBusinessStatisticsResVo();
-                queryBusinessStatisticsResVo.setType("采购对账");
-                queryBusinessStatisticsResVo.setNum(Objects.isNull(ledgerCount.getPurchase()) ? Global.NUMERICAL_ZERO : ledgerCount.getPurchase());
-                list.add(queryBusinessStatisticsResVo);
-            }
+        if (hasPurchase || isSystem) {
+            QueryBusinessStatisticsResVo queryBusinessStatisticsResVo = new QueryBusinessStatisticsResVo();
+            queryBusinessStatisticsResVo.setType("采购对账");
+            queryBusinessStatisticsResVo.setNum(Objects.isNull(ledgerCount.getPurchase()) ? Global.NUMERICAL_ZERO : ledgerCount.getPurchase());
+            list.add(queryBusinessStatisticsResVo);
+        }
 
-            if (hasCarrier) {
-                QueryBusinessStatisticsResVo queryBusinessStatisticsResVo = new QueryBusinessStatisticsResVo();
-                queryBusinessStatisticsResVo.setType("承运对账");
-                queryBusinessStatisticsResVo.setNum(Objects.isNull(ledgerCount.getCarrier()) ? Global.NUMERICAL_ZERO : ledgerCount.getCarrier());
-                list.add(queryBusinessStatisticsResVo);
-            }
+        if (hasCarrier || isSystem) {
+            QueryBusinessStatisticsResVo queryBusinessStatisticsResVo = new QueryBusinessStatisticsResVo();
+            queryBusinessStatisticsResVo.setType("承运对账");
+            queryBusinessStatisticsResVo.setNum(Objects.isNull(ledgerCount.getCarrier()) ? Global.NUMERICAL_ZERO : ledgerCount.getCarrier());
+            list.add(queryBusinessStatisticsResVo);
+        }
 
-            if (hasCheck) {
-                QueryBusinessStatisticsResVo queryBusinessStatisticsResVo = new QueryBusinessStatisticsResVo();
-                queryBusinessStatisticsResVo.setType("托运对账");
-                queryBusinessStatisticsResVo.setNum(Objects.isNull(ledgerCount.getShipper()) ? Global.NUMERICAL_ZERO : ledgerCount.getShipper());
-                list.add(queryBusinessStatisticsResVo);
-            }
+        if (hasCheck || isSystem) {
+            QueryBusinessStatisticsResVo queryBusinessStatisticsResVo = new QueryBusinessStatisticsResVo();
+            queryBusinessStatisticsResVo.setType("托运对账");
+            queryBusinessStatisticsResVo.setNum(Objects.isNull(ledgerCount.getShipper()) ? Global.NUMERICAL_ZERO : ledgerCount.getShipper());
+            list.add(queryBusinessStatisticsResVo);
         }
         return list;
     }