振华电子标签

This commit is contained in:
lizhenhua 2025-06-25 15:53:52 +08:00
parent 40543b9091
commit 287d6c9ad0
1 changed files with 30 additions and 10 deletions

View File

@ -469,17 +469,37 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="getByMaCode" resultType="com.bonus.material.ma.domain.Machine"> <select id="getByMaCode" resultType="com.bonus.material.ma.domain.Machine">
SELECT SELECT
mm.ma_id as maId, mi.id as maId,
mt2.type_name as materialName, mi.ma_name as materialName,
mt.type_name as materialModel, mi.ma_model as materialModel,
mm.ma_code as maCode mi.ma_code as maCode,
mi.this_check_time as thisCheckTime,
mi.next_check_time as nextCheckTime,
mi.repair_man as repairMan,
mi.check_man as checkMan,
mi.phone,
mi.result,null AS reportCode,null AS reportUrl,
mi.type
FROM FROM
ma_machine mm ws_ma_info mi
LEFT JOIN ma_type mt on mt.type_id=mm.type_id WHERE mi.ma_code LIKE CONCAT('%',#{maCode},'%') and mi.is_active = 1 and DATEDIFF(mi.next_check_time,NOW()) > 0
LEFT JOIN ma_type mt2 on mt2.type_id=mt.parent_id UNION
WHERE SELECT
mm.ma_status = '2' and mm.ma_id AS id,
mm.ma_code like concat('%', #{maCode}, '%') mt2.type_name as maName,
mt.type_name as maModel,
mm.ma_code as maCode,
mm.this_check_time as thisCheckTime,
mm.next_check_time as nextCheckTime,
mm.check_man as repairMan,
ifnull(mm.inspect_man,"高民") as checkMan,
"0551-63703966" as phone,
"合格" as result,mm.ex_code AS reportCode,mm.ex_url AS reportUrl,
is_jj as type
FROM ma_machine mm
LEFT JOIN ma_type mt on mm.type_id = mt.type_id
LEFT JOIN ma_type mt2 on mt.parent_id = mt2.type_id
WHERE mm.ma_code LIKE CONCAT('%',#{maCode},'%') and mt.MANAGE_TYPE =0 and DATEDIFF(mm.next_check_time,NOW()) > 0
</select> </select>
<delete id="deleteMachineByMaCodeAndTypeId"> <delete id="deleteMachineByMaCodeAndTypeId">