@ -678,8 +678,8 @@
LEFT JOIN (select MasterID,COUNT(*) num from archive_printInfo group by MasterID) printTable
on m.id=printTable.MasterID
where 1=1
and patindex('%B%',m.inp_no) = 0
and m.ArchiveState not in('作废')
and patindex('%B%',m.inp_no) in (0,1)
and m.ArchiveState not in('作废','已封存')
<if test="id != null and id != ''">
and m.id = #{id,jdbcType=NVARCHAR}
</if>