Stringsql="select * from "+mapper.getSrcTableName()+" where organize_code = :srcOrganizeCode and part_no = :partNo and create_date_time >= :createDateTime and "+mapper.getSrcWhere()+" order by "+mapper.getSrcOrderBy()+" limit "+mapper.getSrcGetLimit()
Stringsql="select top "+mapper.getSrcGetLimit()+" * from "+mapper.getSrcTableName()+" where PLANT = :srcOrganizeCode and PART_NO = :partNo and "+mapper.getSrcWhere()+" order by "+mapper.getSrcOrderBy()
StringBufferhql=newStringBuffer("select organize_code as organizeCode,part_no as partNo, date_format(plan_start_time, '%Y-%m-%d' ) as planStartTime, product_version as productVersion, "+
" sum(case when work_order_status = 40 then complete_qty else qty end ) as qty " +
" sum(case when work_order_status = 40 then reported_qty else qty end ) as qty " +
" from mes_work_order where is_deleted=:isDeleted and is_valid = :isValid and organize_code = :organizeCode "+
" and work_order_type = 20 and order_flag !='P' and work_order_status != 10 and plan_start_time >= :today" +
" and work_order_type = :workOrderType and order_flag != :orderFlag and work_order_status in (20,30,40,50) and plan_start_time >= :today" +
" group by organize_code,part_no, date_format(plan_start_time, '%Y-%m-%d' ), product_version ");