fix(oms): 出入库联合列表(inAndOutList)查询条件修复与补全
1. 修复 ReflectionException:mapper XML <if> 引用 inOrOut/orderNumber 但 DO 无对应字段, DO/DTO 新增 inOrOut、orderNumber 查询字段(BeanUtils 同名自动拷贝,前端参数直达 mapper) 2. inOrOut 排除空串与 'all'(前端"全部"约定值),避免拼出 ="all" 查空 3. orderNumber 排除空串并改为 like 模糊匹配(与出库单列表单号搜索口径一致) 4. status 新增精确筛选(0 为有效条件值,按前端约定直传,"全部"时不传)
This commit is contained in:
+6
@@ -446,4 +446,10 @@ public class ReserveStockInOrderDO extends BaseVOEntity {
|
|||||||
@ApiModelProperty("客户名称")
|
@ApiModelProperty("客户名称")
|
||||||
@Excel(name = "客户名称")
|
@Excel(name = "客户名称")
|
||||||
private String customerName;
|
private String customerName;
|
||||||
|
|
||||||
|
@ApiModelProperty("出入库方向(inAndOutList查询条件): in-入库 out-出库 all/空-全部")
|
||||||
|
private String inOrOut;
|
||||||
|
|
||||||
|
@ApiModelProperty("出入库单号(inAndOutList查询条件,模糊匹配,出库out_order_number/入库in_order_number)")
|
||||||
|
private String orderNumber;
|
||||||
}
|
}
|
||||||
+6
@@ -443,4 +443,10 @@ public class ReserveStockInOrderDTO extends ReserveStockInOrderBaseDTO {
|
|||||||
@ApiModelProperty("客户名称")
|
@ApiModelProperty("客户名称")
|
||||||
@Excel(name = "客户名称")
|
@Excel(name = "客户名称")
|
||||||
private String customerName;
|
private String customerName;
|
||||||
|
|
||||||
|
@ApiModelProperty("出入库方向(inAndOutList查询条件): in-入库 out-出库 all/空-全部")
|
||||||
|
private String inOrOut;
|
||||||
|
|
||||||
|
@ApiModelProperty("出入库单号(inAndOutList查询条件,模糊匹配,出库out_order_number/入库in_order_number)")
|
||||||
|
private String orderNumber;
|
||||||
}
|
}
|
||||||
@@ -558,7 +558,7 @@
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<select id="detailsList" parameterType="com.mhd.oms.domain.reserveStockInOrder.repository.todo.ReserveStockInOrderDO" resultMap="MaterialDetailResult">
|
<select id="detailsList" parameterType="com.mhd.oms.domain.reserveStockInOrder.repository.todo.ReserveStockInOrderDO" resultMap="MaterialDetailResult">
|
||||||
select b.*
|
select b.*, a.status, a.issue_status
|
||||||
from reserve_stock_in_order a left join reserve_in_material_detail b on a.IN_ORDER_NUMBER = b.IN_ORDER_NUMBER
|
from reserve_stock_in_order a left join reserve_in_material_detail b on a.IN_ORDER_NUMBER = b.IN_ORDER_NUMBER
|
||||||
<where>
|
<where>
|
||||||
<include refid="selectStockInOrderPo1"/>
|
<include refid="selectStockInOrderPo1"/>
|
||||||
@@ -671,14 +671,17 @@
|
|||||||
<if test="customerId != null">
|
<if test="customerId != null">
|
||||||
and a."customerId" = #{customerId}
|
and a."customerId" = #{customerId}
|
||||||
</if>
|
</if>
|
||||||
<if test="inOrOut != null">
|
<if test="inOrOut != null and inOrOut != '' and inOrOut != 'all'">
|
||||||
and a."inOrOut" = #{inOrOut}
|
and a."inOrOut" = #{inOrOut}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="status != null">
|
||||||
|
and a."status" = #{status}
|
||||||
|
</if>
|
||||||
<if test="issueStatus != null">
|
<if test="issueStatus != null">
|
||||||
and a."issueStatus" = #{issueStatus}
|
and a."issueStatus" = #{issueStatus}
|
||||||
</if>
|
</if>
|
||||||
<if test="orderNumber != null">
|
<if test="orderNumber != null and orderNumber != ''">
|
||||||
and a."orderNumber" = #{orderNumber}
|
and a."orderNumber" like concat('%', #{orderNumber}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="createTimeStart != null and createTimeStart != ''">
|
<if test="createTimeStart != null and createTimeStart != ''">
|
||||||
and date_format(a."createTime",'%Y-%m-%d') >= #{createTimeStart}
|
and date_format(a."createTime",'%Y-%m-%d') >= #{createTimeStart}
|
||||||
|
|||||||
Reference in New Issue
Block a user