Merge remote-tracking branch 'origin/ah-simple-test' into ah-simple-test
This commit is contained in:
commit
08b1ed900a
|
|
@ -248,7 +248,7 @@
|
||||||
dev.max_working_hours as maxWorkingHours
|
dev.max_working_hours as maxWorkingHours
|
||||||
FROM
|
FROM
|
||||||
cs_device_change_details dcd
|
cs_device_change_details dcd
|
||||||
LEFT JOIN ma_dev_info dev ON dcd.dev_type_id = dev.ma_id
|
LEFT JOIN ma_dev_info dev ON dcd.dev_code = dev.code
|
||||||
LEFT JOIN bm_company_info bci ON bci.company_id = dev.on_company
|
LEFT JOIN bm_company_info bci ON bci.company_id = dev.on_company
|
||||||
INNER JOIN ma_type_view mt ON mt.typeId = dev.type_id
|
INNER JOIN ma_type_view mt ON mt.typeId = dev.type_id
|
||||||
LEFT JOIN (SELECT max(next_check_time) next_check_time, ma_id FROM ma_dev_qc GROUP BY ma_id) mdq ON dev.ma_id = mdq.ma_id
|
LEFT JOIN (SELECT max(next_check_time) next_check_time, ma_id FROM ma_dev_qc GROUP BY ma_id) mdq ON dev.ma_id = mdq.ma_id
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
<select id="list" resultType="com.bonus.material.devchange.domain.MaDevInfo">
|
<select id="list" resultType="com.bonus.material.devchange.domain.MaDevInfo">
|
||||||
select * from (
|
select * from (
|
||||||
SELECT
|
SELECT
|
||||||
c.company_name AS propertyUnit,
|
sd.dept_name AS propertyUnit,
|
||||||
mdi.ma_id AS maId,
|
mdi.ma_id AS maId,
|
||||||
mdi.device_name AS name,
|
mdi.device_name AS name,
|
||||||
mdi.item_type_model AS specificationModel,
|
mdi.item_type_model AS specificationModel,
|
||||||
|
|
@ -49,10 +49,14 @@
|
||||||
END AS status
|
END AS status
|
||||||
FROM
|
FROM
|
||||||
ma_dev_info mdi
|
ma_dev_info mdi
|
||||||
|
INNER JOIN ma_type_view mtv ON mtv.typeId = mdi.type_id
|
||||||
|
LEFT JOIN jj_sing_project jsp ON mdi.on_project = jsp.pro_code
|
||||||
LEFT JOIN sys_dept sd ON sd.dept_id = mdi.on_company
|
LEFT JOIN sys_dept sd ON sd.dept_id = mdi.on_company
|
||||||
LEFT JOIN bm_company_info c ON sd.dept_id = c.company_id
|
LEFT JOIN (SELECT max( next_check_time) next_check_time,ma_id from ma_dev_qc GROUP BY ma_id ) mdq on
|
||||||
|
mdi.ma_id=mdq.ma_id
|
||||||
LEFT JOIN ma_supplier ms ON ms.supplier_id = mdi.supplier_id
|
LEFT JOIN ma_supplier ms ON ms.supplier_id = mdi.supplier_id
|
||||||
WHERE mdi.is_active = 1 and mdi.entry_status = '1' and mdi.change_status in (1,5)
|
LEFT JOIN sys_cnarea sc ON sc.area_code = mdi.province_id
|
||||||
|
WHERE mdi.is_active = 1 and mdi.entry_status = '1'
|
||||||
<if test="name != null and name != ''">
|
<if test="name != null and name != ''">
|
||||||
AND mdi.device_name like concat('%',#{name},'%')
|
AND mdi.device_name like concat('%',#{name},'%')
|
||||||
</if>
|
</if>
|
||||||
|
|
|
||||||
|
|
@ -82,8 +82,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
latest_qc ON m1.ma_id = latest_qc.ma_id
|
latest_qc ON m1.ma_id = latest_qc.ma_id
|
||||||
LEFT JOIN ( SELECT ma_id, min( create_time ) AS create_time FROM ma_dev_qc GROUP BY ma_id ) aa ON m1.ma_id =
|
LEFT JOIN ( SELECT ma_id, min( create_time ) AS create_time FROM ma_dev_qc GROUP BY ma_id ) aa ON m1.ma_id =
|
||||||
aa.ma_id
|
aa.ma_id
|
||||||
|
|
||||||
|
LEFT JOIN jj_sing_project jsp ON m2.on_project = jsp.pro_code
|
||||||
|
LEFT JOIN sys_dept sd ON sd.dept_id = m2.on_company
|
||||||
|
|
||||||
|
LEFT JOIN ma_supplier ms ON ms.supplier_id = m2.supplier_id
|
||||||
|
LEFT JOIN sys_cnarea sc ON sc.area_code = m2.province_id
|
||||||
<where>
|
<where>
|
||||||
m2.is_active = '1'
|
m2.is_active = '1' and m2.entry_status = '1'
|
||||||
<if test="deviceCode != null and deviceCode != ''">
|
<if test="deviceCode != null and deviceCode != ''">
|
||||||
and m2.code like concat('%',#{deviceCode},'%')
|
and m2.code like concat('%',#{deviceCode},'%')
|
||||||
</if>
|
</if>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue