| | |
| | | FROM mdc_process_quantity mpq LEFT JOIN mdc_standard_process_duration mspd ON mpq.standard_id = mspd.id |
| | | <where> |
| | | <if test="mdcProcessQuantity.equipmentId != null and mdcProcessQuantity.equipmentId != ''"> |
| | | AND mspd.equipment_id LIKE CONCAT(CONCAT('%',#{ mdcProcessQuantity.equipmentId }),'%') |
| | | AND mspd.equipment_id LIKE '%' + #{ mdcProcessQuantity.equipmentId } + '%' |
| | | </if> |
| | | <if test="mdcProcessQuantity.equipmentName != null and mdcProcessQuantity.equipmentName != ''"> |
| | | AND mspd.equipment_name LIKE CONCAT(CONCAT('%',#{ mdcProcessQuantity.equipmentName }),'%') |
| | | AND mspd.equipment_name LIKE '%' + #{ mdcProcessQuantity.equipmentName } + '%' |
| | | </if> |
| | | <if test="mdcProcessQuantity.partsCode != null and mdcProcessQuantity.partsCode != ''"> |
| | | AND mspd.parts_code LIKE CONCAT(CONCAT('%',#{ mdcProcessQuantity.partsCode }),'%') |
| | | AND mspd.parts_code LIKE '%' + #{ mdcProcessQuantity.partsCode } + '%' |
| | | </if> |
| | | <if test="mdcProcessQuantity.batchCode != null and mdcProcessQuantity.batchCode != ''"> |
| | | AND mspd.batch_code LIKE CONCAT(CONCAT('%',#{ mdcProcessQuantity.batchCode }),'%') |
| | | AND mspd.batch_code LIKE '%' + #{ mdcProcessQuantity.batchCode } + '%' |
| | | </if> |
| | | <if test="mdcProcessQuantity.sequenceNumber != null and mdcProcessQuantity.sequenceNumber != ''"> |
| | | AND mspd.sequence_number LIKE CONCAT(CONCAT('%',#{ mdcProcessQuantity.sequenceNumber }),'%') |
| | | AND mspd.sequence_number LIKE '%' + #{ mdcProcessQuantity.sequenceNumber } + '%' |
| | | </if> |
| | | <if test="mdcProcessQuantity.startTime != null and mdcProcessQuantity.endTime != null"> |
| | | AND mpq.efficient_date BETWEEN #{ mdcProcessQuantity.startTime } AND #{ mdcProcessQuantity.endTime } |
| | |
| | | FROM mdc_process_quantity mpq LEFT JOIN mdc_standard_process_duration mspd ON mpq.standard_id = mspd.id |
| | | <where> |
| | | <if test="mdcProcessQuantity.equipmentId != null and mdcProcessQuantity.equipmentId != ''"> |
| | | AND mspd.equipment_id LIKE CONCAT(CONCAT('%',#{ mdcProcessQuantity.equipmentId }),'%') |
| | | AND mspd.equipment_id LIKE '%' + #{ mdcProcessQuantity.equipmentId } + '%' |
| | | </if> |
| | | <if test="mdcProcessQuantity.equipmentName != null and mdcProcessQuantity.equipmentName != ''"> |
| | | AND mspd.equipment_name LIKE CONCAT(CONCAT('%',#{ mdcProcessQuantity.equipmentName }),'%') |
| | | AND mspd.equipment_name LIKE '%' + #{ mdcProcessQuantity.equipmentName } + '%' |
| | | </if> |
| | | <if test="mdcProcessQuantity.partsCode != null and mdcProcessQuantity.partsCode != ''"> |
| | | AND mspd.parts_code LIKE CONCAT(CONCAT('%',#{ mdcProcessQuantity.partsCode }),'%') |
| | | AND mspd.parts_code LIKE '%' + #{ mdcProcessQuantity.partsCode } + '%' |
| | | </if> |
| | | <if test="mdcProcessQuantity.batchCode != null and mdcProcessQuantity.batchCode != ''"> |
| | | AND mspd.batch_code LIKE CONCAT(CONCAT('%',#{ mdcProcessQuantity.batchCode }),'%') |
| | | AND mspd.batch_code LIKE '%' + #{ mdcProcessQuantity.batchCode } + '%' |
| | | </if> |
| | | <if test="mdcProcessQuantity.sequenceNumber != null and mdcProcessQuantity.sequenceNumber != ''"> |
| | | AND mspd.sequence_number LIKE CONCAT(CONCAT('%',#{ mdcProcessQuantity.sequenceNumber }),'%') |
| | | AND mspd.sequence_number LIKE '%' + #{ mdcProcessQuantity.sequenceNumber } + '%' |
| | | </if> |
| | | <if test="mdcProcessQuantity.startTime != null and mdcProcessQuantity.endTime != null"> |
| | | AND mpq.efficient_date BETWEEN #{ mdcProcessQuantity.startTime } AND #{ mdcProcessQuantity.endTime } |