diff --git a/src/main/java/com/xujie/sys/modules/pms/service/Impl/DmServiceImpl.java b/src/main/java/com/xujie/sys/modules/pms/service/Impl/DmServiceImpl.java
index 11f5d22c..01cdf3ad 100644
--- a/src/main/java/com/xujie/sys/modules/pms/service/Impl/DmServiceImpl.java
+++ b/src/main/java/com/xujie/sys/modules/pms/service/Impl/DmServiceImpl.java
@@ -928,7 +928,6 @@ public class DmServiceImpl implements DmService {
partData.setBuNo(data.getBuNo());
partData.setAttributeNo(data.getAttributeNo());
partData.setAttributeType(data.getAttributeType());
- partData.setInspectionTypeNo(data.getInspectionTypeNo());
// 查询模板的基础数据(沿用 qc_template 的内容)
DmTemplateData templateData2 = dmMapper.selectDmTemplateData(partData);
diff --git a/src/main/resources/mapper/pms/DmFaiMapper.xml b/src/main/resources/mapper/pms/DmFaiMapper.xml
index f822111d..60aa9844 100644
--- a/src/main/resources/mapper/pms/DmFaiMapper.xml
+++ b/src/main/resources/mapper/pms/DmFaiMapper.xml
@@ -156,8 +156,8 @@
c.method_name,
c.method_remark
FROM dm_fai_detailed_record as a
- LEFT JOIN qc_method_item as b on a.site = b.site and a.item_no = b.ItemNo and a.bu_no = b.bu_no
- LEFT JOIN qc_method as c on b.site = c.site and b.method_no = c.method_no and b.bu_no = c.bu_no
+ LEFT JOIN dm_properties_item as b on a.site = b.site and a.item_no = b.ItemNo and a.bu_no = b.bu_no
+ LEFT JOIN dm_method as c on b.site = c.site and b.check_type = c.method_no and b.bu_no = c.bu_no
WHERE a.inspection_no = #{inspectionNo} and a.site = #{site} and a.bu_no = #{buNo}
order by a.order_id
diff --git a/src/main/resources/mapper/pms/DmMapper.xml b/src/main/resources/mapper/pms/DmMapper.xml
index 3517813b..23483e98 100644
--- a/src/main/resources/mapper/pms/DmMapper.xml
+++ b/src/main/resources/mapper/pms/DmMapper.xml
@@ -278,8 +278,8 @@
c.method_name,
c.method_remark
FROM dm_ipqc_detailed_record as a
- LEFT JOIN qc_method_item as b on a.site = b.site and a.item_no = b.ItemNo and a.bu_no = b.bu_no
- LEFT JOIN qc_method as c on b.site = c.site and b.method_no = c.method_no and b.bu_no = c.bu_no
+ LEFT JOIN dm_properties_item as b on a.site = b.site and a.item_no = b.ItemNo and a.bu_no = b.bu_no
+ LEFT JOIN dm_method as c on b.site = c.site and b.check_type = c.method_no and b.bu_no = c.bu_no
WHERE a.inspection_no = #{inspectionNo} and a.site = #{site} and a.bu_no = #{buNo}
order by a.order_id
@@ -1164,7 +1164,8 @@
SELECT
qt.template_id,
qt.template_name,
- qit.inspection_type_name
+ qt.inspection_type_no,
+ dbo.dm_get_inspection_type_name(qt.site, qt.inspection_type_no) as inspectionTypeName
FROM dm_template as qt
LEFT JOIN qc_inspection_type AS qit ON qt.inspection_type_no = qit.inspection_type_no and qt.site = qit.site
@@ -1274,6 +1275,7 @@
AND epi.inspection_type_no = #{query.inspectionTypeNo}
+ order by epi.ItemNo