Browse Source

2025-04-15

qc新增检验优化
java8
fengyuan_yang 9 months ago
parent
commit
e86fb8ea46
  1. 2
      src/main/java/com/xujie/sys/modules/pms/controller/QcReportController.java
  2. 6
      src/main/java/com/xujie/sys/modules/pms/service/Impl/QcServiceImpl.java
  3. 2
      src/main/resources/mapper/pms/PqcMapper.xml
  4. 6
      src/main/resources/mapper/pms/QcMapper.xml

2
src/main/java/com/xujie/sys/modules/pms/controller/QcReportController.java

@ -146,8 +146,6 @@ public class QcReportController {
} catch (IOException e) {
return R.error(e.getMessage());
}
}
}

6
src/main/java/com/xujie/sys/modules/pms/service/Impl/QcServiceImpl.java

@ -4914,6 +4914,12 @@ public class QcServiceImpl implements QcService {
@Override
public List<QcFAIRecordData> searchSeqInfo(QcFAIRecordData data) {
if (data.getBu().split("_").length >= 2 ) {
data.setSite(data.getBu().split("_")[0]);
data.setBuNo(data.getBu().split("_")[1]);
} else {
throw new RuntimeException("工厂和部门有误!");
}
List<QcFAIRecordData> list = qcMapper.searchSeqInfo(data);
return list;
}

2
src/main/resources/mapper/pms/PqcMapper.xml

@ -323,7 +323,7 @@
qt.template_name
FROM soscheduledrouting as a
LEFT JOIN so_routing as c ON a.site = c.site and c.order_no = a.orderno and a.itemno = c.item_no
LEFT JOIN part j ON a.site = j.site and a.part_no = j.part_no
LEFT JOIN part as j ON a.site = j.site and a.part_no = j.part_no
LEFT JOIN qc_attribute_template as qat on j.site = qat.site and j.sourceBu = qat.bu_no and j.part_no = qat.attribute_no and qat.inspection_type_no = #{inspectionTypeNo}
LEFT JOIN qc_template as qt on qat.site = qt.site and qat.bu_no = qt.bu_no and qat.template_id = qt.template_id
WHERE a.site = #{site} and a.seqno = #{seqNo}

6
src/main/resources/mapper/pms/QcMapper.xml

@ -1071,13 +1071,13 @@
<!-- 删除物料属性 -->
<delete id="qcPartAttributeDelete" parameterType="com.xujie.sys.modules.pms.data.QcPartAttributeData">
DELETE FROM qc_part_attribute
WHERE site = #{site} and attribute_no = #{partNo} and attribute_type = #{attributeType}
WHERE site = #{site} and bu_no = #{buNo} and attribute_no = #{partNo} and attribute_type = #{attributeType}
</delete>
<!-- 删除物料属性模板 -->
<delete id="deletePartAttributeTemplate" parameterType="com.xujie.sys.modules.pms.data.QcPartAttributeData">
DELETE FROM qc_attribute_template
WHERE site = #{site} and attribute_no = #{partNo} and attribute_type = #{attributeType}
WHERE site = #{site} and bu_no = #{buNo} and attribute_no = #{partNo} and attribute_type = #{attributeType}
</delete>
<!-- 查询类别模板 -->
@ -3303,7 +3303,7 @@
inner JOIN shoporder AS t ON a.site = t.site AND t.orderno = a.orderno
left join qc_ipqc_record as r on a.site = r.site and a.seqno = r.seq_no
WHERE
a.site = #{query.site}
a.site = #{query.site} and J.sourceBu = #{query.buNo}
<if test="query.status != null and query.status != ''">
AND t.status = #{query.status}
</if>

Loading…
Cancel
Save