feat(oms):入库导入模板饮用日期解析修复,入库单列表联查带出饮用有效日期
1. 入库/执行入库Excel解析监听器:扩充日期格式支持(yyyy年M月d日、d/M/yyyy、M/d/yyyy、dd.MM.yyyy等16种), 改为严格解析防止宽松解析产生公元1~99年脏数据,新增Excel日期序列号兜底及年份合理性校验, 解析失败抛出带行号的明确提示而非静默置空 2. parse-excel接口异常时返回具体错误信息(原为空body 500) 3. 入库单列表queryList联查明细表取最早饮用日期(MIN drink_date),PO及resultMap补drinkDate映射
This commit is contained in:
+9
-1
@@ -109,6 +109,8 @@
|
||||
<result property="discount" column="DISCOUNT" />
|
||||
<result property="isFreeManpowerFee" column="IS_FREE_MANPOWER_FEE" />
|
||||
<result property="executionInOrderNumber" column="EXECUTION_IN_ORDER_NUMBER" />
|
||||
<!-- 饮用有效日期:queryList联查明细表聚合带出,其他查询无此列时不填充 -->
|
||||
<result property="drinkDate" column="drink_date" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
@@ -513,8 +515,14 @@
|
||||
|
||||
<select id="queryList" parameterType="com.mhd.oms.domain.reservationStockInOrder.repository.todo.ReservationStockInOrderDO" resultMap="StockInOrderResult">
|
||||
select
|
||||
<include refid="selectStockInOrderPo"/>
|
||||
<include refid="selectStockInOrderPo"/>, t.drink_date
|
||||
from reservation_stock_in_order a
|
||||
<!-- 饮用有效日期:取明细表最早饮用日期(一张单多行明细日期不同时按最早到期口径展示) -->
|
||||
left join (select in_order_number, min(drink_date) as drink_date
|
||||
from reservation_in_material_detail
|
||||
where del_flag = 1 and drink_date is not null
|
||||
group by in_order_number) t
|
||||
on a.in_order_number = t.in_order_number
|
||||
<where>
|
||||
<include refid="selectStockInOrderPo1"/>
|
||||
</where>
|
||||
|
||||
Reference in New Issue
Block a user