生产单excel导入问题修复:body-plateNum、group-plateNum数量异常问题修复,临时表xml魔值使用枚举直接替换

This commit is contained in:
gaoqr
2025-02-27 09:05:58 +08:00
parent 0887204837
commit 235e80df76
@@ -112,14 +112,14 @@
select count(1)
from (select room_name
from order_import_temp_data
where task_id = #{taskId} and type != 0
where task_id = #{taskId} and type != '${@com.cf.imes.module.executor.enums.OrderImportTmpDataTypeEnum@ORDER.type}'
group by room_name) temp
</select>
<select id="selectRoomGroup" resultType="com.cf.imes.module.plan.dal.dataobject.orderImport.OrderImportTempDataGoodsGroupDO">
select room_name
from order_import_temp_data
where task_id = #{reqVO.taskId} and type != 0
where task_id = #{reqVO.taskId} and type != '${@com.cf.imes.module.executor.enums.OrderImportTmpDataTypeEnum@ORDER.type}'
group by room_name
<if test="reqVO.doPaging">
order by sort
@@ -131,14 +131,14 @@
select count(1)
from (select body_name
from order_import_temp_data
where task_id = #{reqVO.taskId} and room_name = #{reqVO.roomName} and type != 0
where task_id = #{reqVO.taskId} and room_name = #{reqVO.roomName} and type != '${@com.cf.imes.module.executor.enums.OrderImportTmpDataTypeEnum@ORDER.type}'
group by body_name) temp
</select>
<select id="selectBodyGroup" resultType="com.cf.imes.module.plan.dal.dataobject.orderImport.OrderImportTempDataGoodsGroupDO">
select body_name,sum(case type when 1 then num else 0 end) as bodyPlateNum
select body_name,sum(case type when '${@com.cf.imes.module.executor.enums.OrderImportTmpDataTypeEnum@PLATE.type}' then num else 0 end) as bodyPlateNum
from order_import_temp_data
where task_id = #{reqVO.taskId} and room_name = #{reqVO.roomName} and type != 0
where task_id = #{reqVO.taskId} and room_name = #{reqVO.roomName} and type != '${@com.cf.imes.module.executor.enums.OrderImportTmpDataTypeEnum@ORDER.type}'
group by body_name
<if test="reqVO.doPaging">
order by sort
@@ -150,14 +150,14 @@
select count(1)
from (select group_type_name
from order_import_temp_data
where task_id = #{reqVO.taskId} and room_name = #{reqVO.roomName} and body_name = #{reqVO.bodyName} and type != 0
where task_id = #{reqVO.taskId} and room_name = #{reqVO.roomName} and body_name = #{reqVO.bodyName} and type != '${@com.cf.imes.module.executor.enums.OrderImportTmpDataTypeEnum@ORDER.type}'
group by group_type_name) temp
</select>
<select id="selectGroupTypeNameGroup" resultType="com.cf.imes.module.plan.dal.dataobject.orderImport.OrderImportTempDataGoodsGroupDO">
select group_type_name, count(1) as count
from order_import_temp_data
where task_id = #{reqVO.taskId} and room_name = #{reqVO.roomName} and body_name = #{reqVO.bodyName} and type != 0
where task_id = #{reqVO.taskId} and room_name = #{reqVO.roomName} and body_name = #{reqVO.bodyName} and type != '${@com.cf.imes.module.executor.enums.OrderImportTmpDataTypeEnum@ORDER.type}'
group by group_type_name
<if test="reqVO.doPaging">
order by sort
@@ -169,7 +169,7 @@
select count(1)
from (select group_name
from order_import_temp_data
where task_id = #{reqVO.taskId} and room_name = #{reqVO.roomName} and body_name = #{reqVO.bodyName} and type != 0
where task_id = #{reqVO.taskId} and room_name = #{reqVO.roomName} and body_name = #{reqVO.bodyName} and type != '${@com.cf.imes.module.executor.enums.OrderImportTmpDataTypeEnum@ORDER.type}'
<choose>
<when test="reqVO.groupTypeName != null and reqVO.groupTypeName != ''">
and group_type_name = #{reqVO.groupTypeName}
@@ -182,9 +182,9 @@
</select>
<select id="selectGroupNameGroup" resultType="com.cf.imes.module.plan.dal.dataobject.orderImport.OrderImportTempDataGoodsGroupDO">
select group_name, sum(case type when 1 then num else 0 end) as groupNameNum
select group_name, sum(case type when '${@com.cf.imes.module.executor.enums.OrderImportTmpDataTypeEnum@PLATE.type}' then num else 0 end) as groupNameNum
from order_import_temp_data
where task_id = #{reqVO.taskId} and room_name = #{reqVO.roomName} and body_name = #{reqVO.bodyName} and type != 0
where task_id = #{reqVO.taskId} and room_name = #{reqVO.roomName} and body_name = #{reqVO.bodyName} and type != '${@com.cf.imes.module.executor.enums.OrderImportTmpDataTypeEnum@ORDER.type}'
<choose>
<when test="reqVO.groupTypeName != null and reqVO.groupTypeName != ''">
and group_type_name = #{reqVO.groupTypeName}
@@ -249,6 +249,6 @@
<select id="selectPartList" resultType="com.cf.imes.module.plan.dal.dataobject.orderImport.OrderImportTempDataDO">
select *
from order_import_temp_data
where task_id = #{reqVO.taskId} and type = 2 and inner_goods_id = #{reqVO.goodsId}
where task_id = #{reqVO.taskId} and type = '${@com.cf.imes.module.executor.enums.OrderImportTmpDataTypeEnum@PART.type}' and inner_goods_id = #{reqVO.goodsId}
</select>
</mapper>