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
d5f05998
Commit
d5f05998
authored
Dec 12, 2025
by
yubin
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
e5c97a2f
fde2e5ee
全部展开
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
27 行增加
和
14 行删除
+27
-14
ruoyi-admin-vue/src/views/inventory/inbound/details.vue
+0
-0
ruoyi-admin-vue/src/views/inventory/inbound/index.vue
+4
-5
ruoyi-admin-vue/src/views/inventory/materials/index.vue
+1
-2
ruoyi-admin-vue/src/views/inventory/materials_category/index.vue
+1
-1
ruoyi-inventory/src/main/java/com/ruoyi/inventory/service/impl/InboundOrdersServiceImpl.java
+21
-6
没有找到文件。
ruoyi-admin-vue/src/views/inventory/inbound/details.vue
View file @
d5f05998
差异被折叠。
点击展开。
ruoyi-admin-vue/src/views/inventory/inbound/index.vue
View file @
d5f05998
...
...
@@ -607,7 +607,7 @@ export default {
}
},
mounted
()
{
console
.
log
(
"dict:"
,
this
.
dict
)
},
created
()
{
this
.
getList
()
...
...
@@ -706,7 +706,7 @@ export default {
let
id
=
row
.
id
;
if
(
id
===
undefined
){
id
=
this
.
ids
id
=
this
.
ids
[
0
]
}
getInbound
(
id
).
then
(
response
=>
{
if
(
response
.
data
.
orderStatus
===
2
){
...
...
@@ -906,7 +906,6 @@ export default {
orderId
:
row
.
orderId
}
const
response
=
await
listInbound_itemsAndMname
(
queryForm
)
console
.
log
(
response
.
rows
)
row
.
inboundOrderItemsList
=
response
.
rows
.
map
(
item
=>
{
return
{
...
item
,
...
...
@@ -915,10 +914,10 @@ export default {
inventoryStatus
:
1
,
ownerId
:
row
.
ownerId
,
quantity
:
item
.
actualQuantity
,
unitWeight
:
item
.
unitWeight
unitWeight
:
item
.
unitWeight
,
isUsed
:
1
};
})
console
.
log
(
row
.
inboundOrderItemsList
)
// 第三步:确保数据存在后调用入库接口
if
(
!
row
.
inboundOrderItemsList
||
row
.
inboundOrderItemsList
.
length
===
0
)
{
this
.
$message
.
warning
(
'暂无入库明细数据,无法确认入库'
)
...
...
ruoyi-admin-vue/src/views/inventory/materials/index.vue
View file @
d5f05998
...
...
@@ -562,7 +562,6 @@ export default {
// 构建树形结构
this
.
categoryTreeData
=
this
.
buildTreeData
(
activeCategories
)
console
.
log
(
'分类树数据:'
,
this
.
categoryTreeData
)
}
}
catch
(
error
)
{
console
.
error
(
'获取分类树数据失败:'
,
error
)
...
...
@@ -598,7 +597,7 @@ export default {
/** 处理树节点点击 */
handleTreeClick
(
data
)
{
console
.
log
(
'点击树节点:'
,
data
)
this
.
currentNodeId
=
data
.
sid
// 更新查询参数,按选中的分类筛选物料
...
...
ruoyi-admin-vue/src/views/inventory/materials_category/index.vue
View file @
d5f05998
...
...
@@ -276,7 +276,7 @@ export default {
dialogFormData
:
{
immediate
:
true
,
handler
(
val
)
{
console
.
log
(
val
)
this
.
form
=
{
...
val
}
}
},
...
...
ruoyi-inventory/src/main/java/com/ruoyi/inventory/service/impl/InboundOrdersServiceImpl.java
View file @
d5f05998
...
...
@@ -5,8 +5,9 @@ import java.time.format.DateTimeFormatter;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
com.ruoyi.inventory.domain.*
;
import
com.ruoyi.inventory.domain.vo.InboundMaterialTotalVO
;
import
com.ruoyi.inventory.mapper.
MaterialsMapper
;
import
com.ruoyi.inventory.mapper.
*
;
import
org.apache.commons.lang3.SystemUtils
;
import
org.springframework.util.CollectionUtils
;
import
com.ruoyi.common.exception.ServiceException
;
...
...
@@ -21,9 +22,6 @@ import org.springframework.context.annotation.Bean;
import
org.springframework.stereotype.Service
;
import
com.ruoyi.common.utils.StringUtils
;
import
org.springframework.transaction.annotation.Transactional
;
import
com.ruoyi.inventory.domain.InboundOrderItems
;
import
com.ruoyi.inventory.mapper.InboundOrdersMapper
;
import
com.ruoyi.inventory.domain.InboundOrders
;
import
com.ruoyi.inventory.service.IInboundOrdersService
;
/**
...
...
@@ -39,6 +37,13 @@ public class InboundOrdersServiceImpl implements IInboundOrdersService
private
InboundOrdersMapper
inboundOrdersMapper
;
@Autowired
private
MaterialsMapper
materialsMapper
;
@Autowired
private
OwnersMapper
ownersMapper
;
@Autowired
private
WarehousesMapper
warehousesMapper
;
@Autowired
private
StorageLocationsMapper
storageLocationsMapper
;
private
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
InboundOrdersServiceImpl
.
class
);
/**
...
...
@@ -182,7 +187,9 @@ public class InboundOrdersServiceImpl implements IInboundOrdersService
Date
now
=
DateUtils
.
getNowDate
();
Long
userId
=
SecurityUtils
.
getUserId
();
String
operId
=
userId
.
toString
();
Warehouses
warehouses
=
new
Warehouses
();
Owners
owners
=
new
Owners
();
StorageLocations
storageLocations
=
new
StorageLocations
();
// 3. 按入库单号分组(核心:同一入库单的多条明细归为一组)
Map
<
String
,
List
<
InboundTemplateVO
>>
orderGroupMap
=
inboundOrdersList
.
stream
()
.
filter
(
vo
->
StringUtils
.
isNotBlank
(
vo
.
getOrderId
()))
// 过滤无入库单号的无效行
...
...
@@ -234,10 +241,14 @@ public class InboundOrdersServiceImpl implements IInboundOrdersService
// mainDO.setUpdateBy(operId);
// mainDO.setUpdateTime(now);
// mainDO.setUpdateUserCode(operId);
owners
.
setOwnerName
(
mainDO
.
getOwnerName
());
List
<
Owners
>
olist
=
ownersMapper
.
selectOwnersList
(
owners
);
mainDO
.
setId
(
UUID
.
randomUUID
().
toString
());
mainDO
.
setOrderId
(
orderId
);
mainDO
.
setOrderTypeId
(
orderType
+
""
);
mainDO
.
setOwnerId
(
olist
.
get
(
0
).
getId
());
// 设置默认值
if
(
mainDO
.
getSortNo
()
==
null
)
{
mainDO
.
setSortNo
(
0L
);
...
...
@@ -261,6 +272,8 @@ public class InboundOrdersServiceImpl implements IInboundOrdersService
itemDO
.
setCreateBy
(
operId
);
itemDO
.
setCreateTime
(
now
);
itemDO
.
setCreateUserCode
(
operId
);
List
<
Warehouses
>
wlist
=
warehousesMapper
.
selectWarehousesList
(
warehouses
);
List
<
StorageLocations
>
slist
=
storageLocationsMapper
.
selectStorageLocationsList
(
storageLocations
);
itemDO
.
setId
(
UUID
.
randomUUID
().
toString
());
Map
<
String
,
String
>
sapAndId
=
sapAndIdMap
.
get
(
vo
.
getSapNo
());
...
...
@@ -268,7 +281,8 @@ public class InboundOrdersServiceImpl implements IInboundOrdersService
itemDO
.
setOrderId
(
orderId
);
// 关联入库单号
itemDO
.
setBatchId
(
mainDO
.
getBatchId
());
itemDO
.
setInboundOrderId
(
mainDO
.
getId
());
// 关联主表ID(核心!)
itemDO
.
setWarehouseId
(
wlist
.
get
(
0
).
getId
());
itemDO
.
setLocationId
(
slist
.
get
(
0
).
getId
());
itemDO
.
setSortNo
(
0L
);
// 校验物料字段(示例:必填sapNo)
if
(
StringUtils
.
isBlank
(
vo
.
getSapNo
()))
{
...
...
@@ -315,6 +329,7 @@ public class InboundOrdersServiceImpl implements IInboundOrdersService
return
finalSuccessMsg
;
}
}
/**
* 统计本月入库数量
*
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论