fix:套轴逻辑SQL优化

This commit is contained in:
zhouz
2025-06-17 18:27:51 +08:00
parent 9781bbcc99
commit da54fc67ab
4 changed files with 32 additions and 32 deletions

View File

@@ -131,7 +131,7 @@
SELECT bc.*
FROM bst_ivt_cutpointivt bc
LEFT JOIN pdm_bi_slittingproductionplan p ON p.qzzno = bc.qzz_no1 OR p.qzzno = bc.qzz_no2
WHERE bc.point_type IN ('1', '3') AND bc.point_status = '2'
WHERE bc.point_type IN ('1', '3') AND bc.point_status = '2' and p.is_delete = '0'
AND (IFNULL(bc.qzz_no1,'') <![CDATA[ <> ]]> '' OR IFNULL(bc.qzz_no2,'') <![CDATA[ <> ]]> '')
AND p.resource_name = #{resource_name} AND IFNULL(p.qzzno, '') <![CDATA[ <> ]]> ''

View File

@@ -64,7 +64,7 @@
p.qzz_generation
) AS combined_data
ORDER BY
start_time
start_time,split_group
</select>
<select id="getAllHalfPlan" resultType="org.nl.b_lms.sch.tasks.slitter.mapper.dto.SlitterPlanDistinctDto">
WITH RankedData AS (

View File

@@ -123,14 +123,14 @@ public class InBoxManageServiceImpl implements InBoxManageService {
}
//查询托盘重量
JSONObject vehicle_ext = WQLObject.getWQLObject("md_pb_storagevehicleext").query("storagevehicle_code = '" + vehicleCode2 + "'").uniqueResult(0);
JSONObject vehicle_ext = WQLObject.getWQLObject("md_pb_storagevehicleext").query("storagevehicle_code = '" + whereJson.getString("vehicle_code") + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(vehicle_ext)) {
throw new BadRequestException("未查询到托盘的扩展信息");
}else {
//判断托盘重量是否为空或小于等于0
String qty = vehicle_ext.getString("qty");
if (StrUtil.isEmpty(qty) || Double.parseDouble(qty) <= 0){
throw new BadRequestException("托盘【"+vehicleCode2+"】在系统的重量有误,请在载具维护页面中维护托盘实际重量!");
throw new BadRequestException("托盘【"+whereJson.getString("vehicle_code")+"】在系统的重量有误,请在载具维护页面中维护托盘实际重量!");
}
}