111
k94314517
2024-02-05 15e588eb6a7549ecd2aaffb45e67f11e68354eb6
server/service/src/main/java/com/doumee/service/business/impl/DispatchUnitServiceImpl.java
@@ -894,10 +894,12 @@
        List<DispatchUnit> dispatchUnitList  = dispatchUnitJoinMapper.selectJoinList(DispatchUnit.class,
                new MPJLambdaWrapper<DispatchUnit>().selectAll(DispatchUnit.class)
                        .eq(DispatchUnit::getIsdeleted,Constants.ZERO)
                        .eq(DispatchUnit::getStatus,Constants.ZERO)
                        .select("(select b.id from du_solution b where b.isdeleted=0 and b.dispatch_unit_id=t.id and b.solution_id="+dispatchUnitQueryDTO.getSolutionId()+" limit 1) as du_solution_id" )
                        .eq(loginUserInfo.getType().equals(Constants.ONE),DispatchUnit::getCompanyId,loginUserInfo.getCompanyId())
                        .eq(DispatchUnit::getStatus,Constants.ZERO)
                        .eq(DispatchUnit::getDataType,Constants.TWO)
                        .eq(Objects.isNull(dispatchUnitQueryDTO.getDataType()),DispatchUnit::getDataType,Constants.TWO)
                        .eq(!Objects.isNull(dispatchUnitQueryDTO.getDataType()),DispatchUnit::getDataType,dispatchUnitQueryDTO.getDataType())
                        .exists(!Objects.isNull(dispatchUnitQueryDTO.getSolutionId()),
                                "select b.id from du_solution b where b.isdeleted=0 and b.dispatch_unit_id=t.id and  b.solution_id="+dispatchUnitQueryDTO.getSolutionId() )
                        .exists(!Objects.isNull(dispatchUnitQueryDTO.getApplyId()),