add mainpage

This commit is contained in:
Kana
2024-01-24 12:06:17 +09:00
parent 8e38a3f520
commit fcbea8e503
5 changed files with 103 additions and 6 deletions

View File

@@ -139,6 +139,26 @@
</where>
ORDER BY proin.in_date desc LIMIT #{start} , #{perPage}
</select>
<select id="inListMain" parameterType="map" resultMap="inResultMap">
SELECT
proin.id, proin.group_number, proin.product_id, proin.in_date, proin.quantity, proin.warehouse_id, proin.manager_id, proin.note, proin.activation,
planin.view_group_number,
pro.name as product_name,
w.name as warehouse_name,
a.name as account_name,
(SELECT price FROM prices WHERE product_id = proin.product_id ORDER BY registration_date DESC LIMIT 1) as latest_price
FROM
product_in as proin
LEFT JOIN plan_In as planin on proin.group_number = planin.group_number and proin.product_id = planin.product_id
LEFT JOIN product as pro on proin.product_id = pro.id
LEFT JOIN warehouse as w on proin.warehouse_id = w.id
LEFT JOIN account as a on proin.manager_id = a.id
WHERE proin.in_date = #{today} and proin.activation = 1
ORDER BY proin.in_date desc LIMIT 5
</select>
<select id="selectById" parameterType="String" resultMap="inResultMap">
SELECT
proin.id, proin.group_number, proin.product_id, proin.in_date, proin.quantity, proin.warehouse_id, proin.manager_id, proin.note, proin.activation,