|
|
@@ -15,4 +15,50 @@
|
|
|
<sql id="Base_Column_List">
|
|
|
id,task_id,item_id,version_id,quantity
|
|
|
</sql>
|
|
|
+
|
|
|
+ <select id="details" resultType="com.ruoyi.wms.domain.vo.TaskDetailsVo">
|
|
|
+ select wt.task_code,
|
|
|
+ wi.item_code,
|
|
|
+ wi.item_name,
|
|
|
+ wi.item_brand,
|
|
|
+ wis.sku_code,
|
|
|
+ wis.sku_name,
|
|
|
+ wbv.version,
|
|
|
+ wtd.quantity,
|
|
|
+ wt.completion_time
|
|
|
+ from wms_task_details wtd
|
|
|
+ left join wms_task wt on wt.id = wtd.task_id
|
|
|
+ left join wms_bom_version wbv on wbv.id = wtd.version_id
|
|
|
+ left join wms_item_sku wis on wis.id = wtd.item_sku_id
|
|
|
+ left join wms_item wi on wi.id = wis.item_id
|
|
|
+ <where>
|
|
|
+ <if test='bo.taskCode != null and bo.taskCode !=""'>
|
|
|
+ and wt.task_code = CONCAT('%', #{bo.taskCode}, '%')
|
|
|
+ </if>
|
|
|
+ <if test='bo.itemCode != null and bo.itemCode !=""'>
|
|
|
+ and wi.item_code = CONCAT('%', #{bo.itemCode}, '%')
|
|
|
+ </if>
|
|
|
+ <if test='bo.itemName != null and bo.itemName !=""'>
|
|
|
+ and wi.item_name = CONCAT('%', #{itemName}, '%')
|
|
|
+ </if>
|
|
|
+ <if test='bo.skuName != null and bo.skuName !=""'>
|
|
|
+ and wis.sku_name = CONCAT('%', #{bo.skuName}, '%')
|
|
|
+ </if>
|
|
|
+ <if test='bo.versionId != null'>
|
|
|
+ and wtd.version_id = #{bo.versionId}
|
|
|
+ </if>
|
|
|
+ <if test='bo.startCreateTime != null and bo.endCreateTime !=null'>
|
|
|
+ and wt.create_time > CONCAT(#{bo.startCreateTime}, " 00:00:00")
|
|
|
+ and wt.create_time <= CONCAT(#{bo.endCreateTime}, " 23:59:59")
|
|
|
+ </if>
|
|
|
+ <if test='bo.startCompletionTime != null and bo.endCompletionTime !=""'>
|
|
|
+ and wt.completion_time > CONCAT(#{bo.startCompletionTime}, " 00:00:00")
|
|
|
+ and wt.completion_time <= CONCAT(#{bo.endCompletionTime}, " 23:59:59")
|
|
|
+ </if>
|
|
|
+
|
|
|
+ </where>
|
|
|
+
|
|
|
+
|
|
|
+ </select>
|
|
|
+
|
|
|
</mapper>
|