|
|
@ -201,17 +201,26 @@ public class MesShippingOrderManagementDetailDaoImpl implements IMesShippingOrde
|
|
|
|
" sd.part_no, " +
|
|
|
|
" sd.part_no, " +
|
|
|
|
" sd.modify_date_time, " +
|
|
|
|
" sd.modify_date_time, " +
|
|
|
|
" from mes_shipping_detail sd " +
|
|
|
|
" from mes_shipping_detail sd " +
|
|
|
|
" left join mes_work_order wo on wop.work_order_no=wo.work_order_no " +
|
|
|
|
" left join mes_shipping s on s.id=sd.pid " +
|
|
|
|
" WHERE sd.status in (20) " +//todo 发运 20
|
|
|
|
" WHERE sd.status in (20) " +//todo 发运 20
|
|
|
|
" and sd.bar_code != '' and bar_code is not NULL ");
|
|
|
|
" and sd.bar_code != '' and bar_code is not NULL ");
|
|
|
|
hql.append(" and sd.organize_code = :organizeCode ");
|
|
|
|
hql.append(" and sd.organize_code = :organizeCode ");
|
|
|
|
hql.append(" and sd.is_deleted = :isDeleted ");
|
|
|
|
hql.append(" and sd.is_deleted = :isDeleted ");
|
|
|
|
hql.append(" and sd.is_valid = :isValid ");
|
|
|
|
hql.append(" and sd.is_valid = :isValid ");
|
|
|
|
if (!StringUtil.isEmpty(detail.getModifyDateTimeStart())){
|
|
|
|
if (!StringUtil.isEmpty(detail.getModifyDateTimeStart())){
|
|
|
|
hql.append(" and sd.modify_date_time >= "+detail.getModifyDateTimeStart()+" ");
|
|
|
|
hql.append(" and sd.modify_date_time >= '"+detail.getModifyDateTimeStart()+"' ");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!StringUtil.isEmpty(detail.getModifyDateTimeEnd())){
|
|
|
|
if (!StringUtil.isEmpty(detail.getModifyDateTimeEnd())){
|
|
|
|
hql.append(" and sd.modify_date_time <= "+detail.getModifyDateTimeEnd()+" ");
|
|
|
|
hql.append(" and sd.modify_date_time <= '"+detail.getModifyDateTimeEnd()+"' ");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!StringUtil.isEmpty(detail.getShippingCode())){
|
|
|
|
|
|
|
|
hql.append(" and s.shipping_code = '"+detail.getShippingCode()+"' ");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!StringUtil.isEmpty(detail.getTotalPartNo())){
|
|
|
|
|
|
|
|
hql.append(" and sd.part_no = '"+detail.getTotalPartNo()+"' ");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!StringUtil.isEmpty(detail.getWorkOrderNo())){
|
|
|
|
|
|
|
|
hql.append(" and sd.bar_code like '"+detail.getWorkOrderNo()+"%' ");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Query query = entityManager.createNativeQuery(hql.toString());
|
|
|
|
Query query = entityManager.createNativeQuery(hql.toString());
|
|
|
@ -247,10 +256,10 @@ public class MesShippingOrderManagementDetailDaoImpl implements IMesShippingOrde
|
|
|
|
hql.append(" and wop.is_valid = :isValid ");
|
|
|
|
hql.append(" and wop.is_valid = :isValid ");
|
|
|
|
|
|
|
|
|
|
|
|
if (!StringUtil.isEmpty(detail.getPartNo())){
|
|
|
|
if (!StringUtil.isEmpty(detail.getPartNo())){
|
|
|
|
hql.append(" and wop.part_no ="+detail.getPartNo()+" ");
|
|
|
|
hql.append(" and wop.part_no ='"+detail.getPartNo()+"' ");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!StringUtil.isEmpty(detail.getWorkCenterCode())){
|
|
|
|
if (!StringUtil.isEmpty(detail.getWorkCenterCode())){
|
|
|
|
hql.append(" and wop.work_center_code ="+detail.getWorkCenterCode()+" ");
|
|
|
|
hql.append(" and wop.work_center_code ='"+detail.getWorkCenterCode()+"' ");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
hql.append(" and wop.work_order_no in (:codeList) ");
|
|
|
|
hql.append(" and wop.work_order_no in (:codeList) ");
|
|
|
|
|
|
|
|
|
|
|
@ -285,10 +294,10 @@ public class MesShippingOrderManagementDetailDaoImpl implements IMesShippingOrde
|
|
|
|
hql.append(" and wop.is_valid = :isValid ");
|
|
|
|
hql.append(" and wop.is_valid = :isValid ");
|
|
|
|
|
|
|
|
|
|
|
|
if (!StringUtil.isEmpty(detail.getPartNo())){
|
|
|
|
if (!StringUtil.isEmpty(detail.getPartNo())){
|
|
|
|
hql.append(" and wop.part_no ="+detail.getPartNo()+" ");
|
|
|
|
hql.append(" and wop.part_no ='"+detail.getPartNo()+"' ");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!StringUtil.isEmpty(detail.getWorkCenterCode())){
|
|
|
|
if (!StringUtil.isEmpty(detail.getWorkCenterCode())){
|
|
|
|
hql.append(" and wop.work_center_code ="+detail.getWorkCenterCode()+" ");
|
|
|
|
hql.append(" and wop.work_center_code ='"+detail.getWorkCenterCode()+"' ");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
hql.append(" and wop.work_order_no in (:codeList) ");
|
|
|
|
hql.append(" and wop.work_order_no in (:codeList) ");
|
|
|
|
|
|
|
|
|
|
|
|