Преглед на файлове

Merge remote-tracking branch 'origin/dev' into dev

lengfaqiang преди 2 години
родител
ревизия
a433fd029f

+ 9 - 0
sckw-modules-api/sckw-manage-api/src/main/java/com/sckw/manage/api/RemoteManageService.java

@@ -31,4 +31,13 @@ public interface RemoteManageService {
      */
     List<FindEntCooperateResVo> findEntCooperate(Long entId, Long targetEntId, Integer cooperateType);
 
+    /**
+     * @param entId 集团企业id
+     * @return FindEntCooperateResVo
+     * @desc: 查询集团企业包括其主体单位下的合作单位所属的集团企业
+     * @author: czh
+     * @date: 2023/9/1
+     */
+    List<FindEntCooperateResVo> findAllCooperateEnt(Long entId);
+
 }

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

@@ -95,4 +95,9 @@ public class EntCacheResDto implements Serializable {
      */
     private String cityName;
 
+    /**
+     * 联系人id
+     */
+    private Long contactsId;
+
 }

+ 6 - 0
sckw-modules/sckw-contract/src/main/java/com/sckw/contract/dubbo/RemoteContractServiceImpl.java

@@ -75,6 +75,9 @@ public class RemoteContractServiceImpl implements RemoteContractService {
     public void updatePerformed(Long contractId, BigDecimal performedAmount) {
         KwcContractLogistics kwcContractLogistics = kwcContractLogisticsMapper.selectById(contractId);
         if (Objects.nonNull(kwcContractLogistics)) {
+            if (kwcContractLogistics.getStatus().equals(ContractStatusEnum.COMPLETE.getCode())) {
+                return;
+            }
             kwcContractLogistics.setPerformedAmount(kwcContractLogistics.getPerformedAmount().add(performedAmount));
             kwcContractLogisticsMapper.updateById(kwcContractLogistics);
             return;
@@ -82,6 +85,9 @@ public class RemoteContractServiceImpl implements RemoteContractService {
 
         KwcContractTrade kwcContractTrade = kwcContractTradeMapper.selectById(contractId);
         if (Objects.nonNull(kwcContractTrade)) {
+            if (kwcContractTrade.getStatus().equals(ContractStatusEnum.COMPLETE.getCode())) {
+                return;
+            }
             kwcContractTrade.setPerformedAmount(kwcContractTrade.getPerformedAmount().add(performedAmount));
             kwcContractTradeMapper.updateById(kwcContractTrade);
         }

+ 63 - 4
sckw-modules/sckw-manage/src/main/java/com/sckw/manage/dubbo/RemoteManageServiceImpl.java

@@ -9,16 +9,19 @@ import com.sckw.manage.api.model.dto.res.EntAddressResDto;
 import com.sckw.manage.api.model.dto.res.FindEntCooperateResVo;
 import com.sckw.manage.dao.KwmAddressMapper;
 import com.sckw.manage.model.entity.KwmAddress;
+import com.sckw.manage.model.entity.KwmCooperate;
+import com.sckw.manage.model.vo.req.FindCooperateByEntReqVo;
 import com.sckw.manage.model.vo.req.FindEntCooperateReqVo;
+import com.sckw.manage.model.vo.res.FindCooperateByEntResVo;
 import com.sckw.manage.service.KwmCooperateManageService;
+import com.sckw.system.api.RemoteSystemService;
+import com.sckw.system.api.model.dto.res.EntCacheResDto;
+import org.apache.dubbo.config.annotation.DubboReference;
 import org.apache.dubbo.config.annotation.DubboService;
 import org.checkerframework.checker.units.qual.A;
 import org.springframework.beans.factory.annotation.Autowired;
 
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 import java.util.stream.Collectors;
 
 /**
@@ -35,6 +38,9 @@ public class RemoteManageServiceImpl implements RemoteManageService {
     @Autowired
     private KwmCooperateManageService kwmCooperateManageService;
 
+    @DubboReference(version = "1.0.0", group = "design", check = false)
+    private RemoteSystemService remoteSystemService;
+
     /**
      * @param idList 企业id集合
      * @return Map<Long, List<EntAddressResDto>>
@@ -69,4 +75,57 @@ public class RemoteManageServiceImpl implements RemoteManageService {
         }
         return BeanUtils.copyToList(entCooperate, FindEntCooperateResVo.class);
     }
+
+
+    /**
+     * @param entId 集团企业id
+     * @return FindEntCooperateResVo
+     * @desc: 查询集团企业包括其主体单位下的合作单位所属的集团企业
+     * @author: czh
+     * @date: 2023/9/1
+     */
+    @Override
+    public List<FindEntCooperateResVo> findAllCooperateEnt(Long entId) {
+        if (Objects.isNull(entId)) {
+            return Collections.emptyList();
+        }
+        List<Long> ourEntIds = new ArrayList<>();
+        ourEntIds.add(entId);
+        EntCacheResDto entCacheResDto = remoteSystemService.queryEntTreeById(entId);
+        if (Objects.nonNull(entCacheResDto)) {
+            List<EntCacheResDto> child = entCacheResDto.getChild();
+            if (CollectionUtils.isNotEmpty(child)) {
+                ourEntIds.addAll(child.stream().map(EntCacheResDto::getId).toList());
+            }
+        }
+
+        //获取当前集团下所有的企业id,遍历,找到合作单位
+        List<Long> list = new ArrayList<>();
+        List<FindEntCooperateResVo> findEntCooperateResVoList = new ArrayList<>();
+        for (Long ourEntId : ourEntIds) {
+            FindCooperateByEntReqVo findCooperateByEntReqVo = new FindCooperateByEntReqVo();
+            findCooperateByEntReqVo.setEntId(ourEntId);
+            List<FindCooperateByEntResVo> cooperateByEnt = kwmCooperateManageService.findCooperateByEnt(findCooperateByEntReqVo);
+            if (CollectionUtils.isNotEmpty(cooperateByEnt)) {
+                List<Long> targetEntIds = cooperateByEnt.stream().map(FindCooperateByEntResVo::getTargetEntId).toList();
+                Map<Long, EntCacheResDto> longEntCacheResDtoMap = remoteSystemService.queryEntTreeByIds(targetEntIds);
+                for (Long targetEntId : targetEntIds) {
+                    EntCacheResDto entCacheResDto1 = longEntCacheResDtoMap.get(targetEntId);
+                    if (Objects.nonNull(entCacheResDto1)) {
+                        Long id = entCacheResDto1.getId();
+                        if (list.contains(id)) {
+                            continue;
+                        }
+                        list.add(id);
+                        FindEntCooperateResVo findEntCooperateResVo = new FindEntCooperateResVo();
+                        findEntCooperateResVo.setEntId(id);
+                        findEntCooperateResVo.setEntName(entCacheResDto1.getFirmName());
+                        findEntCooperateResVoList.add(findEntCooperateResVo);
+                    }
+                }
+            }
+        }
+
+        return findEntCooperateResVoList;
+    }
 }

+ 17 - 0
sckw-modules/sckw-manage/src/main/java/com/sckw/manage/service/KwmCooperateManageService.java

@@ -588,4 +588,21 @@ public class KwmCooperateManageService {
         }
         return findCooperateByEntResVos;
     }
+
+
+    /**
+     * @param entId 发起合作的企业id
+     * @return KwmCooperate
+     * @desc: 根据发起合作的企业查询
+     * @author: czh
+     * @date: 2023/9/1
+     */
+    public List<KwmCooperate> findCooperateByInitEnt(Long entId) {
+        LambdaQueryWrapper<KwmCooperate> wrapper = new LambdaQueryWrapper<>();
+        wrapper.eq(KwmCooperate::getEntId, entId).
+                eq(KwmCooperate::getDelFlag, Global.NO).
+                eq(KwmCooperate::getStatus, CooperateStatusEnum.OK.getCode());
+        return kwmCooperateMapper.selectList(wrapper);
+    }
+
 }

+ 10 - 1
sckw-modules/sckw-system/src/main/java/com/sckw/system/dubbo/RemoteBaseService.java

@@ -11,6 +11,7 @@ import com.sckw.system.dao.KwsEntTypeDao;
 import com.sckw.system.model.*;
 import com.sckw.system.model.vo.res.CertificateResVo;
 import com.sckw.system.model.vo.res.KwsDeptResVo;
+import com.sckw.system.model.vo.res.KwsUserResVo;
 import com.sckw.system.service.KwsDeptService;
 import com.sckw.system.service.KwsEnterpriseService;
 import com.sckw.system.service.KwsRoleService;
@@ -61,7 +62,15 @@ public class RemoteBaseService {
     }
 
     public KwsUserResDto getUserByAccount(String username) {
-        return null;
+        KwsUser kwsUser = new KwsUser();
+        kwsUser.setAccount(username);
+        List<KwsUserResVo> list = kwsUserService.findList(kwsUser);
+        if (CollectionUtils.isEmpty(list)) {
+            return null;
+        }
+        KwsUserResDto kwsUserResDto = new KwsUserResDto();
+        BeanUtils.copyProperties(list.get(0), kwsUserResDto);
+        return kwsUserResDto;
     }
 
     public List<KwsUserDeptResDto> queryUserDeptByUserId(Long userId) {

+ 4 - 0
sckw-modules/sckw-system/src/main/java/com/sckw/system/dubbo/RemoteSystemServiceImpl.java

@@ -282,6 +282,10 @@ public class RemoteSystemServiceImpl implements RemoteSystemService {
             BeanUtils.copyProperties(kwsEnterpriseResDto, entCacheResDto);
             entCacheResDto.setDeptInfo(remoteBaseService.queryDeftInfoByEntId(entId));
             entCacheResDto.setCertificateInfo(remoteBaseService.queryCertificateByEntId(entId));
+            KwsUserResDto userByAccount = remoteBaseService.getUserByAccount(kwsEnterpriseResDto.getPhone());
+            if (Objects.nonNull(userByAccount)) {
+                entCacheResDto.setContactsId(userByAccount.getId());
+            }
             List<EntTypeResDto> entTypeResDtos = remoteBaseService.queryEntTypeById(entId);
             if (CollectionUtils.isNotEmpty(entTypeResDtos)) {
                 entCacheResDto.setEntTypes(String.join(Global.COMMA, entTypeResDtos.stream().map(EntTypeResDto::getType).map(String::valueOf).distinct().toList()));

+ 3 - 9
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/model/vo/WaybillSimpleDataVO.java

@@ -16,7 +16,7 @@ public class WaybillSimpleDataVO {
      * 运单ID
      */
     @JsonProperty("wOrderId")
-    private String wOrderId;
+    private Long wOrderId;
 
     /**
      * 运单号
@@ -24,12 +24,6 @@ public class WaybillSimpleDataVO {
     @JsonProperty("wOrderNo")
     private String wOrderNo;
 
-    /**
-     * 承运单号
-     */
-    @JsonProperty("lOrderNo")
-    private String lOrderNo;
-
     /**
      * 车辆ID
      */
@@ -38,7 +32,7 @@ public class WaybillSimpleDataVO {
     /**
      * 运单状态
      */
-    private String status;
+    private Integer status;
 
     /**
      * 车牌号
@@ -74,7 +68,7 @@ public class WaybillSimpleDataVO {
      * 承运单ID
      */
     @JsonProperty("lOrderId")
-    private String lOrderId;
+    private Long lOrderId;
 
     /**
      * 进度数据

+ 94 - 42
sckw-modules/sckw-transport/src/main/java/com/sckw/transport/service/WaybillManagementService.java

@@ -21,6 +21,8 @@ import com.sckw.system.api.model.dto.res.SysDictResDto;
 import com.sckw.system.api.model.dto.res.UserCacheResDto;
 import com.sckw.transport.dao.*;
 import com.sckw.transport.model.KwtLogisticsOrder;
+import com.sckw.transport.model.KwtLogisticsOrderCirculate;
+import com.sckw.transport.model.KwtWaybillOrder;
 import com.sckw.transport.model.KwtWaybillOrderTrack;
 import com.sckw.transport.model.dto.AddressDropListDTO;
 import com.sckw.transport.model.dto.WayBillDetailDTO;
@@ -71,6 +73,9 @@ public class WaybillManagementService {
     @Autowired
     public KwtWaybillOrderTicketMapper kwtWaybillOrderTicketMapper;
 
+    @Autowired
+    private KwtLogisticsOrderCirculateMapper orderCirculateDao;
+
     @Autowired
     public KwtWaybillOrderTrackMapper kwtWaybillOrderTrackMapper;
 
@@ -94,7 +99,7 @@ public class WaybillManagementService {
         WayBillDetailDTO wayBillDetailDTO = new WayBillDetailDTO();
         WaybillTicketVO waybillTicketVO = new WaybillTicketVO();
         WaybillCarVO waybillCarVO = new WaybillCarVO();
-        if (!ObjectUtils.isEmpty(info)) {
+        if(!ObjectUtils.isEmpty(info)) {
             // 基础信息
             wayBillDetailDTO.setTruckId(info.getTruckId());
             wayBillDetailDTO.setStatus(String.valueOf(info.getStatus()));
@@ -123,22 +128,22 @@ public class WaybillManagementService {
             wayBillDetailDTO.setCheckFirmName(info.getCheckFirmName());
             // 计费方式
             KwtLogisticsOrder kwtLogisticsOrder = kwtLogisticsOrderMapper.selectById(info.getLOrderId());
-            if (!ObjectUtils.isEmpty(kwtLogisticsOrder)) {
+            if(!ObjectUtils.isEmpty(kwtLogisticsOrder)) {
                 wayBillDetailDTO.setPriceType(kwtLogisticsOrder.getBillingMode());
                 SysDictResDto billingMode = remoteSystemService.queryDictByTypeAndValue(DictTypeEnum.CHARGING_TYPE.getType(), kwtLogisticsOrder.getBillingMode());
-                if (!ObjectUtils.isEmpty(billingMode)) {
+                if(!ObjectUtils.isEmpty(billingMode)) {
                     wayBillDetailDTO.setPriceTypeLabe(billingMode.getLabel());
                 }
             }
             wayBillDetailDTO.setCheckFirmName(info.getCheckFirmName());
             // 派车人信息
             UserCacheResDto createUser = remoteSystemService.queryUserCacheById(info.getCreateBy());
-            if (!ObjectUtils.isEmpty(createUser)) {
+            if(!ObjectUtils.isEmpty(createUser)) {
                 wayBillDetailDTO.setCreateByPhone(createUser.getPhone());
             }
             // 车辆信息
             SysDictResDto truckTypeString = remoteSystemService.queryDictByTypeAndValue(DictTypeEnum.TRUCK_TYPE.getType(), info.getTruckType());
-            if (!ObjectUtils.isEmpty(truckTypeString)) {
+            if(!ObjectUtils.isEmpty(truckTypeString)) {
                 waybillCarVO.setTypeLabel(truckTypeString.getLabel());
             }
             waybillCarVO.setTruckId(String.valueOf(info.getTruckId()));
@@ -149,12 +154,12 @@ public class WaybillManagementService {
             waybillCarVO.setDriverId(String.valueOf(info.getTruckId()));
             waybillCarVO.setTrailerNo(info.getTruckTrailerNo());
             // 票据
-            if (info.getLoadTime() != null) {
+            if (info.getLoadTime()!=null){
                 waybillTicketVO.setLoadTime(DateUtil.getDateTime(info.getLoadTime()));
             }
             waybillTicketVO.setLoadWeight(String.valueOf(info.getLoadAmount()));
             waybillTicketVO.setLoadUrl(String.valueOf(info.getLoadUrls()));
-            if (info.getUnloadTime() != null) {
+            if (info.getUnloadTime()!=null){
                 waybillTicketVO.setUnloadTime(DateUtil.getDateTime(info.getUnloadTime()));
             }
             waybillTicketVO.setUnloadWeight(String.valueOf(info.getUnloadAmount()));
@@ -163,7 +168,7 @@ public class WaybillManagementService {
             BigDecimal deficitLoss = info.getLoss() == null ? BigDecimal.valueOf(0) : info.getLoss();
             BigDecimal deficitAmount = info.getDeficitAmount() == null ? BigDecimal.valueOf(0) : info.getDeficitAmount();
             BigDecimal deficitRealAmount = BigDecimal.valueOf(0);
-            if (deficitAmount.compareTo(BigDecimal.valueOf(0)) > 0) {
+            if(deficitAmount.compareTo(BigDecimal.valueOf(0)) > 0) {
                 deficitRealAmount = deficitLoss.subtract(deficitAmount);
             }
             waybillTicketVO.setDeficitRealAmount(deficitRealAmount.toString());
@@ -189,9 +194,9 @@ public class WaybillManagementService {
             List<UserCacheResDto> users = remoteSystemService.queryUserCacheByIds(userIds);
             Map<Long, UserCacheResDto> usersMap = new HashMap<>(Global.NUMERICAL_SIXTEEN);
             users.forEach(e -> usersMap.put(e.getId(), e));
-            for (KwtWaybillOrderTrack kwtWaybillOrderTrack : kwtWaybillOrderTracks) {
-                for (WaybillStatusVO statusVO : statusVOS) {
-                    if (statusVO.getCode().equals(kwtWaybillOrderTrack.getStatus())) {
+            for (KwtWaybillOrderTrack kwtWaybillOrderTrack: kwtWaybillOrderTracks) {
+                for (WaybillStatusVO statusVO:statusVOS) {
+                    if(statusVO.getCode().equals(kwtWaybillOrderTrack.getStatus())) {
                         statusVO.setStatus(true);
                         statusVO.setId(kwtWaybillOrderTrack.getId());
                         statusVO.setCreateTime(DateUtil.getDateTime(kwtWaybillOrderTrack.getCreateTime()));
@@ -226,19 +231,71 @@ public class WaybillManagementService {
 
     /**
      * 简洁版运单详情
-     *
      * @param id
      * @return
      */
-    public HttpResult waybillSimpleData(Long id) {
+    public HttpResult waybillSimpleData(Long id){
+        // 数据校验
+        if (id == null) {
+            return HttpResult.error("车辆运单ID不能为空!");
+        }
         WaybillSimpleDataVO waybillSimpleDataVO = new WaybillSimpleDataVO();
+        KwtWaybillOrder waybillOrder = kwtWaybillOrderMapper.selectById(id);
+        if (waybillOrder != null) {
+            BeanUtils.copyPropertiesValue(waybillOrder, waybillSimpleDataVO);
+            waybillSimpleDataVO.setWOrderId(waybillOrder.getId());
+        } else {
+            KwtLogisticsOrderCirculate orderCirculate = orderCirculateDao.selectById(id);
+            if (orderCirculate == null) {
+                return HttpResult.error("车辆运单已不存在!");
+            }
+            BeanUtils.copyPropertiesValue(orderCirculate, waybillSimpleDataVO);
+            waybillSimpleDataVO.setWOrderId(orderCirculate.getId());
+        }
+
+        // 初始化各状态
+        List<WaybillStatusVO> statusVOS = new ArrayList<>();
+        List<Integer> statuses = initWaybillIndexStatus();
+        statuses.forEach(e -> {
+            WaybillStatusVO waybillStatusVO = new WaybillStatusVO();
+            waybillStatusVO.setStatus(false);
+            waybillStatusVO.setCode(e);
+            waybillStatusVO.setDestination(CarWaybillEnum.getName(e));
+            statusVOS.add(waybillStatusVO);
+        });
+
+        List<KwtWaybillOrderTrack> kwtWaybillOrderTracks = kwtWaybillOrderTrackMapper.selectList(new LambdaQueryWrapper<KwtWaybillOrderTrack>().eq(KwtWaybillOrderTrack::getWOrderId, id));
+        if (CollectionUtils.isNotEmpty(kwtWaybillOrderTracks)) {
+            List<Long> userIds = new ArrayList<>();
+            kwtWaybillOrderTracks.forEach(e -> userIds.add(e.getCreateBy()));
+            List<UserCacheResDto> users = remoteSystemService.queryUserCacheByIds(userIds);
+            Map<Long, UserCacheResDto> usersMap = new HashMap<>(Global.NUMERICAL_SIXTEEN);
+            users.forEach(e -> usersMap.put(e.getId(), e));
+            for (KwtWaybillOrderTrack kwtWaybillOrderTrack : kwtWaybillOrderTracks) {
+                for (WaybillStatusVO statusVO : statusVOS) {
+                    if (statusVO.getCode().equals(kwtWaybillOrderTrack.getStatus())) {
+                        statusVO.setStatus(true);
+                        statusVO.setId(kwtWaybillOrderTrack.getId());
+                        statusVO.setCreateTime(DateUtil.getDateTime(kwtWaybillOrderTrack.getCreateTime()));
+                        statusVO.setOperateTime(kwtWaybillOrderTrack.getOperateTime() == null
+                                ? null : DateUtil.getDateTime(kwtWaybillOrderTrack.getOperateTime()));
+                        statusVO.setCreateByName(usersMap.get(kwtWaybillOrderTrack.getCreateBy()) == null
+                                ? null : usersMap.get(kwtWaybillOrderTrack.getCreateBy()).getName());
+                        break;
+                    }
+                }
+            }
+        }
+        waybillSimpleDataVO.setProcess(statusVOS);
+        return HttpResult.ok(waybillSimpleDataVO);
+        /*WaybillSimpleDataVO waybillSimpleDataVO = new WaybillSimpleDataVO();
         Criteria criteria = new Criteria();
         criteria.and("wOrderId").is(id);
         criteria.and("entId").is(LoginUserHolder.getEntId());
         criteria.and("delFlag").is(NumberConstant.ZERO);
         Query queryFormat = new Query(criteria);
         SckwWaybillOrder info = mongoTemplate.findOne(queryFormat, SckwWaybillOrder.class);
-        if (!ObjectUtils.isEmpty(info)) {
+        if(!ObjectUtils.isEmpty(info)) {
             waybillSimpleDataVO.setWOrderId(info.getWOrderId() == null ?
                     String.valueOf(info.get_id()) : String.valueOf(info.getWOrderId()));
             waybillSimpleDataVO.setWOrderNo(info.getWOrderNo());
@@ -288,12 +345,10 @@ public class WaybillManagementService {
             }
         }
         waybillSimpleDataVO.setProcess(statusVOS);
-        return HttpResult.ok(waybillSimpleDataVO);
+        return HttpResult.ok(waybillSimpleDataVO);*/
     }
-
     /**
      * 运单看板列表
-     *
      * @param query
      * @return
      * @throws Exception
@@ -326,11 +381,12 @@ public class WaybillManagementService {
     }
 
     /**
+     *
      * @return
      */
     public void packageWaybillIndexResult(List<SckwWaybillOrder> list, List<WaybillStatusVO> statusVOS, List<WaybillBoardListVO> returnList) {
         // 执行查询
-        for (SckwWaybillOrder sckwWaybillOrder : list) {
+        for (SckwWaybillOrder sckwWaybillOrder:list) {
             WaybillBoardListVO waybillBoardListVO = new WaybillBoardListVO();
             waybillBoardListVO.setWOrderId(String.valueOf(sckwWaybillOrder.getWOrderId()));
             waybillBoardListVO.setWOrderNo(String.valueOf(sckwWaybillOrder.getWOrderNo()));
@@ -376,11 +432,11 @@ public class WaybillManagementService {
                 users.forEach(e -> usersMap.put(e.getId(), e.getName()));
                 waybillBoardListVO.getTracks().forEach(e -> {
                     kwtWaybillOrderTracks.forEach(e2 -> {
-                        if (e.getCode().equals(e2.getStatus())) {
+                        if(e.getCode().equals(e2.getStatus())) {
                             e.setStatus(true);
                             e.setId(e2.getId());
-                            e.setOperateTime(e2.getOperateTime() == null ? null : DateUtil.getDateTime(e2.getOperateTime()));
-                            e.setCreateTime(e2.getCreateTime() == null ? null : DateUtil.getDateTime(e2.getCreateTime()));
+                            e.setOperateTime(DateUtil.getDateTime(e2.getOperateTime()));
+                            e.setCreateTime(DateUtil.getDateTime(e2.getCreateTime()));
                             e.setCreateByName(usersMap.get(e2.getCreateBy()) == null ? null : usersMap.get(e2.getCreateBy()));
                         }
                     });
@@ -391,9 +447,10 @@ public class WaybillManagementService {
     }
 
     /**
+     *
      * @return
      */
-    public List<Integer> initWaybillIndexStatus() {
+    public  List<Integer> initWaybillIndexStatus() {
         List<Integer> statuses = new ArrayList<>();
         statuses.add(CarWaybillEnum.PENDING_ORDER.getCode());
         statuses.add(CarWaybillEnum.PENDING_VEHICLE.getCode());
@@ -408,7 +465,6 @@ public class WaybillManagementService {
 
     /**
      * 运单看板 查询条件构造
-     *
      * @param query
      * @return
      */
@@ -421,13 +477,14 @@ public class WaybillManagementService {
         if (CollectionUtils.isNotEmpty(wOrderIds)) {
             Criteria.where("wOrderId").in(wOrderIds);
         }
-        if (StringUtils.isNotBlank(query.getStatus())) {
+        if (StringUtils.isNotBlank(query.getStatus())){
             if (query.getStatus().equals(String.valueOf(CarWaybillEnum.COMPLETION_UNLOADING.getCode()))) {
                 List<Integer> _statuses = new ArrayList<>();
                 _statuses.add(CarWaybillEnum.COMPLETION_UNLOADING.getCode());
                 _statuses.add(CarWaybillEnum.APPROVAL_NO_PASS.getCode());
                 criteria.and("status").in(_statuses);
-            } else if (!query.getStatus().equals("all") && (!query.getStatus().equals(String.valueOf(CarWaybillEnum.COMPLETION_UNLOADING.getCode())))) {
+            }
+            if (!query.getStatus().equals("all")) {
                 criteria.and("status").is(Integer.valueOf(query.getStatus()));
             }
         }
@@ -492,12 +549,11 @@ public class WaybillManagementService {
     }
 
     /**
-     * 运单看板TOP
-     *
+     *  运单看板TOP
      * @param query
      * @return
      */
-    public HttpResult waybillIndexStatistics(WaybillOrderDTO query) {
+    public HttpResult waybillIndexStatistics(WaybillOrderDTO query){
         List<Integer> statuses = initWaybillIndexStatus();
         Criteria criteria = buildWaybillIndexQuery(query);
         Aggregation aggregation = Aggregation.newAggregation(
@@ -521,9 +577,9 @@ public class WaybillManagementService {
             top.setName(CarWaybillEnum.getName(e));
             listMap.put(String.valueOf(e), top);
         });
-        if (CollectionUtils.isNotEmpty(results)) {
-            for (TableTops result : results) {
-                if (listMap.containsKey(result.getValue())) {
+        if(CollectionUtils.isNotEmpty(results)) {
+            for(TableTops result: results) {
+                if(listMap.containsKey(result.getValue())) {
                     listMap.get(result.getValue()).setTotal(result.getTotal());
                 }
                 allTotal += result.getTotal();
@@ -535,11 +591,10 @@ public class WaybillManagementService {
 
     /**
      * app 运单分类统计数据 [运输中|已完成]
-     *
      * @param keyword
      * @return
      */
-    public HttpResult waybillDataStatisticApp(String keyword) {
+    public HttpResult waybillDataStatisticApp(String keyword){
         Long entId = LoginUserHolder.getEntId();
         // 运输途中
         Map<String, String> _onway = new HashMap<>();
@@ -565,11 +620,10 @@ public class WaybillManagementService {
 
     /**
      * app 运单列表 [运输中|已完成]
-     *
      * @param query
      * @return
      */
-    public HttpResult waybillDataApp(WaybillListAppDTO query) {
+    public HttpResult waybillDataApp(WaybillListAppDTO query){
         List<Integer> processStatuses = initWaybillIndexStatus();
         List<Long> _statuses = getWallBillStatues(query.getStatus());
         Criteria criteria = new Criteria();
@@ -615,13 +669,12 @@ public class WaybillManagementService {
 
     /**
      * app 运单分类吨量统计数据 [运输中|已完成]
-     *
      * @param query
      * @return
      */
-    public HttpResult waybillAmountStatistic(WaybillListAppDTO query) {
+    public HttpResult waybillAmountStatistic(WaybillListAppDTO query){
         List<Long> _statuses = getWallBillStatues(query.getStatus());
-        Map<String, Object> amount = kwtWaybillOrderMapper.selectWaybillOrderAmountByStatus(
+        Map<String,Object> amount = kwtWaybillOrderMapper.selectWaybillOrderAmountByStatus(
                 LoginUserHolder.getEntId(),
                 _statuses,
                 query.getKeyword(),
@@ -633,13 +686,12 @@ public class WaybillManagementService {
 
     /**
      * 获取 [运输中|已完成] 状态列表
-     *
      * @param status
      * @return
      */
     public List<Long> getWallBillStatues(String status) {
         List<Long> _list = new ArrayList<>();
-        if (status.equals("onway")) {
+        if(status.equals("onway")) {
             _list.add(CarWaybillEnum.PENDING_ORDER.getCode().longValue());
             _list.add(CarWaybillEnum.PENDING_VEHICLE.getCode().longValue());
             _list.add(CarWaybillEnum.EXIT_COMPLETED.getCode().longValue());
@@ -647,7 +699,7 @@ public class WaybillManagementService {
             _list.add(CarWaybillEnum.COMPLETION_LOADING.getCode().longValue());
             _list.add(CarWaybillEnum.WAIT_UNLOADING.getCode().longValue());
         }
-        if (status.equals("finish")) {
+        if(status.equals("finish")) {
             _list.add(CarWaybillEnum.COMPLETION_UNLOADING.getCode().longValue());
             _list.add(CarWaybillEnum.APPROVAL_PASS.getCode().longValue());
         }
@@ -661,7 +713,7 @@ public class WaybillManagementService {
      **/
     public AddressDropListDTO findAddressList() {
         AddressDropListDTO res = new AddressDropListDTO();
-        //装货地址树
+       //装货地址树
         List<Integer> loadAddressList = kwtWaybillOrderAddressMapper.findAddressCodeList(LoginUserHolder.getEntId(), Global.NUMERICAL_ONE);
         //卸货地址树
         List<Integer> unloadAddressList = kwtWaybillOrderAddressMapper.findAddressCodeList(LoginUserHolder.getEntId(), Global.NUMERICAL_TWO);