|
|
|
@ -37,7 +37,7 @@ public class SapProductPlanDaoImpl implements ISapProductPlanDao {
|
|
|
|
|
"mes.complete_qty,sap.gsmng-mes.complete_qty as unFinishQty,sap.meins,sap.psttr,sap.pedtr,sap.l_str," +
|
|
|
|
|
"sap.plwrk,mes.create_date_time,mes.create_user,mes.modify_date_time,mes.modify_user");
|
|
|
|
|
StringBuilder hql = new StringBuilder();
|
|
|
|
|
hql.append(" from sap_product_plan sap left join mes_work_order mes on sap.plnum = mes.plnum and sap.plmat = mes.part_no " +
|
|
|
|
|
hql.append(" from sap_product_plan sap left join mes_work_order mes on sap.plnum = mes.plan_order_no and sap.plmat = mes.part_no " +
|
|
|
|
|
"where sap.is_deleted=:isDeleted and sap.is_valid=:isValid and sap.organize_code=:organizeCode " +
|
|
|
|
|
" and mes.is_deleted=:isDeleted and mes.is_valid=:isValid and mes.organize_code=:organizeCode");
|
|
|
|
|
//拼接查询条件
|
|
|
|
@ -46,7 +46,7 @@ public class SapProductPlanDaoImpl implements ISapProductPlanDao {
|
|
|
|
|
"mes.complete_qty,mes.qty-mes.complete_qty as unFinishQty,sap.meins,sap.psttr,sap.pedtr,sap.l_str," +
|
|
|
|
|
"sap.plwrk,mes.create_date_time,mes.create_user,mes.modify_date_time,mes.modify_user");
|
|
|
|
|
StringBuilder unionHql = new StringBuilder();
|
|
|
|
|
unionHql.append(" from sap_product_plan sap right join mes_work_order mes on sap.plnum = mes.plnum and sap.plmat = mes.part_no " +
|
|
|
|
|
unionHql.append(" from sap_product_plan sap right join mes_work_order mes on sap.plnum = mes.plan_order_no and sap.plmat = mes.part_no " +
|
|
|
|
|
"where mes.is_deleted=:isDeleted and mes.is_valid=:isValid and mes.organize_code=:organizeCode and sap.id is null ");
|
|
|
|
|
//拼接查询条件
|
|
|
|
|
packWhere(sapProductPlan, unionHql);
|
|
|
|
|