撤回功能

This commit is contained in:
hongchao 2025-09-15 00:10:55 +08:00
parent a403ec5405
commit 51250a0b3a
1 changed files with 43 additions and 33 deletions

View File

@ -726,38 +726,37 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="getListByCode" resultType="com.bonus.material.ma.domain.Machine">
SELECT
mm.ma_id as maId,
mt2.type_name as maName,
mt.type_name as maModel,
mm.ma_code as maCode,
mm.qr_code as qrCode,
mm.type_id as typeId,
sd.dict_label as maStatus,
mm.qr_code as qrCode,
-- 判断ma_vender是否为数字是则取msi.supplier否则取mm.ma_vender
CASE
WHEN mm.ma_vender REGEXP '^[0-9]+$' THEN msi.supplier
ELSE mm.ma_vender
END as maVender,
mm.out_fac_time as outFacTime,
mm.out_fac_code as outFacCode,
mm.assets_code as assetsCode,
mm.check_man as checkMan,
mm.this_check_time as thisCheckTime,
mm.next_check_time as nextCheckTime,
mm.in_out_num as inOutNum
mm.ma_id as maId,
mt2.type_name as maName,
mt.type_name as maModel,
mm.ma_code as maCode,
mm.qr_code as qrCode,
mm.type_id as typeId,
sd.dict_label as maStatus,
-- 判断ma_vender是否为数字是则取msi.supplier否则取mm.ma_vender
CASE
WHEN mm.ma_vender REGEXP '^[0-9]+$' THEN msi.supplier
ELSE mm.ma_vender
END as maVender,
mm.out_fac_time as outFacTime,
mm.out_fac_code as outFacCode,
mm.assets_code as assetsCode,
mm.check_man as checkMan,
mm.this_check_time as thisCheckTime,
mm.next_check_time as nextCheckTime,
mm.in_out_num as inOutNum,
mt.jiju_type as devType
FROM
ma_machine mm
LEFT JOIN ma_type mt ON mt.type_id = mm.type_id
LEFT JOIN ma_type mt2 ON mt.parent_id = mt2.type_id
LEFT JOIN sys_dict_data sd on mm.ma_status = sd.dict_value and sd.dict_type = "ma_machine_status"
LEFT JOIN ma_supplier_info msi on msi.supplier_id = mm.ma_vender
ma_machine mm
LEFT JOIN ma_type mt ON mt.type_id = mm.type_id
LEFT JOIN ma_type mt2 ON mt.parent_id = mt2.type_id
LEFT JOIN sys_dict_data sd on mm.ma_status = sd.dict_value and sd.dict_type = "ma_machine_status"
LEFT JOIN ma_supplier_info msi on msi.supplier_id = mm.ma_vender
where 1=1
<if test="maCode != null">and mm.ma_code LIKE CONCAT('%',#{maCode},'%')</if>
<if test="maId != null">and mm.ma_id = #{maId}</if>
limit 100
<if test="maCode != null">and mm.ma_code LIKE CONCAT('%',#{maCode},'%') </if>
<if test="qrCode != null">and mm.qr_code = #{qrCode} </if>
limit 100
</select>
<select id="getInfoByMaCode" resultType="com.bonus.material.ma.domain.Machine">
@ -978,15 +977,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select parent_id as parentId,DATE_FORMAT(create_time, '%Y-%m-%d') as leaseTime from lease_out_details where ma_id = #{maId} order by create_time desc limit 1
</select>
<select id="getLeaseUnitAndProject" resultType="com.bonus.common.biz.domain.lease.LeaseApplyInfo">
select
bu.unit_name as unitName,
bp.pro_name as projectName,
DATE_FORMAT(lai.create_time, '%Y-%m-%d') as leaseTime
select CASE
WHEN
tt.task_type = '19' THEN
bu2.unit_name
ELSE bu.unit_name
END unitName,
CASE
WHEN tt.task_type = '19' THEN
bp2.pro_name
ELSE bp.pro_name
END projectName,
DATE_FORMAT(lai.create_time, '%Y-%m-%d') as leaseTime
from lease_apply_info lai
left join tm_task_agreement tta on lai.task_id = tta.task_id
left join bm_agreement_info bai on tta.agreement_id = bai.agreement_id
left join bm_unit bu on bai.unit_id = bu.unit_id
left join bm_project bp on bai.project_id = bp.pro_id
LEFT JOIN tm_task tt ON tt.task_id = lai.task_id
LEFT JOIN bm_unit bu2 ON bu2.unit_id = lai.unit_id
LEFT JOIN bm_project bp2 ON bp2.pro_id = lai.project_id
where lai.id = #{parentId}
</select>
<select id="getBackParentId" resultType="com.bonus.common.biz.domain.lease.LeaseApplyInfo">