| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="org.jeecg.modules.mdc.mapper.MdcStandardProcessDurationMapper"> |
| | | |
| | | <!--分页查询--> |
| | | <select id="pageList" resultType="org.jeecg.modules.mdc.entity.MdcStandardProcessDuration"> |
| | | SELECT * FROM mdc_standard_process_duration |
| | | <where> |
| | | <if test="mdcStandardProcessDuration.equipmentId != null and mdcStandardProcessDuration.equipmentId != ''"> |
| | | AND equipment_id LIKE CONCAT(CONCAT('%',#{ mdcStandardProcessDuration.equipmentId }),'%') |
| | | </if> |
| | | <if test="mdcStandardProcessDuration.equipmentName != null and mdcStandardProcessDuration.equipmentName != ''"> |
| | | AND equipment_name LIKE CONCAT(CONCAT('%',#{ mdcStandardProcessDuration.equipmentName }),'%') |
| | | </if> |
| | | <if test="mdcStandardProcessDuration.partsCode != null and mdcStandardProcessDuration.partsCode != ''"> |
| | | AND parts_code LIKE CONCAT(CONCAT('%',#{ mdcStandardProcessDuration.partsCode }),'%') |
| | | </if> |
| | | <if test="mdcStandardProcessDuration.batchCode != null and mdcStandardProcessDuration.batchCode != ''"> |
| | | AND batch_code LIKE CONCAT(CONCAT('%',#{ mdcStandardProcessDuration.batchCode }),'%') |
| | | </if> |
| | | <if test="mdcStandardProcessDuration.sequenceNumber != null and mdcStandardProcessDuration.sequenceNumber != ''"> |
| | | AND sequence_number LIKE CONCAT(CONCAT('%',#{ mdcStandardProcessDuration.sequenceNumber }),'%') |
| | | </if> |
| | | <if test="mdcStandardProcessDuration.mdcSectionIds != null and mdcStandardProcessDuration.mdcSectionIds.size() > 0 "> |
| | | AND equipment_id IN |
| | | <foreach collection="mdcStandardProcessDuration.mdcSectionIds" item="id" index="index" open="(" close=")" separator=","> |
| | | #{ id } |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | ORDER BY equipment_name ASC |
| | | <select id="findByEquipmentId" resultType="org.jeecg.modules.mdc.dto.MdcProcessQuantityDto"> |
| | | SELECT |
| | | t1.id id, |
| | | t1.equipment_id equipmentId, |
| | | t3.equipment_name equipmentName, |
| | | t2.parts_code partsCode, |
| | | t2.batch_code batchCode, |
| | | t2.sequence_number sequenceNumber, |
| | | t1.standard_id standardId, |
| | | t1.efficient_date efficientDate, |
| | | t1.process_quantity processQuantity, |
| | | t2.duration duration, |
| | | t1.remark remark, |
| | | t1.create_by createBy, |
| | | t1.create_time createTime, |
| | | t1.update_by updateBy, |
| | | t1.update_time updateTime |
| | | FROM mdc_process_quantity t1 |
| | | LEFT JOIN mdc_standard_process_duration t2 ON t1.standard_id = t2.id |
| | | LEFT JOIN mdc_equipment t3 ON t1.equipment_id = t3.equipment_id |
| | | WHERE t1.equipment_id = #{ equipmentId } AND t1.efficient_date LIKE CONCAT(CONCAT('%',#{ validDate }),'%') |
| | | </select> |
| | | </mapper> |