|
@@ -1084,15 +1084,38 @@ public class FirstArticleServiceImpl extends ServiceImpl<FirstArticleMapper, Ben
|
|
|
psids.add(b.getNewBentelerPlanId());
|
|
|
}
|
|
|
if(psids.size()>0){
|
|
|
- List<BentelerPlan> hisplans = planService.list(Wrappers.<BentelerPlan>lambdaQuery()
|
|
|
- .eq(BentelerPlan::getPlanType, plan.getPlanType()).in(BentelerPlan::getId, psids));
|
|
|
- return ResponseBeanBuilder.ok(hisplans, Function.identity());
|
|
|
+ List<OnsiteApprovalPlan> approvals=onsiteApprovalPlanService.list(Wrappers.<OnsiteApprovalPlan>lambdaQuery().eq(OnsiteApprovalPlan::getApprovalLevel,2)
|
|
|
+ .eq(OnsiteApprovalPlan::getStatus,1)
|
|
|
+ .in(OnsiteApprovalPlan::getBentelerPlanId,psids));
|
|
|
+ psids = new ArrayList<>();
|
|
|
+ for (OnsiteApprovalPlan b : approvals) {
|
|
|
+ psids.add(b.getBentelerPlanId());
|
|
|
+ }
|
|
|
+ if(psids.size()>0){
|
|
|
+ List<BentelerPlan> hisplans = planService.list(Wrappers.<BentelerPlan>lambdaQuery()
|
|
|
+ .eq(BentelerPlan::getPlanType, plan.getPlanType()).in(BentelerPlan::getId, psids));
|
|
|
+ return ResponseBeanBuilder.ok(hisplans, Function.identity());
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
|
|
|
return ResponseBeanBuilder.ok(new ArrayList<BentelerPlan>(), Function.identity());
|
|
|
}
|
|
|
+// <select id="getCalenderFirstForType" resultMap="calendarFirst">
|
|
|
+// SELECT b.*
|
|
|
+// FROM benteler_plan a,
|
|
|
+// first_article_calendar b,
|
|
|
+// onsite_approval_plan oap
|
|
|
+// WHERE a.id = b.benteler_plan_id
|
|
|
+// and a.pause_flag = 0
|
|
|
+// and a.deleted = 0
|
|
|
+// and a.effective_date <= now()
|
|
|
+// and b.type_flag = ${type_flag}
|
|
|
+// and a.id = oap.benteler_plan_id
|
|
|
+// and a.plan_type = 1
|
|
|
+// and oap.approval_level = 2
|
|
|
+// and oap.status = 1
|
|
|
+// </select>
|
|
|
|
|
|
|
|
|
/**
|