| | |
| | | <result column="appe_time" property="appeTime" /> |
| | | <result column="memo" property="memo" /> |
| | | </resultMap> |
| | | |
| | | <sql id="batchSeq"> |
| | | <if test="wrkNo != null and wrkNo != ''"> |
| | | and a.wrk_no = #{wrkNo} |
| | | </if> |
| | | <if test="modiTimeStart != null "> |
| | | <if test="modiTimeEnd != null "> |
| | | and a.modi_time between #{modiTimeStart} and #{modiTimeEnd} |
| | | </if> |
| | | </if> |
| | | <if test="orderNo != null and orderNo != ''"> |
| | | and ( a.order_no like concat('%',#{orderNo},'%') |
| | | or a.batch like concat('%',#{orderNo},'%') |
| | | or a.matnr like concat('%',#{orderNo},'%') |
| | | or a.zpallet like concat('%',#{orderNo},'%') |
| | | ) |
| | | </if> |
| | | </sql> |
| | | |
| | | <select id="selectWrkDetlLogs" resultMap="BaseResultMap"> |
| | | select d.* from ( |
| | | select |
| | | ROW_NUMBER() over (order by c.modi_time desc) as row, |
| | | c.* from ( |
| | | select a.* from asr_wrk_detl_log as a ,asr_wrk_mast_log as b |
| | | where 1=1 |
| | | and a.io_time=b.io_time |
| | | and a.wrk_no=b.wrk_no |
| | | and (b.manu_type is NULL or b.manu_type='手动完成') |
| | | <include refid="batchSeq"></include> |
| | | ) as c |
| | | ) as d |
| | | where d.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize}) order by d.modi_time desc |
| | | </select> |
| | | |
| | | <select id="selectWrkDetlLogsTotal" resultType="Long"> |
| | | select count(*) from asr_wrk_detl_log as a ,asr_wrk_mast_log as b |
| | | where 1=1 |
| | | and a.io_time=b.io_time |
| | | and a.wrk_no=b.wrk_no |
| | | and (b.manu_type is NULL or b.manu_type='手动完成') |
| | | <include refid="batchSeq"></include> |
| | | </select> |
| | | |
| | | </mapper> |