Compare commits

..

No commits in common. "6460a87a85c6d9ee860dc65352fb45698e573ea2" and "6b33e8955bfd57fc980fad797d10804be4a3ffaf" have entirely different histories.

1 changed files with 11 additions and 31 deletions

View File

@ -469,37 +469,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="getByMaCode" resultType="com.bonus.material.ma.domain.Machine">
SELECT
mi.id as maId,
mi.ma_name as materialName,
mi.ma_model as materialModel,
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
mm.ma_id as maId,
mt2.type_name as materialName,
mt.type_name as materialModel,
mm.ma_code as maCode
FROM
ws_ma_info mi
WHERE mi.ma_code LIKE CONCAT('%',#{maCode},'%') and mi.is_active = 1 and DATEDIFF(mi.next_check_time,NOW()) > 0
UNION
SELECT
mm.ma_id AS id,
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
ma_machine mm
LEFT JOIN ma_type mt on mt.type_id=mm.type_id
LEFT JOIN ma_type mt2 on mt2.type_id=mt.parent_id
WHERE
mm.ma_status = '2' and
mm.ma_code like concat('%', #{maCode}, '%')
</select>
<delete id="deleteMachineByMaCodeAndTypeId">
@ -530,6 +510,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<select id="selectMachineByQrCode" resultType="com.bonus.material.ma.domain.Machine">
SELECT
mm.ma_id as maId,
@ -548,7 +529,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
ma_machine mm
WHERE
mm.qr_code = #{qrCode}
</select>
<select id="getInfoByQrcode" resultMap="MachineResult">