jiangping
2024-02-04 8a0469c97262be9ecbc5eae38d812da789635c81
server/service/src/main/java/com/doumee/service/business/impl/DispatchUnitServiceImpl.java
@@ -896,11 +896,12 @@
//                        .selectAs(DuSolution::getId,DispatchUnit::getDuSolutionId)
//                        .leftJoin(DuSolution.class,DuSolution::getDispatchUnitId,DispatchUnit::getId)
                        .eq(DispatchUnit::getIsdeleted,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,dispatchUnitQueryDTO.getDataType())
                        .eq(DispatchUnit::getDataType,Constants.TWO)
                        .exists("select b.id from du_solution b where b.isdeleted=0 and b.dispatch_unit_id=t.id" )
                        .exists("select b.id from du_solution b where b.isdeleted=0 and b.dispatch_unit_id=t.id and  b.solution_id="+dispatchUnitQueryDTO.getSolutionId() )
//                        .eq(!Objects.isNull(dispatchUnitQueryDTO.getSolutionId()),DuSolution::getSolutionId,dispatchUnitQueryDTO.getSolutionId())
                        .exists(!Objects.isNull(dispatchUnitQueryDTO.getApplyId()),
                                " select 1 from apply_detail ad where ad.isdeleted = 0 and ad.apply_id = "+dispatchUnitQueryDTO.getApplyId()+" " +