feat(smartfactory): 优化查询功能和数据准确性
- 在处理组列表查询中添加删除标记过滤,确保只返回未删除的数据- 修复处理组汇总数据查询中的规格名称获取问题 - 新增根据 ID 获取处理组信息的查询方法
This commit is contained in:
parent
5c08e5f5e2
commit
4a295a4ec0
@ -17,6 +17,8 @@
|
|||||||
from sf_handling_group a
|
from sf_handling_group a
|
||||||
left join sf_factory_info as b on a.factory_id = b.id
|
left join sf_factory_info as b on a.factory_id = b.id
|
||||||
<where>
|
<where>
|
||||||
|
a.deleted = 0
|
||||||
|
and b.deleted = 0
|
||||||
<if test="vo.factoryId != null">
|
<if test="vo.factoryId != null">
|
||||||
and a.factory_id = #{vo.factoryId}
|
and a.factory_id = #{vo.factoryId}
|
||||||
</if>
|
</if>
|
||||||
@ -26,7 +28,8 @@
|
|||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<resultMap id="handlingSummaryMap" type="cn.iocoder.yudao.module.smartfactory.controller.admin.handlinggroupamountspecifications.vo.HandlingGroupAmountSpecificationsVO">
|
<resultMap id="handlingSummaryMap"
|
||||||
|
type="cn.iocoder.yudao.module.smartfactory.controller.admin.handlinggroupamountspecifications.vo.HandlingGroupAmountSpecificationsVO">
|
||||||
<!-- 基础字段映射 -->
|
<!-- 基础字段映射 -->
|
||||||
<id property="id" column="id"/>
|
<id property="id" column="id"/>
|
||||||
<result property="factoryId" column="factory_id"/>
|
<result property="factoryId" column="factory_id"/>
|
||||||
@ -87,7 +90,6 @@
|
|||||||
<where>
|
<where>
|
||||||
a.deleted = 0
|
a.deleted = 0
|
||||||
and b.deleted = 0
|
and b.deleted = 0
|
||||||
and c.deleted = 0
|
|
||||||
<if test="vo.factoryId != null">
|
<if test="vo.factoryId != null">
|
||||||
and a.factory_id = #{vo.factoryId}
|
and a.factory_id = #{vo.factoryId}
|
||||||
</if>
|
</if>
|
||||||
@ -131,4 +133,13 @@
|
|||||||
a.date_str,
|
a.date_str,
|
||||||
a.handling_group_id
|
a.handling_group_id
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getHandlingGroup"
|
||||||
|
resultType="cn.iocoder.yudao.module.smartfactory.dal.dataobject.handlinggroup.HandlingGroupDO">
|
||||||
|
SELECT a.*,
|
||||||
|
b.short_name as factoryName
|
||||||
|
FROM sf_handling_group AS a
|
||||||
|
left join sf_factory_info as b on a.factory_id = b.id
|
||||||
|
WHERE a.deleted = 0
|
||||||
|
and a.id = #{id}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
@ -51,4 +51,18 @@
|
|||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getHandlingSpecifications"
|
||||||
|
resultType="cn.iocoder.yudao.module.smartfactory.dal.dataobject.handlingspecifications.HandlingSpecificationsDO">
|
||||||
|
select a.*,
|
||||||
|
b.short_name as factoryName
|
||||||
|
from sf_handling_specifications as a
|
||||||
|
left join sf_factory_info as b on a.factory_id = b.id
|
||||||
|
<where>
|
||||||
|
a.deleted = 0
|
||||||
|
and b.deleted = 0
|
||||||
|
<if test="id != null">
|
||||||
|
and a.id = #{id}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
Loading…
Reference in New Issue
Block a user