Merge remote-tracking branch 'origin/master'

This commit is contained in:
jiang 2025-06-25 16:48:55 +08:00
commit 002f325cb1
1 changed files with 31 additions and 11 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">
@ -510,7 +530,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update> </update>
<select id="selectMachineByQrCode" resultType="com.bonus.material.ma.domain.Machine"> <select id="selectMachineByQrCode" resultType="com.bonus.material.ma.domain.Machine">
SELECT SELECT
mm.ma_id as maId, mm.ma_id as maId,
@ -529,6 +548,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
ma_machine mm ma_machine mm
WHERE WHERE
mm.qr_code = #{qrCode} mm.qr_code = #{qrCode}
</select> </select>
<select id="getInfoByQrcode" resultMap="MachineResult"> <select id="getInfoByQrcode" resultMap="MachineResult">