Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
M
mini-wms
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Members
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
周海峰
mini-wms
Commits
d04916a9
Commit
d04916a9
authored
Dec 17, 2025
by
wangchunyang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://code.palacesun.com/zhouhaifeng/mini-wms
parents
13acd4f6
887e590d
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
94 行增加
和
42 行删除
+94
-42
ruoyi-admin-vue/src/views/inventory/inbound/index.vue
+1
-1
ruoyi-admin-vue/src/views/inventory/inbound_items/index.vue
+1
-1
ruoyi-admin-vue/src/views/inventory/locations/index.vue
+8
-8
ruoyi-admin-vue/src/views/inventory/materials/index.vue
+1
-1
ruoyi-admin-vue/src/views/inventory/orders/index.vue
+1
-1
ruoyi-admin-vue/src/views/inventory/owners/index.vue
+10
-9
ruoyi-admin-vue/src/views/system/role/index.vue
+10
-11
ruoyi-admin-vue/src/views/system/user/index.vue
+1
-1
ruoyi-inventory/src/main/java/com/ruoyi/inventory/domain/OutboundOrders.java
+3
-1
ruoyi-inventory/src/main/java/com/ruoyi/inventory/service/impl/OutboundOrdersServiceImpl.java
+0
-0
ruoyi-inventory/src/main/java/com/ruoyi/inventory/utils/InventoryCache.java
+37
-0
ruoyi-inventory/src/main/resources/mapper/inventory/InventoryMapper.xml
+3
-1
ruoyi-inventory/src/main/resources/mapper/inventory/OutboundOrdersMapper.xml
+18
-7
没有找到文件。
ruoyi-admin-vue/src/views/inventory/inbound/index.vue
View file @
d04916a9
...
...
@@ -33,7 +33,7 @@
>
删除
</el-button>
<el-button
type=
"
warning
"
type=
"
success
"
plain
icon=
"el-icon-upload"
size=
"medium"
...
...
ruoyi-admin-vue/src/views/inventory/inbound_items/index.vue
View file @
d04916a9
...
...
@@ -84,7 +84,7 @@
</el-col>
<!-- <el-col :span="1.5" v-if="isEditable">
<el-button
type="
warning
"
type="
success
"
plain
icon="el-icon-download"
size="mini"
...
...
ruoyi-admin-vue/src/views/inventory/locations/index.vue
View file @
d04916a9
...
...
@@ -28,6 +28,14 @@
@
click=
"handleDelete"
v-hasPermi=
"['inventory:locations:remove']"
>
删除
</el-button>
<el-button
type=
"success"
plain
icon=
"el-icon-upload"
size=
"medium"
@
click=
"handleImport"
v-hasPermi=
"['inventory:locations:add']"
>
导入
</el-button>
<el-button
type=
"warning"
plain
...
...
@@ -36,14 +44,6 @@
@
click=
"handleExport"
v-hasPermi=
"['inventory:locations:export']"
>
导出
</el-button>
<el-button
type=
"info"
plain
icon=
"el-icon-upload2"
size=
"medium"
@
click=
"handleImport"
v-hasPermi=
"['inventory:locations:add']"
>
导入
</el-button>
</
template
>
</PageTitle>
...
...
ruoyi-admin-vue/src/views/inventory/materials/index.vue
View file @
d04916a9
...
...
@@ -34,7 +34,7 @@
<el-button
type=
"success"
plain
icon=
"el-icon-upload
2
"
icon=
"el-icon-upload"
size=
"medium"
@
click=
"handleImport"
v-hasPermi=
"['inventory:materials:import']"
...
...
ruoyi-admin-vue/src/views/inventory/orders/index.vue
View file @
d04916a9
...
...
@@ -33,7 +33,7 @@
>
删除
</el-button>
<el-button
type=
"
warning
"
type=
"
success
"
plain
icon=
"el-icon-upload"
size=
"medium"
...
...
ruoyi-admin-vue/src/views/inventory/owners/index.vue
View file @
d04916a9
...
...
@@ -34,6 +34,15 @@
>
删除
</el-button>
<el-button
type=
"success"
plain
icon=
"el-icon-upload"
size=
"medium"
@
click=
"handleImport"
v-hasPermi=
"['inventory:owners:add']"
>
导入
</el-button>
<el-button
type=
"warning"
plain
icon=
"el-icon-download"
...
...
@@ -42,15 +51,7 @@
v-hasPermi=
"['inventory:owners:export']"
>
导出
</el-button>
<el-button
type=
"info"
plain
icon=
"el-icon-upload2"
size=
"medium"
@
click=
"handleImport"
v-hasPermi=
"['inventory:owners:add']"
>
导入
</el-button>
</
template
>
</PageTitle>
...
...
ruoyi-admin-vue/src/views/system/role/index.vue
View file @
d04916a9
...
...
@@ -36,7 +36,15 @@
v-hasPermi=
"['system:role:remove']"
>
删除
</el-button>
<el-button
type=
"success"
plain
icon=
"el-icon-upload"
size=
"medium"
@
click=
"handleImport"
v-hasPermi=
"['system:role:import']"
>
导入
</el-button>
<el-button
type=
"warning"
plain
...
...
@@ -45,16 +53,7 @@
@
click=
"handleExport"
v-hasPermi=
"['system:role:export']"
>
导出
</el-button>
<el-button
type=
"info"
plain
icon=
"el-icon-upload2"
size=
"medium"
@
click=
"handleImport"
v-hasPermi=
"['system:role:import']"
>
导入
</el-button>
</
template
>
</PageTitle>
...
...
ruoyi-admin-vue/src/views/system/user/index.vue
View file @
d04916a9
...
...
@@ -9,7 +9,7 @@
<el-button
type=
"danger"
plain
icon=
"el-icon-delete"
size=
"medium"
:disabled=
"multiple"
@
click=
"handleDelete"
v-hasPermi=
"['system:user:remove']"
>
删除
</el-button>
<el-button
type=
"
info"
plain
icon=
"el-icon-upload2
"
size=
"medium"
@
click=
"handleImport"
v-hasPermi=
"['system:user:import']"
>
导入
</el-button>
<el-button
type=
"
success"
plain
icon=
"el-icon-upload
"
size=
"medium"
@
click=
"handleImport"
v-hasPermi=
"['system:user:import']"
>
导入
</el-button>
<el-button
type=
"warning"
plain
icon=
"el-icon-download"
size=
"medium"
@
click=
"handleExport"
v-hasPermi=
"['system:user:export']"
>
导出
</el-button>
</
template
>
...
...
ruoyi-inventory/src/main/java/com/ruoyi/inventory/domain/OutboundOrders.java
View file @
d04916a9
...
...
@@ -109,5 +109,6 @@ public class OutboundOrders extends BaseEntity
/** 出库单明细信息 */
private
List
<
OutboundOrderItems
>
outboundOrderItemsList
;
@Excel
(
name
=
"导入标识"
)
private
Long
isImport
;
// 对应数据库字段is_import,驼峰命名转换
}
\ No newline at end of file
ruoyi-inventory/src/main/java/com/ruoyi/inventory/service/impl/OutboundOrdersServiceImpl.java
View file @
d04916a9
差异被折叠。
点击展开。
ruoyi-inventory/src/main/java/com/ruoyi/inventory/utils/InventoryCache.java
0 → 100644
View file @
d04916a9
package
com
.
ruoyi
.
inventory
.
utils
;
import
com.ruoyi.inventory.domain.Inventory
;
import
java.util.AbstractMap
;
import
java.util.Map
;
import
java.util.concurrent.ConcurrentHashMap
;
/**
* 库存映射全局缓存(解决导入新增库存即时可见问题)
*/
public
class
InventoryCache
{
// 并发安全Map,Key=物料ID_库位ID_库存类型,Value=库存对象
private
static
final
Map
<
String
,
Inventory
>
INVENTORY_MAP
=
new
ConcurrentHashMap
<>();
// 添加库存(直接存对象,避免参数不匹配)
public
static
void
addInventory
(
String
key
,
Inventory
inventory
)
{
INVENTORY_MAP
.
put
(
key
,
inventory
);
}
// 获取库存
public
static
Inventory
getInventory
(
String
key
)
{
return
INVENTORY_MAP
.
get
(
key
);
}
// 清空缓存
public
static
void
clear
()
{
INVENTORY_MAP
.
clear
();
}
// 获取全部缓存(核心:供loadInventoryGroupMap直接读取)
public
static
Map
<
String
,
Inventory
>
getAll
()
{
return
INVENTORY_MAP
;
}
}
\ No newline at end of file
ruoyi-inventory/src/main/resources/mapper/inventory/InventoryMapper.xml
View file @
d04916a9
...
...
@@ -435,7 +435,7 @@
and inventory_status = '1'
]]>
</select>
<insert
id=
"insertInventory"
parameterType=
"Inventory"
>
<insert
id=
"insertInventory"
parameterType=
"Inventory"
flushCache=
"true"
>
insert into inventory
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
id,
</if>
...
...
@@ -563,6 +563,7 @@ and inventory_status = '1'
left join inventory i on i.material_id = m.id
and i.is_used = 1
and i.unit_price > 0
and i.inventory_status=1
and i.last_inbound_time >= DATE_FORMAT(CURDATE(), '%Y-%m-01')
and i.last_inbound_time
<
DATE_FORMAT(DATE_ADD(CURDATE(), INTERVAL 1 MONTH), '%Y-%m-01')
where
...
...
@@ -580,6 +581,7 @@ and inventory_status = '1'
from materials m
left join inventory i on i.material_id = m.id
and i.is_used = 1
and i.inventory_status=1
and i.last_inbound_time >= DATE_FORMAT(CURDATE(), '%Y-%m-01')
and i.last_inbound_time
<
DATE_FORMAT(DATE_ADD(CURDATE(), INTERVAL 1 MONTH), '%Y-%m-01')
where
...
...
ruoyi-inventory/src/main/resources/mapper/inventory/OutboundOrdersMapper.xml
View file @
d04916a9
...
...
@@ -16,7 +16,6 @@
<result
property=
"ownerId"
column=
"owner_id"
/>
<result
property=
"ownerName"
column=
"owner_name"
/>
<result
property=
"orderStatus"
column=
"order_status"
/>
<!-- 保留原字段映射,新增startDate/endDate用于查询 -->
<result
property=
"inboundDate"
column=
"inbound_date"
/>
<result
property=
"destination"
column=
"destination"
/>
<result
property=
"totalPlannedQuantity"
column=
"total_planned_quantity"
/>
...
...
@@ -29,6 +28,8 @@
<result
property=
"createUserCode"
column=
"create_user_code"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"updateUserCode"
column=
"update_user_code"
/>
<!-- 新增 isImport 字段映射 -->
<result
property=
"isImport"
column=
"is_import"
/>
</resultMap>
<resultMap
id=
"OutboundOrdersOutboundOrderItemsResult"
type=
"com.ruoyi.inventory.domain.OutboundOrders"
extends=
"OutboundOrdersResult"
>
...
...
@@ -94,7 +95,8 @@
oo.create_time,
oo.create_user_code,
oo.update_time,
oo.update_user_code
oo.update_user_code,
oo.is_import
from outbound_orders oo
left join owners o on oo.owner_id = o.id and o.is_used = 1
left join warehouses w on oo.warehouse_id = w.id and w.is_used = 1 and w.is_enabled = 1
...
...
@@ -111,7 +113,8 @@
<if
test=
"warehouseId != null and warehouseId != ''"
>
and oo.warehouse_id = #{warehouseId}
</if>
<if
test=
"ownerId != null and ownerId != ''"
>
and oo.owner_id = #{ownerId}
</if>
<if
test=
"orderStatus != null "
>
and oo.order_status = #{orderStatus}
</if>
<!-- 替换为时间段查询:startDate和endDate -->
<!-- 新增 isImport 查询条件 -->
<if
test=
"isImport != null "
>
and oo.is_import = #{isImport}
</if>
<if
test=
"startDate != null"
>
and oo.inbound_date
>
= #{startDate}
</if>
<if
test=
"endDate != null"
>
and oo.inbound_date
<
= #{endDate}
</if>
<if
test=
"destination != null and destination != ''"
>
and oo.destination = #{destination}
</if>
...
...
@@ -147,7 +150,8 @@
oo.create_time,
oo.create_user_code,
oo.update_time,
oo.update_user_code
oo.update_user_code,
oo.is_import
from outbound_orders oo
left join owners o on oo.owner_id = o.id
left join warehouses w on oo.warehouse_id = w.id
...
...
@@ -202,7 +206,6 @@
<if
test=
"warehouseId != null"
>
warehouse_id,
</if>
<if
test=
"ownerId != null"
>
owner_id,
</if>
<if
test=
"orderStatus != null"
>
order_status,
</if>
<!-- 保留inboundDate字段的插入(业务字段仍需存储) -->
<if
test=
"inboundDate != null"
>
inbound_date,
</if>
<if
test=
"destination != null"
>
destination,
</if>
<if
test=
"totalPlannedQuantity != null"
>
total_planned_quantity,
</if>
...
...
@@ -215,6 +218,8 @@
<if
test=
"createUserCode != null"
>
create_user_code,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"updateUserCode != null"
>
update_user_code,
</if>
<!-- 新增 is_import 字段插入 -->
<if
test=
"isImport != null"
>
is_import,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id},
</if>
...
...
@@ -238,6 +243,8 @@
<if
test=
"createUserCode != null"
>
#{createUserCode},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
<if
test=
"updateUserCode != null"
>
#{updateUserCode},
</if>
<!-- 新增 is_import 字段值 -->
<if
test=
"isImport != null"
>
#{isImport},
</if>
</trim>
</insert>
...
...
@@ -264,6 +271,8 @@
<if
test=
"createUserCode != null"
>
create_user_code = #{createUserCode},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
<if
test=
"updateUserCode != null"
>
update_user_code = #{updateUserCode},
</if>
<!-- 新增 is_import 字段更新 -->
<if
test=
"isImport != null"
>
is_import = #{isImport},
</if>
</trim>
where id = #{id}
</update>
...
...
@@ -316,6 +325,7 @@
left join outbound_order_items ooi
on ooi.material_id = m.id
and ooi.is_used = 1
and ooi.item_status=3
and ooi.shipped_at >= DATE_FORMAT(CURDATE(), '%Y-%m-01 00:00:00')
and ooi.shipped_at
<
DATE_FORMAT(DATE_ADD(CURDATE(), INTERVAL 1 MONTH), '%Y-%m-01 00:00:00')
where
...
...
@@ -334,6 +344,7 @@
left join outbound_order_items ooi
on ooi.material_id = m.id
and ooi.is_used = 1
and ooi.item_status=3
and ooi.shipped_at >= DATE_FORMAT(CURDATE(), '%Y-%m-01 00:00:00')
and ooi.shipped_at
<
DATE_FORMAT(DATE_ADD(CURDATE(), INTERVAL 1 MONTH), '%Y-%m-01 00:00:00')
where
...
...
@@ -346,8 +357,8 @@
<select
id=
"outboundOrdersCount"
resultType=
"String"
>
select count(*) from outbound_orders where is_used = 1 and order_status=2
and inbound_date
>
= DATE_FORMAT(CURDATE(), '%Y-%m-01')
and inbound_date
<
DATE_FORMAT(DATE_ADD(CURDATE(), INTERVAL 1 MONTH), '%Y-%m-01')
and inbound_date
>
= DATE_FORMAT(CURDATE(), '%Y-%m-01')
and inbound_date
<
DATE_FORMAT(DATE_ADD(CURDATE(), INTERVAL 1 MONTH), '%Y-%m-01')
</select>
<update
id=
"batchUpdateInventory"
>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论