/**
* 查询所有已生成已审核的需求单的生产计划
*/
public IPage<ProductionPlan> getYetReqProductionPlan(Page page,String productionPlanId);
PurchaseMapper.xml(注意模糊查询sql的写法)
<select id="getYetReqProductionPlan" resultType="usst.mrpproject.bean.ProductionPlan">
select * from production_plan WHERE production_plan_id in (SELECT production_plan_id FROM purchases WHERE auditStatus='已通过'
<if test="productionPlanId !=null and productionPlanId !=''">
AND production_plan_id like concat('%',#{productionPlanId,jdbcType=VARCHAR},'%')
</if>
<if test="productionPlanId ==null or productionPlanId ==''">AND production_plan_id IS NOT NULL</if>)
</select>
service.java
public IPage<ProductionPlan>getYetReqProductionPlan(Page page,String productionPlanId);