feat(mapper): 添加参数注解并优化查询条件

- 为 BaseOrderInfoMapper 的方法添加 @Param 注解以支持 MyBatis 参数映射
- 在工单查询条件中使用 nvl 函数处理执行状态空值情况
- 在停机记录查询中新增按停机原因ID过滤的功能
master
zangch@mesnac.com 2 days ago
parent be0ae3b4ff
commit 0c2428045a

@ -3,6 +3,7 @@ package com.aucma.base.mapper;
import java.util.List;
import com.aucma.base.domain.BaseOrderInfo;
import org.apache.ibatis.annotations.Param;
/**
* Mapper
@ -75,7 +76,9 @@ public interface BaseOrderInfoMapper {
* @param startTime
* @return
*/
public int batchStartProduction(Long[] objIds, String operator, java.util.Date startTime);
public int batchStartProduction(@Param("objIds") Long[] objIds,
@Param("operator") String operator,
@Param("startTime") java.util.Date startTime);
/**
*
@ -86,7 +89,10 @@ public interface BaseOrderInfoMapper {
* @param updateTime
* @return
*/
public int batchUpdateQuantity(Long[] objIds, Long completeQty, Long defectQty, java.util.Date updateTime);
public int batchUpdateQuantity(@Param("objIds") Long[] objIds,
@Param("completeQty") Long completeQty,
@Param("defectQty") Long defectQty,
@Param("updateTime") java.util.Date updateTime);
/**
*
@ -97,5 +103,8 @@ public interface BaseOrderInfoMapper {
* @param finishTime
* @return
*/
public int batchCompleteProduction(Long[] objIds, Long completeQty, Long defectQty, java.util.Date finishTime);
public int batchCompleteProduction(@Param("objIds") Long[] objIds,
@Param("completeQty") Long completeQty,
@Param("defectQty") Long defectQty,
@Param("finishTime") java.util.Date finishTime);
}

@ -93,7 +93,7 @@
<if test="orderStatus != null and orderStatus != '' and orderStatus != 'RELCRTD'">and oi.order_status LIKE #{orderStatus} || '%'</if>
<if test="orderStatus != null and orderStatus != '' and orderStatus == 'RELCRTD'">and (oi.order_status LIKE 'REL%' OR oi.order_status LIKE 'CRTD%')</if>
<if test="manualUpdateFlag != null and manualUpdateFlag != ''">and oi.manual_update_flag = #{manualUpdateFlag}</if>
<if test="executionStatus != null and executionStatus != ''">and oi.execution_status = #{executionStatus}</if>
<if test="executionStatus != null and executionStatus != ''">and nvl(oi.execution_status, 'PENDING') = #{executionStatus}</if>
<if test="beginDate != null ">and oi.begin_date = #{beginDate}</if>
<if test="endDate != null ">and oi.end_date = #{endDate}</if>
<if test="beginTime != null and endTime != null">

@ -53,6 +53,7 @@
<where>
<if test="shutType != null ">and r.shut_type_id = #{shutType}</if>
<if test="shutReason != null and shutReason != ''">and r.shut_reason = #{shutReason}</if>
<if test="shutReasonId != null">and r.shut_reason_id = #{shutReasonId}</if>
<if test="beginTime != null and endTime != null">
and r.shut_begin_time between #{beginTime} and #{endTime}
</if>

Loading…
Cancel
Save