撤回功能
This commit is contained in:
parent
a403ec5405
commit
51250a0b3a
|
|
@ -726,38 +726,37 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
|
||||||
<select id="getListByCode" resultType="com.bonus.material.ma.domain.Machine">
|
<select id="getListByCode" resultType="com.bonus.material.ma.domain.Machine">
|
||||||
SELECT
|
SELECT
|
||||||
mm.ma_id as maId,
|
mm.ma_id as maId,
|
||||||
mt2.type_name as maName,
|
mt2.type_name as maName,
|
||||||
mt.type_name as maModel,
|
mt.type_name as maModel,
|
||||||
mm.ma_code as maCode,
|
mm.ma_code as maCode,
|
||||||
mm.qr_code as qrCode,
|
mm.qr_code as qrCode,
|
||||||
mm.type_id as typeId,
|
mm.type_id as typeId,
|
||||||
sd.dict_label as maStatus,
|
sd.dict_label as maStatus,
|
||||||
mm.qr_code as qrCode,
|
-- 判断ma_vender是否为数字,是则取msi.supplier,否则取mm.ma_vender
|
||||||
-- 判断ma_vender是否为数字,是则取msi.supplier,否则取mm.ma_vender
|
CASE
|
||||||
CASE
|
WHEN mm.ma_vender REGEXP '^[0-9]+$' THEN msi.supplier
|
||||||
WHEN mm.ma_vender REGEXP '^[0-9]+$' THEN msi.supplier
|
ELSE mm.ma_vender
|
||||||
ELSE mm.ma_vender
|
END as maVender,
|
||||||
END as maVender,
|
mm.out_fac_time as outFacTime,
|
||||||
mm.out_fac_time as outFacTime,
|
mm.out_fac_code as outFacCode,
|
||||||
mm.out_fac_code as outFacCode,
|
mm.assets_code as assetsCode,
|
||||||
mm.assets_code as assetsCode,
|
mm.check_man as checkMan,
|
||||||
mm.check_man as checkMan,
|
mm.this_check_time as thisCheckTime,
|
||||||
mm.this_check_time as thisCheckTime,
|
mm.next_check_time as nextCheckTime,
|
||||||
mm.next_check_time as nextCheckTime,
|
mm.in_out_num as inOutNum,
|
||||||
mm.in_out_num as inOutNum
|
mt.jiju_type as devType
|
||||||
FROM
|
FROM
|
||||||
ma_machine mm
|
ma_machine mm
|
||||||
LEFT JOIN ma_type mt ON mt.type_id = mm.type_id
|
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 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 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
|
LEFT JOIN ma_supplier_info msi on msi.supplier_id = mm.ma_vender
|
||||||
where 1=1
|
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>
|
<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>
|
||||||
|
|
||||||
<select id="getInfoByMaCode" resultType="com.bonus.material.ma.domain.Machine">
|
<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 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>
|
||||||
<select id="getLeaseUnitAndProject" resultType="com.bonus.common.biz.domain.lease.LeaseApplyInfo">
|
<select id="getLeaseUnitAndProject" resultType="com.bonus.common.biz.domain.lease.LeaseApplyInfo">
|
||||||
select
|
select CASE
|
||||||
bu.unit_name as unitName,
|
WHEN
|
||||||
bp.pro_name as projectName,
|
tt.task_type = '19' THEN
|
||||||
DATE_FORMAT(lai.create_time, '%Y-%m-%d') as leaseTime
|
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
|
from lease_apply_info lai
|
||||||
left join tm_task_agreement tta on lai.task_id = tta.task_id
|
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_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_unit bu on bai.unit_id = bu.unit_id
|
||||||
left join bm_project bp on bai.project_id = bp.pro_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}
|
where lai.id = #{parentId}
|
||||||
</select>
|
</select>
|
||||||
<select id="getBackParentId" resultType="com.bonus.common.biz.domain.lease.LeaseApplyInfo">
|
<select id="getBackParentId" resultType="com.bonus.common.biz.domain.lease.LeaseApplyInfo">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue