项目初始化

This commit is contained in:
刘汗青
2026-06-10 10:03:08 +08:00
commit a3c023a8d3
1255 changed files with 194055 additions and 0 deletions

View File

@@ -0,0 +1,75 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.kpi.mapper.KpiMapper">
<!-- 入库趋势:in_or_out < 20,按日期+仓库分组 -->
<select id="selectInboundTrend" parameterType="com.ruoyi.kpi.domain.KpiQuery" resultType="map">
SELECT
CONVERT(varchar(10), finish_time, 23) AS date,
ISNULL(warehouse_name, '未分配') AS warehouseName,
COUNT(*) AS quantity
FROM mydo_job_finish
<where>
in_or_out &lt; 20
AND finish_time IS NOT NULL
AND finish_time != ''
<if test="warehouseId != null and warehouseId != ''">
AND warehouse_id = #{warehouseId}
</if>
<if test="params.beginDate != null and params.beginDate != ''">
AND CONVERT(varchar(10), finish_time, 23) &gt;= #{params.beginDate}
</if>
<if test="params.endDate != null and params.endDate != ''">
AND CONVERT(varchar(10), finish_time, 23) &lt;= #{params.endDate}
</if>
</where>
GROUP BY CONVERT(varchar(10), finish_time, 23), warehouse_name
ORDER BY CONVERT(varchar(10), finish_time, 23)
</select>
<!-- 出库趋势:in_or_out >= 20,按日期+仓库分组 -->
<select id="selectOutboundTrend" parameterType="com.ruoyi.kpi.domain.KpiQuery" resultType="map">
SELECT
CONVERT(varchar(10), finish_time, 23) AS date,
ISNULL(warehouse_name, '未分配') AS warehouseName,
COUNT(*) AS quantity
FROM mydo_job_finish
<where>
in_or_out &gt;= 20
AND finish_time IS NOT NULL
AND finish_time != ''
<if test="warehouseId != null and warehouseId != ''">
AND warehouse_id = #{warehouseId}
</if>
<if test="params.beginDate != null and params.beginDate != ''">
AND CONVERT(varchar(10), finish_time, 23) &gt;= #{params.beginDate}
</if>
<if test="params.endDate != null and params.endDate != ''">
AND CONVERT(varchar(10), finish_time, 23) &lt;= #{params.endDate}
</if>
</where>
GROUP BY CONVERT(varchar(10), finish_time, 23), warehouse_name
ORDER BY CONVERT(varchar(10), finish_time, 23)
</select>
<!-- 货位平面图:按仓库+巷道+排筛选 -->
<select id="selectCargoSpacePlan" resultType="map">
SELECT
the_platoon AS thePlatoon,
the_column AS theColumn,
the_floor AS theFloor,
status,
locked,
tray_code AS trayCode,
cargo_space_id AS cargoSpaceId,
cargo_space_name AS cargoSpaceName
FROM bas_cargo_space
WHERE warehouse_id = #{warehouseId}
AND roadway_id = #{roadwayId}
AND the_platoon = #{thePlatoon}
ORDER BY the_floor, the_column
</select>
</mapper>