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
db0c0a3a
Commit
db0c0a3a
authored
Dec 15, 2025
by
wangchunyang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://code.palacesun.com/zhouhaifeng/mini-wms
parents
6eab21f8
7555bfca
全部展开
显示空白字符变更
内嵌
并排
正在显示
37 个修改的文件
包含
626 行增加
和
724 行删除
+626
-724
ruoyi-admin-vue/src/components/ImportExcel/index.vue
+1
-1
ruoyi-admin-vue/src/components/rukuRankChart.vue
+3
-2
ruoyi-admin-vue/src/views/index.vue
+6
-6
ruoyi-admin-vue/src/views/inventory/inbound/index.vue
+10
-1
ruoyi-admin-vue/src/views/inventory/items/index.vue
+7
-8
ruoyi-admin-vue/src/views/inventory/materials/index.vue
+6
-1
ruoyi-admin-vue/src/views/inventory/materials/materialsSeletor.vue
+1
-1
ruoyi-admin-vue/src/views/inventory/orders/OutboundOrderFormWithItems.vue
+43
-54
ruoyi-admin-vue/src/views/inventory/orders/index.vue
+0
-0
ruoyi-admin-vue/src/views/inventory/report_view/inventory_detail.vue
+32
-2
ruoyi-admin-vue/src/views/inventory/warehouses/index.vue
+1
-8
ruoyi-admin/src/main/java/com/ruoyi/web/controller/inventory/InboundOrdersController.java
+0
-0
ruoyi-common/src/main/java/com/ruoyi/common/config/WarehouseConfig.java
+13
-0
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/Materials.java
+0
-0
ruoyi-common/src/main/java/com/ruoyi/common/utils/StringUtils.java
+2
-0
ruoyi-inventory/src/main/java/com/ruoyi/inventory/controller/OutboundOrderItemsController.java
+1
-1
ruoyi-inventory/src/main/java/com/ruoyi/inventory/controller/OutboundOrdersController.java
+1
-1
ruoyi-inventory/src/main/java/com/ruoyi/inventory/domain/InventoryTransactions.java
+4
-213
ruoyi-inventory/src/main/java/com/ruoyi/inventory/domain/OutboundOrderItems.java
+4
-1
ruoyi-inventory/src/main/java/com/ruoyi/inventory/domain/Owners.java
+1
-1
ruoyi-inventory/src/main/java/com/ruoyi/inventory/domain/vo/InboundTemplateVO.java
+0
-395
ruoyi-inventory/src/main/java/com/ruoyi/inventory/domain/vo/inboundVO/InboundFinishTemplateVO.java
+139
-0
ruoyi-inventory/src/main/java/com/ruoyi/inventory/domain/vo/inboundVO/InboundTRDCTemplateVO.java
+136
-0
ruoyi-inventory/src/main/java/com/ruoyi/inventory/domain/vo/inboundVO/InboundTemplateVO.java
+143
-0
ruoyi-inventory/src/main/java/com/ruoyi/inventory/mapper/InventoryMapper.java
+2
-0
ruoyi-inventory/src/main/java/com/ruoyi/inventory/service/IInboundOrdersService.java
+2
-3
ruoyi-inventory/src/main/java/com/ruoyi/inventory/service/IOutboundOrderItemsService.java
+0
-3
ruoyi-inventory/src/main/java/com/ruoyi/inventory/service/impl/InboundOrdersServiceImpl.java
+0
-0
ruoyi-inventory/src/main/java/com/ruoyi/inventory/service/impl/InventoryServiceImpl.java
+5
-6
ruoyi-inventory/src/main/java/com/ruoyi/inventory/service/impl/OutboundOrderItemsServiceImpl.java
+1
-1
ruoyi-inventory/src/main/java/com/ruoyi/inventory/service/impl/OutboundOrdersServiceImpl.java
+0
-0
ruoyi-inventory/src/main/java/com/ruoyi/inventory/service/impl/StorageLocationsServiceImpl.java
+9
-2
ruoyi-inventory/src/main/resources/mapper/inventory/InboundOrdersMapper.xml
+20
-12
ruoyi-inventory/src/main/resources/mapper/inventory/InventoryMapper.xml
+8
-0
ruoyi-inventory/src/main/resources/mapper/inventory/InventoryTransactionsMapper.xml
+2
-0
ruoyi-inventory/src/main/resources/mapper/inventory/MaterialsMapper.xml
+5
-1
ruoyi-inventory/src/main/resources/mapper/inventory/OutboundOrdersMapper.xml
+18
-0
没有找到文件。
ruoyi-admin-vue/src/components/ImportExcel/index.vue
View file @
db0c0a3a
...
@@ -151,7 +151,7 @@ export default {
...
@@ -151,7 +151,7 @@ export default {
},
},
/** 下载模板操作 */
/** 下载模板操作 */
importTemplate
()
{
importTemplate
()
{
this
.
download
(
this
.
templateUrl
,
{},
`
${
this
.
templateName
}
_
${
new
Date
().
getTime
()}
.xlsx`
)
this
.
download
(
this
.
templateUrl
,
{
orderType
:
this
.
upload
.
orderType
},
`
${
this
.
templateName
}
_
${
new
Date
().
getTime
()}
.xlsx`
)
},
},
// 文件上传中处理
// 文件上传中处理
handleFileUploadProgress
(
event
,
file
,
fileList
)
{
handleFileUploadProgress
(
event
,
file
,
fileList
)
{
...
...
ruoyi-admin-vue/src/components/rukuRankChart.vue
View file @
db0c0a3a
...
@@ -94,6 +94,7 @@ export default {
...
@@ -94,6 +94,7 @@ export default {
grid
:
{
grid
:
{
left
:
'3%'
,
left
:
'3%'
,
right
:
'4%'
,
right
:
'4%'
,
top
:
'3%'
,
bottom
:
'3%'
,
bottom
:
'3%'
,
containLabel
:
true
containLabel
:
true
},
},
...
@@ -130,12 +131,12 @@ export default {
...
@@ -130,12 +131,12 @@ export default {
series
:
[{
series
:
[{
name
:
'标准化'
,
name
:
'标准化'
,
type
:
'bar'
,
type
:
'bar'
,
barWidth
:
16
,
// 柱子宽度
barWidth
:
'15'
,
// 柱子宽度
label
:
{
label
:
{
show
:
true
,
show
:
true
,
position
:
'right'
,
// 位置
position
:
'right'
,
// 位置
color
:
'rgba(102, 102, 102, 1)'
,
color
:
'rgba(102, 102, 102, 1)'
,
fontSize
:
1
4
,
fontSize
:
1
2
,
fontWeight
:
'bold'
,
// 加粗
fontWeight
:
'bold'
,
// 加粗
distance
:
5
// 距离
distance
:
5
// 距离
},
// 柱子上方的数值
},
// 柱子上方的数值
...
...
ruoyi-admin-vue/src/views/index.vue
View file @
db0c0a3a
...
@@ -63,7 +63,7 @@
...
@@ -63,7 +63,7 @@
<div
class=
"card-container-flex chart-container shadow flex1"
>
<div
class=
"card-container-flex chart-container shadow flex1"
>
<div
class=
"tip-title"
>
<div
class=
"tip-title"
>
<div
class=
"title-text"
>
本月入库排名前
10
物料
</div>
<div
class=
"title-text"
>
本月入库排名前
5
物料
</div>
<el-radio-group
v-model=
"rukuRankType"
size=
"mini"
@
change=
"rukuRankTypeChange"
>
<el-radio-group
v-model=
"rukuRankType"
size=
"mini"
@
change=
"rukuRankTypeChange"
>
<el-radio-button
label=
"count"
>
按数量
</el-radio-button>
<el-radio-button
label=
"count"
>
按数量
</el-radio-button>
<el-radio-button
label=
"money"
>
按金额
</el-radio-button>
<el-radio-button
label=
"money"
>
按金额
</el-radio-button>
...
@@ -75,7 +75,7 @@
...
@@ -75,7 +75,7 @@
</div>
</div>
<div
class=
"card-container-flex chart-container shadow flex1 two"
>
<div
class=
"card-container-flex chart-container shadow flex1 two"
>
<div
class=
"tip-title"
>
<div
class=
"tip-title"
>
<div
class=
"title-text"
>
本月出库排名前
10
物料
</div>
<div
class=
"title-text"
>
本月出库排名前
5
物料
</div>
<el-radio-group
v-model=
"cukuRankType"
size=
"mini"
@
change=
"cukuRankTypeChange"
>
<el-radio-group
v-model=
"cukuRankType"
size=
"mini"
@
change=
"cukuRankTypeChange"
>
<el-radio-button
label=
"count"
>
按数量
</el-radio-button>
<el-radio-button
label=
"count"
>
按数量
</el-radio-button>
<el-radio-button
label=
"money"
>
按金额
</el-radio-button>
<el-radio-button
label=
"money"
>
按金额
</el-radio-button>
...
@@ -186,7 +186,7 @@ export default {
...
@@ -186,7 +186,7 @@ export default {
this
.
rukuList
=
data
.
map
(
item
=>
({
this
.
rukuList
=
data
.
map
(
item
=>
({
value
:
item
.
totalQuantity
,
value
:
item
.
totalQuantity
,
name
:
item
.
materialName
name
:
item
.
materialName
}))
}))
.
splice
(
0
,
5
).
reverse
()
})
})
}
}
if
(
this
.
rukuRankType
===
'money'
){
if
(
this
.
rukuRankType
===
'money'
){
...
@@ -196,7 +196,7 @@ export default {
...
@@ -196,7 +196,7 @@ export default {
this
.
rukuList
=
data
.
map
(
item
=>
({
this
.
rukuList
=
data
.
map
(
item
=>
({
value
:
item
.
totalMoney
,
value
:
item
.
totalMoney
,
name
:
item
.
materialName
name
:
item
.
materialName
}))
}))
.
splice
(
0
,
5
).
reverse
()
})
})
}
}
},
},
...
@@ -234,14 +234,14 @@ export default {
...
@@ -234,14 +234,14 @@ export default {
outboundOrdersTopTenByQuantity
().
then
(
res
=>
{
outboundOrdersTopTenByQuantity
().
then
(
res
=>
{
let
data
=
res
.
rows
let
data
=
res
.
rows
if
(
!
data
)
return
if
(
!
data
)
return
this
.
cukuList
=
data
this
.
cukuList
=
data
.
splice
(
0
,
5
).
reverse
()
})
})
}
}
if
(
this
.
cukuRankType
===
'money'
){
if
(
this
.
cukuRankType
===
'money'
){
outboundOrdersTopTenByAmount
().
then
(
res
=>
{
outboundOrdersTopTenByAmount
().
then
(
res
=>
{
let
data
=
res
.
rows
let
data
=
res
.
rows
if
(
!
data
)
return
if
(
!
data
)
return
this
.
cukuList
=
data
this
.
cukuList
=
data
.
splice
(
0
,
5
).
reverse
()
})
})
}
}
}
}
...
...
ruoyi-admin-vue/src/views/inventory/inbound/index.vue
View file @
db0c0a3a
...
@@ -443,7 +443,7 @@
...
@@ -443,7 +443,7 @@
title
=
"导入"
title
=
"导入"
import
-
url
=
"/inventory/inbound/import"
import
-
url
=
"/inventory/inbound/import"
template
-
url
=
"/inventory/inbound/importTemplate"
template
-
url
=
"/inventory/inbound/importTemplate"
template
-
name
=
"入库单导入模板
"
:
template
-
name
=
"getTemplateName()
"
@
success
=
"getList"
@
success
=
"getList"
:
show
-
trdc
-
checkbox
=
"true"
:
show
-
trdc
-
checkbox
=
"true"
@
orderTypeChange
=
"handleOrderTypeChange"
@
orderTypeChange
=
"handleOrderTypeChange"
...
@@ -1051,6 +1051,15 @@ export default {
...
@@ -1051,6 +1051,15 @@ export default {
handleImport() {
handleImport() {
this.$refs.import.show()
this.$refs.import.show()
}
,
}
,
getTemplateName(){
if(this.form.orderTypeId === '1'){
return "入库单导入模板"
}
else if(this.form.orderTypeId === '2'){
return "成品入库单导入模板"
}
else if(this.form.orderTypeId === '3'){
return "退料TRDC入库单导入模板"
}
}
,
/** 处理明细项选择变化 */
/** 处理明细项选择变化 */
handleItemsSelectionChange(selection) {
handleItemsSelectionChange(selection) {
this.selectedItems = selection
this.selectedItems = selection
...
...
ruoyi-admin-vue/src/views/inventory/items/index.vue
View file @
db0c0a3a
...
@@ -16,16 +16,15 @@
...
@@ -16,16 +16,15 @@
<!-- 页面容器 -->
<!-- 页面容器 -->
<div
class=
"page-container"
>
<div
class=
"page-container"
>
<!-- 物料查询表单 -->
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"100px"
>
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"100px"
>
<
el-form-item
label=
"主订单号"
prop=
"mainO
rderId"
>
<
!-- <el-form-item label="主订单号" prop="o
rderId">
<el-input
<el-input
v-model=
"queryParams.
mainO
rderId"
v-model="queryParams.
o
rderId"
placeholder="请输入主订单号"
placeholder="请输入主订单号"
clearable
clearable
@keyup.enter.native="handleQuery"
@keyup.enter.native="handleQuery"
/>
/>
</el-form-item>
</el-form-item>
-->
<el-form-item
label=
"时间段"
prop=
"dateRange"
>
<el-form-item
label=
"时间段"
prop=
"dateRange"
>
<el-date-picker
<el-date-picker
v-model=
"queryParams.dateRange"
v-model=
"queryParams.dateRange"
...
@@ -253,7 +252,7 @@
...
@@ -253,7 +252,7 @@
style=
"width: 100%"
style=
"width: 100%"
>
>
<el-table-column
type=
"index"
label=
"序号"
width=
"60"
align=
"center"
/>
<el-table-column
type=
"index"
label=
"序号"
width=
"60"
align=
"center"
/>
<el-table-column
label=
"主订单号"
align=
"center"
prop=
"
mainO
rderId"
width=
"150"
/>
<el-table-column
label=
"主订单号"
align=
"center"
prop=
"
o
rderId"
width=
"150"
/>
<el-table-column
label=
"物料名称"
align=
"center"
prop=
"materialName"
min-width=
"150"
show-overflow-tooltip
/>
<el-table-column
label=
"物料名称"
align=
"center"
prop=
"materialName"
min-width=
"150"
show-overflow-tooltip
/>
<el-table-column
label=
"批次"
align=
"center"
prop=
"batchCode"
width=
"120"
/>
<el-table-column
label=
"批次"
align=
"center"
prop=
"batchCode"
width=
"120"
/>
<el-table-column
label=
"仓库"
align=
"center"
prop=
"warehouseName"
width=
"120"
/>
<el-table-column
label=
"仓库"
align=
"center"
prop=
"warehouseName"
width=
"120"
/>
...
@@ -314,7 +313,7 @@ export default {
...
@@ -314,7 +313,7 @@ export default {
queryParams
:
{
queryParams
:
{
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
10
,
pageSize
:
10
,
mainO
rderId
:
null
,
o
rderId
:
null
,
startDate
:
null
,
startDate
:
null
,
endDate
:
null
,
endDate
:
null
,
ownerId
:
null
,
ownerId
:
null
,
...
@@ -339,7 +338,7 @@ export default {
...
@@ -339,7 +338,7 @@ export default {
detailQueryParams
:
{
detailQueryParams
:
{
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
10
,
pageSize
:
10
,
mainO
rderId
:
null
,
o
rderId
:
null
,
materialId
:
null
,
materialId
:
null
,
warehouseId
:
null
,
warehouseId
:
null
,
warehousesCode
:
null
,
warehousesCode
:
null
,
...
@@ -466,7 +465,7 @@ export default {
...
@@ -466,7 +465,7 @@ export default {
this
.
detailQueryParams
=
{
this
.
detailQueryParams
=
{
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
10
,
pageSize
:
10
,
mainOrderId
:
row
.
mainO
rderId
,
orderId
:
row
.
o
rderId
,
materialId
:
row
.
materialId
,
materialId
:
row
.
materialId
,
warehouseId
:
null
,
warehouseId
:
null
,
warehousesCode
:
null
,
warehousesCode
:
null
,
...
...
ruoyi-admin-vue/src/views/inventory/materials/index.vue
View file @
db0c0a3a
...
@@ -144,6 +144,7 @@
...
@@ -144,6 +144,7 @@
<el-table-column
label=
"SAP物料号"
align=
"center"
prop=
"sapNo"
width=
"150"
/>
<el-table-column
label=
"SAP物料号"
align=
"center"
prop=
"sapNo"
width=
"150"
/>
<!-- <el-table-column label="物料编码" align="center" prop="materialCode" width="120"/> -->
<!-- <el-table-column label="物料编码" align="center" prop="materialCode" width="120"/> -->
<el-table-column
label=
"物料名称"
align=
"center"
prop=
"materialName"
width=
"150"
/>
<el-table-column
label=
"物料名称"
align=
"center"
prop=
"materialName"
width=
"150"
/>
<el-table-column
label=
"物料英文名称"
align=
"center"
prop=
"materialEname"
width=
"150"
/>
<el-table-column
label=
"TS Code"
align=
"center"
prop=
"tsCode"
width=
"150"
/>
<el-table-column
label=
"TS Code"
align=
"center"
prop=
"tsCode"
width=
"150"
/>
<el-table-column
label=
"物料分类"
align=
"center"
prop=
"categoryCode"
>
<el-table-column
label=
"物料分类"
align=
"center"
prop=
"categoryCode"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
...
@@ -298,6 +299,9 @@
...
@@ -298,6 +299,9 @@
<el-form-item
label=
"物料名称"
prop=
"materialName"
>
<el-form-item
label=
"物料名称"
prop=
"materialName"
>
<el-input
v-model=
"form.materialName"
placeholder=
"请输入物料名称"
/>
<el-input
v-model=
"form.materialName"
placeholder=
"请输入物料名称"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"物料英文名称"
prop=
"materialEname"
>
<el-input
v-model=
"form.materialEname"
placeholder=
"请输入物料英文名称"
/>
</el-form-item>
<el-form-item
label=
"物料分类"
prop=
"categoryCode"
>
<el-form-item
label=
"物料分类"
prop=
"categoryCode"
>
<el-select
v-model=
"form.categoryCode"
placeholder=
"请选择物料分类"
clearable
>
<el-select
v-model=
"form.categoryCode"
placeholder=
"请选择物料分类"
clearable
>
<el-option
<el-option
...
@@ -444,6 +448,7 @@ export default {
...
@@ -444,6 +448,7 @@ export default {
id
:
null
,
id
:
null
,
materialCode
:
null
,
materialCode
:
null
,
materialName
:
null
,
materialName
:
null
,
materialEname
:
null
,
sapNo
:
null
,
sapNo
:
null
,
tsCode
:
null
,
tsCode
:
null
,
categoryCode
:
null
,
categoryCode
:
null
,
...
@@ -654,7 +659,7 @@ export default {
...
@@ -654,7 +659,7 @@ export default {
.
map
(
item
=>
({
.
map
(
item
=>
({
...
item
,
...
item
,
// 兜底:如果映射表中没有,显示原始code并标注
// 兜底:如果映射表中没有,显示原始code并标注
displayCategory
:
this
.
categoryMap
[
item
.
categoryCode
]
||
`
${
item
.
categoryCode
}
(未匹配分类)
`
displayCategory
:
this
.
categoryMap
[
item
.
categoryCode
]
||
`
未匹配分类
`
}));
}));
this
.
total
=
total
;
this
.
total
=
total
;
}
catch
(
error
)
{
}
catch
(
error
)
{
...
...
ruoyi-admin-vue/src/views/inventory/materials/materialsSeletor.vue
View file @
db0c0a3a
...
@@ -251,7 +251,7 @@ export default {
...
@@ -251,7 +251,7 @@ export default {
.
filter
(
item
=>
item
.
isUsed
!==
0
&&
item
.
isUsed
!==
'0'
)
.
filter
(
item
=>
item
.
isUsed
!==
0
&&
item
.
isUsed
!==
'0'
)
.
map
(
item
=>
({
.
map
(
item
=>
({
...
item
,
...
item
,
displayCategory
:
this
.
categoryMap
[
item
.
categoryCode
]
||
`
${
item
.
categoryCode
}
(未匹配分类)
`
displayCategory
:
this
.
categoryMap
[
item
.
categoryCode
]
||
`
未匹配分类
`
}));
}));
this
.
total
=
response
.
total
;
this
.
total
=
response
.
total
;
}).
finally
(()
=>
{
}).
finally
(()
=>
{
...
...
ruoyi-admin-vue/src/views/inventory/orders/OutboundOrderFormWithItems.vue
View file @
db0c0a3a
...
@@ -121,6 +121,41 @@
...
@@ -121,6 +121,41 @@
</div>
</div>
<el-row
:gutter=
"20"
>
<el-row
:gutter=
"20"
>
<el-col
:span=
"8"
>
<el-col
:span=
"8"
>
<el-form-item
label=
"计划数量"
prop=
"plannedQuantity"
required
>
<el-input
v-model
.
number=
"currentSelectedRow.plannedQuantity"
type=
"number"
min=
"1"
:max=
"(currentSelectedRow.quantity || 0) - (currentSelectedRow.lockedQuantity || 0)"
@
input=
"handleRowPlannedQtyInput(currentSelectedRow); syncDetails(false)"
placeholder=
"输入计划数量"
/>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"单价"
prop=
"unitPrice"
required
>
<el-input
v-model
.
number=
"currentSelectedRow.unitPrice"
placeholder=
"请输入单价"
type=
"number"
min=
"0"
step=
"0.01"
@
input=
"syncDetails(false)"
/>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"凭证号"
prop=
"voucherNumber"
>
<el-input
v-model=
"currentSelectedRow.voucherNumber"
placeholder=
"请输入凭证号"
@
input=
"syncDetails(false)"
/>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"20"
style=
"margin-top: 10px;"
>
<el-col
:span=
"8"
>
<el-form-item
label=
"约数"
prop=
"divisor"
>
<el-form-item
label=
"约数"
prop=
"divisor"
>
<el-input
<el-input
v-model
.
number=
"currentSelectedRow.divisor"
v-model
.
number=
"currentSelectedRow.divisor"
...
@@ -148,32 +183,6 @@
...
@@ -148,32 +183,6 @@
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"8"
>
<el-col
:span=
"8"
>
<el-form-item
label=
"计划数量"
prop=
"plannedQuantity"
>
<el-input
v-model
.
number=
"currentSelectedRow.plannedQuantity"
type=
"number"
min=
"1"
:max=
"(currentSelectedRow.quantity || 0) - (currentSelectedRow.lockedQuantity || 0)"
@
input=
"handleRowPlannedQtyInput(currentSelectedRow); syncDetails(false)"
placeholder=
"输入计划数量"
/>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"20"
style=
"margin-top: 10px;"
>
<el-col
:span=
"8"
>
<el-form-item
label=
"单价"
prop=
"unitPrice"
>
<el-input
v-model
.
number=
"currentSelectedRow.unitPrice"
placeholder=
"请输入单价"
type=
"number"
min=
"0"
step=
"0.01"
@
input=
"syncDetails(false)"
/>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"发货方"
prop=
"shippedBy"
>
<el-form-item
label=
"发货方"
prop=
"shippedBy"
>
<el-input
<el-input
v-model=
"currentSelectedRow.shippedBy"
v-model=
"currentSelectedRow.shippedBy"
...
@@ -182,16 +191,8 @@
...
@@ -182,16 +191,8 @@
/>
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"凭证号"
prop=
"voucherNumber"
>
<el-input
v-model=
"currentSelectedRow.voucherNumber"
placeholder=
"请输入凭证号"
@
input=
"syncDetails(false)"
/>
</el-form-item>
</el-col>
</el-row>
</el-row>
<el-row
:gutter=
"20"
style=
"margin-top: 10px;"
>
<el-row
:gutter=
"20"
style=
"margin-top: 10px;"
>
<el-col
:span=
"16"
>
<el-col
:span=
"16"
>
<el-form-item
label=
"备注"
prop=
"remark"
>
<el-form-item
label=
"备注"
prop=
"remark"
>
...
@@ -226,6 +227,7 @@
...
@@ -226,6 +227,7 @@
<el-table-column
prop=
"batchId"
label=
"批次ID"
width=
"150"
/>
<el-table-column
prop=
"batchId"
label=
"批次ID"
width=
"150"
/>
<el-table-column
prop=
"warehousesName"
label=
"仓库名称"
width=
"120"
/>
<el-table-column
prop=
"warehousesName"
label=
"仓库名称"
width=
"120"
/>
<el-table-column
prop=
"locationName"
label=
"库位名称"
width=
"120"
/>
<el-table-column
prop=
"locationName"
label=
"库位名称"
width=
"120"
/>
<el-table-column
prop=
"plannedQuantity"
label=
"计划数量"
width=
"100"
/>
<el-table-column
prop=
"plannedQuantity"
label=
"计划数量"
width=
"100"
/>
<el-table-column
prop=
"actualQuantity"
label=
"实际数量"
width=
"100"
fixed=
"right"
/>
<el-table-column
prop=
"actualQuantity"
label=
"实际数量"
width=
"100"
fixed=
"right"
/>
<el-table-column
prop=
"unitPrice"
label=
"单价"
width=
"100"
/>
<el-table-column
prop=
"unitPrice"
label=
"单价"
width=
"100"
/>
...
@@ -637,31 +639,18 @@ syncDetails(strict = true) {
...
@@ -637,31 +639,18 @@ syncDetails(strict = true) {
if
(
row
.
plannedQuantity
>
availableQty
)
{
if
(
row
.
plannedQuantity
>
availableQty
)
{
rowErrors
.
push
(
`计划数量不能超过可用库存(
${
availableQty
}
)`
);
rowErrors
.
push
(
`计划数量不能超过可用库存(
${
availableQty
}
)`
);
}
}
}
else
{
rowErrors
.
push
(
`请填写计划数量`
);
}
}
// 3. 除数(有值才校验,无值不提示)
// 3. 除数(有值才校验,无值不提示)
if
(
row
.
divisor
!==
null
&&
row
.
divisor
!==
undefined
)
{
if
(
row
.
unitPrice
!==
null
&&
row
.
unitPrice
!==
undefined
)
{
// 若有值但为0/负数,可补充校验(按需)
// 若有值但为0/负数,可补充校验(按需)
if
(
row
.
divisor
<=
0
)
{
if
(
row
.
unitPrice
<=
0
)
{
rowErrors
.
push
(
'
换算率(除数)必须大于0
'
);
rowErrors
.
push
(
'
请填写单价
'
);
}
}
}
}
// 4. 标签颜色(有值才校验,空字符串算不合规)
if
(
row
.
labelColor
!==
undefined
&&
row
.
labelColor
===
''
)
{
rowErrors
.
push
(
'请填写标签颜色'
);
}
// 5. 凭证号(有值才校验,空字符串算不合规)
if
(
row
.
voucherNumber
!==
undefined
&&
row
.
voucherNumber
===
''
)
{
rowErrors
.
push
(
'请填写凭证号'
);
}
// 6. 发货人(有值才校验,空字符串算不合规)
if
(
row
.
shippedBy
!==
undefined
&&
row
.
shippedBy
===
''
)
{
rowErrors
.
push
(
'请填写发货人'
);
}
// 收集当前行的错误(仅有值但不合规的字段)
// 收集当前行的错误(仅有值但不合规的字段)
if
(
rowErrors
.
length
>
0
)
{
if
(
rowErrors
.
length
>
0
)
{
errorMessages
.
push
(
`
${
rowName
}
:
${
rowErrors
.
join
(
'、'
)}
`
);
errorMessages
.
push
(
`
${
rowName
}
:
${
rowErrors
.
join
(
'、'
)}
`
);
...
...
ruoyi-admin-vue/src/views/inventory/orders/index.vue
View file @
db0c0a3a
差异被折叠。
点击展开。
ruoyi-admin-vue/src/views/inventory/report_view/inventory_detail.vue
View file @
db0c0a3a
...
@@ -138,7 +138,15 @@
...
@@ -138,7 +138,15 @@
<el-table-column
label=
"物料名称"
align=
"center"
prop=
"materialName"
width=
"150"
/>
<el-table-column
label=
"物料名称"
align=
"center"
prop=
"materialName"
width=
"150"
/>
<el-table-column
label=
"SAP物料号"
align=
"center"
prop=
"sapNo"
width=
"120"
/>
<el-table-column
label=
"SAP物料号"
align=
"center"
prop=
"sapNo"
width=
"120"
/>
<el-table-column
label=
"TS Code"
align=
"center"
prop=
"tsCode"
width=
"120"
/>
<el-table-column
label=
"TS Code"
align=
"center"
prop=
"tsCode"
width=
"120"
/>
<el-table-column
label=
"危险类别"
align=
"center"
prop=
"hazard"
width=
"120"
/>
<el-table-column
label=
"危险类别"
align=
"center"
prop=
"hazardId"
width=
"120"
>
<
template
slot-scope=
"scope"
>
<el-tag
:type=
"getDictListClass('danger_type',scope.row.hazardId)"
size=
"small"
>
{{
getDictLabel
(
'danger_type'
,
scope
.
row
.
hazardId
)
}}
</el-tag>
</
template
>
</el-table-column>
<el-table-column
label=
"规格型号"
align=
"center"
prop=
"specification"
width=
"120"
/>
<el-table-column
label=
"规格型号"
align=
"center"
prop=
"specification"
width=
"120"
/>
<el-table-column
label=
"计量单位"
align=
"center"
prop=
"materialUnit"
width=
"120"
/>
<el-table-column
label=
"计量单位"
align=
"center"
prop=
"materialUnit"
width=
"120"
/>
<el-table-column
label=
"单位重量"
align=
"center"
prop=
"unitWeight"
width=
"120"
>
<el-table-column
label=
"单位重量"
align=
"center"
prop=
"unitWeight"
width=
"120"
>
...
@@ -232,7 +240,15 @@
...
@@ -232,7 +240,15 @@
<el-table-column
label=
"物料名称"
align=
"center"
prop=
"materialName"
width=
"150"
/>
<el-table-column
label=
"物料名称"
align=
"center"
prop=
"materialName"
width=
"150"
/>
<el-table-column
label=
"SAP物料号"
align=
"center"
prop=
"sapNo"
width=
"120"
/>
<el-table-column
label=
"SAP物料号"
align=
"center"
prop=
"sapNo"
width=
"120"
/>
<el-table-column
label=
"TS Code"
align=
"center"
prop=
"tsCode"
width=
"120"
/>
<el-table-column
label=
"TS Code"
align=
"center"
prop=
"tsCode"
width=
"120"
/>
<el-table-column
label=
"危险类别"
align=
"center"
prop=
"hazard"
width=
"120"
/>
<el-table-column
label=
"危险类别"
align=
"center"
prop=
"hazardId"
width=
"120"
>
<
template
slot-scope=
"scope"
>
<el-tag
:type=
"getDictListClass('danger_type',scope.row.hazardId)"
size=
"small"
>
{{
getDictLabel
(
'danger_type'
,
scope
.
row
.
hazardId
)
}}
</el-tag>
</
template
>
</el-table-column>
<!-- <el-table-column label="规格型号" align="center" prop="specification" width="120" /> -->
<!-- <el-table-column label="规格型号" align="center" prop="specification" width="120" /> -->
<!-- <el-table-column label="入库单号" align="center" prop="orderId" width="150" /> -->
<!-- <el-table-column label="入库单号" align="center" prop="orderId" width="150" /> -->
<el-table-column
label=
"批次"
align=
"center"
prop=
"batchId"
width=
"120"
/>
<el-table-column
label=
"批次"
align=
"center"
prop=
"batchId"
width=
"120"
/>
...
@@ -265,6 +281,7 @@ import ImportExcel from "@/components/ImportExcel"
...
@@ -265,6 +281,7 @@ import ImportExcel from "@/components/ImportExcel"
export
default
{
export
default
{
name
:
"InventoryDetail"
,
name
:
"InventoryDetail"
,
dicts
:
[
'danger_type'
],
components
:
{
components
:
{
RightToolbar
,
RightToolbar
,
PageTitle
,
PageTitle
,
...
@@ -333,6 +350,19 @@ export default {
...
@@ -333,6 +350,19 @@ export default {
this
.
getList
()
this
.
getList
()
},
},
methods
:
{
methods
:
{
//从表格中的值当作键获取字典lebel
getDictLabel
(
dictType
,
value
){
if
(
!
value
||
!
this
.
dict
?.
type
?.[
dictType
])
return
'-'
const
dictItem
=
this
.
dict
.
type
[
dictType
].
find
(
item
=>
item
.
value
===
value
)
return
dictItem
?.
label
||
'-'
},
//从表格中的值当作键获取字典listClass
getDictListClass
(
dictType
,
value
){
if
(
!
value
||
!
this
.
dict
?.
type
?.[
dictType
])
return
'-'
const
dictItem
=
this
.
dict
.
type
[
dictType
].
find
(
item
=>
item
.
value
===
value
)
return
dictItem
?.
label
||
'-'
},
/** 查询库存明细列表 */
/** 查询库存明细列表 */
getList
()
{
getList
()
{
this
.
loading
=
true
this
.
loading
=
true
...
...
ruoyi-admin-vue/src/views/inventory/warehouses/index.vue
View file @
db0c0a3a
...
@@ -36,14 +36,7 @@
...
@@ -36,14 +36,7 @@
@
click=
"handleExport"
@
click=
"handleExport"
v-hasPermi=
"['inventory:warehouses:export']"
v-hasPermi=
"['inventory:warehouses:export']"
>
导出
</el-button>
>
导出
</el-button>
<el-button
type=
"info"
plain
icon=
"el-icon-upload2"
size=
"medium"
@
click=
"handleImport"
v-hasPermi=
"['inventory:warehouses:add']"
>
导入
</el-button>
</
template
>
</
template
>
</PageTitle>
</PageTitle>
...
...
ruoyi-admin/src/main/java/com/ruoyi/web/controller/inventory/InboundOrdersController.java
View file @
db0c0a3a
差异被折叠。
点击展开。
ruoyi-common/src/main/java/com/ruoyi/common/config/WarehouseConfig.java
0 → 100644
View file @
db0c0a3a
package
com
.
ruoyi
.
common
.
config
;
/**
* 仓库配置类(存储默认仓库、常用仓库ID等)
*/
public
class
WarehouseConfig
{
/**
* 默认出库仓库ID(核心默认值)
*/
public
static
final
String
DEFAULT_WAREHOUSE_ID
=
"572ba484-199c-45d9-9735-610928ed5c70"
;
}
\ No newline at end of file
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/Materials.java
View file @
db0c0a3a
差异被折叠。
点击展开。
ruoyi-common/src/main/java/com/ruoyi/common/utils/StringUtils.java
View file @
db0c0a3a
...
@@ -719,4 +719,5 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
...
@@ -719,4 +719,5 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
}
}
return
sb
.
toString
();
return
sb
.
toString
();
}
}
}
}
\ No newline at end of file
ruoyi-inventory/src/main/java/com/ruoyi/inventory/controller/OutboundOrderItemsController.java
View file @
db0c0a3a
...
@@ -3,7 +3,7 @@ package com.ruoyi.inventory.controller;
...
@@ -3,7 +3,7 @@ package com.ruoyi.inventory.controller;
import
java.util.List
;
import
java.util.List
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
com.ruoyi.inventory.domain.vo.InboundTemplateVO
;
import
com.ruoyi.inventory.domain.vo.
inboundVO.
InboundTemplateVO
;
import
com.ruoyi.inventory.domain.vo.OutboundOrdersSummaryVO
;
import
com.ruoyi.inventory.domain.vo.OutboundOrdersSummaryVO
;
import
com.ruoyi.inventory.domain.vo.OutboundTemplateVO
;
import
com.ruoyi.inventory.domain.vo.OutboundTemplateVO
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.security.access.prepost.PreAuthorize
;
...
...
ruoyi-inventory/src/main/java/com/ruoyi/inventory/controller/OutboundOrdersController.java
View file @
db0c0a3a
...
@@ -6,7 +6,7 @@ import javax.servlet.http.HttpServletResponse;
...
@@ -6,7 +6,7 @@ import javax.servlet.http.HttpServletResponse;
import
com.alibaba.fastjson2.JSONObject
;
import
com.alibaba.fastjson2.JSONObject
;
import
com.ruoyi.inventory.domain.Inventory
;
import
com.ruoyi.inventory.domain.Inventory
;
import
com.ruoyi.inventory.domain.vo.InboundTemplateVO
;
import
com.ruoyi.inventory.domain.vo.
inboundVO.
InboundTemplateVO
;
import
com.ruoyi.inventory.domain.vo.OutboundTemplateVO
;
import
com.ruoyi.inventory.domain.vo.OutboundTemplateVO
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
ruoyi-inventory/src/main/java/com/ruoyi/inventory/domain/InventoryTransactions.java
View file @
db0c0a3a
...
@@ -2,6 +2,7 @@ package com.ruoyi.inventory.domain;
...
@@ -2,6 +2,7 @@ package com.ruoyi.inventory.domain;
import
java.util.Date
;
import
java.util.Date
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.ruoyi.common.annotation.Excel
;
import
com.ruoyi.common.annotation.Excel
;
...
@@ -13,6 +14,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
...
@@ -13,6 +14,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
* @author ruoyi
* @author ruoyi
* @date 2025-12-02
* @date 2025-12-02
*/
*/
@Data
public
class
InventoryTransactions
extends
BaseEntity
public
class
InventoryTransactions
extends
BaseEntity
{
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
...
@@ -91,218 +93,7 @@ public class InventoryTransactions extends BaseEntity
...
@@ -91,218 +93,7 @@ public class InventoryTransactions extends BaseEntity
@Excel
(
name
=
"排序号"
)
@Excel
(
name
=
"排序号"
)
private
String
updateUserCode
;
private
String
updateUserCode
;
public
String
getInventoryId
()
{
@Excel
(
name
=
"单价"
)
return
inventoryId
;
private
String
unitPrice
;
}
public
void
setInventoryId
(
String
inventoryId
)
{
this
.
inventoryId
=
inventoryId
;
}
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
public
String
getId
()
{
return
id
;
}
public
void
setTransactionType
(
Long
transactionType
)
{
this
.
transactionType
=
transactionType
;
}
public
Long
getTransactionType
()
{
return
transactionType
;
}
public
void
setReferenceId
(
String
referenceId
)
{
this
.
referenceId
=
referenceId
;
}
public
String
getReferenceId
()
{
return
referenceId
;
}
public
void
setReferenceItemId
(
String
referenceItemId
)
{
this
.
referenceItemId
=
referenceItemId
;
}
public
String
getReferenceItemId
()
{
return
referenceItemId
;
}
public
void
setMaterialId
(
String
materialId
)
{
this
.
materialId
=
materialId
;
}
public
String
getMaterialId
()
{
return
materialId
;
}
public
void
setBatchCode
(
String
batchCode
)
{
this
.
batchCode
=
batchCode
;
}
public
String
getBatchCode
()
{
return
batchCode
;
}
public
void
setWarehouseId
(
String
warehouseId
)
{
this
.
warehouseId
=
warehouseId
;
}
public
String
getWarehouseId
()
{
return
warehouseId
;
}
public
void
setLocationId
(
String
locationId
)
{
this
.
locationId
=
locationId
;
}
public
String
getLocationId
()
{
return
locationId
;
}
public
void
setOwnerId
(
String
ownerId
)
{
this
.
ownerId
=
ownerId
;
}
public
String
getOwnerId
()
{
return
ownerId
;
}
public
void
setQuantityBefore
(
Long
quantityBefore
)
{
this
.
quantityBefore
=
quantityBefore
;
}
public
Long
getQuantityBefore
()
{
return
quantityBefore
;
}
public
void
setQuantityChange
(
Long
quantityChange
)
{
this
.
quantityChange
=
quantityChange
;
}
public
Long
getQuantityChange
()
{
return
quantityChange
;
}
public
void
setQuantityAfter
(
Long
quantityAfter
)
{
this
.
quantityAfter
=
quantityAfter
;
}
public
Long
getQuantityAfter
()
{
return
quantityAfter
;
}
public
void
setTransactionTime
(
Date
transactionTime
)
{
this
.
transactionTime
=
transactionTime
;
}
public
Date
getTransactionTime
()
{
return
transactionTime
;
}
public
void
setOperatedBy
(
String
operatedBy
)
{
this
.
operatedBy
=
operatedBy
;
}
public
String
getOperatedBy
()
{
return
operatedBy
;
}
public
void
setIsUsed
(
Long
isUsed
)
{
this
.
isUsed
=
isUsed
;
}
public
Long
getIsUsed
()
{
return
isUsed
;
}
public
void
setSortNo
(
Long
sortNo
)
{
this
.
sortNo
=
sortNo
;
}
public
Long
getSortNo
()
{
return
sortNo
;
}
public
void
setCreateUserCode
(
String
createUserCode
)
{
this
.
createUserCode
=
createUserCode
;
}
public
String
getCreateUserCode
()
{
return
createUserCode
;
}
public
void
setUpdateUserCode
(
String
updateUserCode
)
{
this
.
updateUserCode
=
updateUserCode
;
}
public
String
getUpdateUserCode
()
{
return
updateUserCode
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"id"
,
getId
())
.
append
(
"transactionType"
,
getTransactionType
())
.
append
(
"referenceId"
,
getReferenceId
())
.
append
(
"referenceItemId"
,
getReferenceItemId
())
.
append
(
"materialId"
,
getMaterialId
())
.
append
(
"batchCode"
,
getBatchCode
())
.
append
(
"warehouseId"
,
getWarehouseId
())
.
append
(
"locationId"
,
getLocationId
())
.
append
(
"ownerId"
,
getOwnerId
())
.
append
(
"quantityBefore"
,
getQuantityBefore
())
.
append
(
"quantityChange"
,
getQuantityChange
())
.
append
(
"quantityAfter"
,
getQuantityAfter
())
.
append
(
"transactionTime"
,
getTransactionTime
())
.
append
(
"operatedBy"
,
getOperatedBy
())
.
append
(
"remark"
,
getRemark
())
.
append
(
"isUsed"
,
getIsUsed
())
.
append
(
"sortNo"
,
getSortNo
())
.
append
(
"createTime"
,
getCreateTime
())
.
append
(
"createUserCode"
,
getCreateUserCode
())
.
append
(
"updateTime"
,
getUpdateTime
())
.
append
(
"updateUserCode"
,
getUpdateUserCode
())
.
toString
();
}
}
}
ruoyi-inventory/src/main/java/com/ruoyi/inventory/domain/OutboundOrderItems.java
View file @
db0c0a3a
...
@@ -66,7 +66,7 @@ public class OutboundOrderItems extends BaseEntity
...
@@ -66,7 +66,7 @@ public class OutboundOrderItems extends BaseEntity
/** 单价 */
/** 单价 */
@Excel
(
name
=
"单价"
)
@Excel
(
name
=
"单价"
)
private
Long
unitPrice
;
private
Double
unitPrice
;
/** 计划数量 */
/** 计划数量 */
@Excel
(
name
=
"计划数量"
)
@Excel
(
name
=
"计划数量"
)
...
@@ -117,5 +117,7 @@ public class OutboundOrderItems extends BaseEntity
...
@@ -117,5 +117,7 @@ public class OutboundOrderItems extends BaseEntity
@Excel
(
name
=
"排序号"
)
@Excel
(
name
=
"排序号"
)
private
String
updateUserCode
;
private
String
updateUserCode
;
private
String
InventoryType
;
}
}
\ No newline at end of file
ruoyi-inventory/src/main/java/com/ruoyi/inventory/domain/Owners.java
View file @
db0c0a3a
...
@@ -28,7 +28,7 @@ public class Owners extends BaseEntity
...
@@ -28,7 +28,7 @@ public class Owners extends BaseEntity
@Excel
(
name
=
"货主名称"
)
@Excel
(
name
=
"货主名称"
)
private
String
ownerName
;
private
String
ownerName
;
@Excel
(
name
=
"
货主
名称"
)
@Excel
(
name
=
"
英文
名称"
)
private
String
englishName
;
private
String
englishName
;
/** 货主类型 1-供应商 2-客户 3-内部 检索条件 */
/** 货主类型 1-供应商 2-客户 3-内部 检索条件 */
...
...
ruoyi-inventory/src/main/java/com/ruoyi/inventory/domain/vo/InboundTemplateVO.java
deleted
100644 → 0
View file @
6eab21f8
package
com
.
ruoyi
.
inventory
.
domain
.
vo
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.ruoyi.common.annotation.Excel
;
import
com.ruoyi.common.core.domain.BaseEntity
;
import
java.util.Date
;
/**
* 入库单导入对象 inboundTemplate
*
* @author ruoyi
* @date 2025-12-02
*/
public
class
InboundTemplateVO
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** 编号 */
private
String
id
;
/** 入库日期 日期无时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@Excel
(
name
=
"入库日期"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
private
Date
inboundDate
;
/** 货物ID 字典,检索条件 */
@Excel
(
name
=
"SAP No"
)
private
String
sapNo
;
/** 货物名称 */
@Excel
(
name
=
"物料名称"
)
private
String
materialName
;
/** 货物名称 */
@Excel
(
name
=
"TS Code"
)
private
String
tsCode
;
/** 货主ID */
@Excel
(
name
=
"货主"
)
private
String
ownerId
;
/** 批次ID 检索条件 */
@Excel
(
name
=
"批号"
)
private
String
batchId
;
/** 计划数量 */
@Excel
(
name
=
"计划数量"
)
private
Long
plannedQuantity
;
/** 入库单号 检索条件 */
@Excel
(
name
=
"单号"
)
private
String
orderId
;
/** 系统编号 检索条件 */
@Excel
(
name
=
"系统编号"
)
private
String
systemNo
;
/** 入库类型 字典,检索条件 */
// @Excel(name = "入库类型")
private
String
orderTypeId
;
@Excel
(
name
=
"件重"
)
private
Double
unitWeight
;
/** 约数 */
@Excel
(
name
=
"约数"
)
private
Long
divisor
;
/** 实际件数 */
@Excel
(
name
=
"实际件数"
)
private
Long
actualPackages
;
/** 实际数量 */
@Excel
(
name
=
"实发数量"
)
private
Long
actualQuantity
;
/** 仓库ID 暂无用 */
@Excel
(
name
=
"仓库"
)
private
String
warehouseId
;
/** 库位ID 检索条件 */
@Excel
(
name
=
"库位"
)
private
String
locationId
;
/** 标签颜色 字典,检索条件 */
@Excel
(
name
=
"标签颜色"
)
private
Long
labelColor
;
/** 凭证号 检索条件 */
@Excel
(
name
=
"凭证号"
)
private
String
voucherNumber
;
/** 单价 */
@Excel
(
name
=
"单价"
)
private
Long
unitPrice
;
/** 备注 */
@Excel
(
name
=
"备注"
)
private
String
remark
;
/** 订单类型 字典,检索条件 */
@Excel
(
name
=
"订单类型"
)
private
String
orderType
;
/** 收货人 */
@Excel
(
name
=
"收货人"
)
private
String
receivedBy
;
/** 物料备注 */
@Excel
(
name
=
"物料备注"
)
private
String
remark2
;
/** 负责人 暂无用 */
// @Excel(name = "负责人 暂无用")
private
String
opUserName
;
/** 计划件数 暂无用 */
// @Excel(name = "件数")
private
Long
plannedPackages
;
/** 排序号 */
private
Long
sortNo
;
/** 创建日期 */
private
String
createUserCode
;
private
String
updateUserCode
;
public
String
getId
()
{
return
id
;
}
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
public
String
getOrderId
()
{
return
orderId
;
}
public
void
setOrderId
(
String
orderId
)
{
this
.
orderId
=
orderId
;
}
public
String
getSystemNo
()
{
return
systemNo
;
}
public
void
setSystemNo
(
String
systemNo
)
{
this
.
systemNo
=
systemNo
;
}
public
String
getOrderTypeId
()
{
return
orderTypeId
;
}
public
void
setOrderTypeId
(
String
orderTypeId
)
{
this
.
orderTypeId
=
orderTypeId
;
}
public
String
getBatchId
()
{
return
batchId
;
}
public
void
setBatchId
(
String
batchId
)
{
this
.
batchId
=
batchId
;
}
public
Date
getInboundDate
()
{
return
inboundDate
;
}
public
void
setInboundDate
(
Date
inboundDate
)
{
this
.
inboundDate
=
inboundDate
;
}
public
String
getOrderType
()
{
return
orderType
;
}
public
void
setOrderType
(
String
orderType
)
{
this
.
orderType
=
orderType
;
}
public
String
getRemark
()
{
return
remark
;
}
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
public
String
getOwnerId
()
{
return
ownerId
;
}
public
void
setOwnerId
(
String
ownerId
)
{
this
.
ownerId
=
ownerId
;
}
public
String
getWarehouseId
()
{
return
warehouseId
;
}
public
void
setWarehouseId
(
String
warehouseId
)
{
this
.
warehouseId
=
warehouseId
;
}
public
String
getLocationId
()
{
return
locationId
;
}
public
void
setLocationId
(
String
locationId
)
{
this
.
locationId
=
locationId
;
}
public
String
getRemark2
()
{
return
remark2
;
}
public
void
setRemark2
(
String
remark2
)
{
this
.
remark2
=
remark2
;
}
public
String
getSapNo
()
{
return
sapNo
;
}
public
void
setSapNo
(
String
sapNo
)
{
this
.
sapNo
=
sapNo
;
}
public
String
getMaterialName
()
{
return
materialName
;
}
public
void
setMaterialName
(
String
materialName
)
{
this
.
materialName
=
materialName
;
}
public
String
getOpUserName
()
{
return
opUserName
;
}
public
void
setOpUserName
(
String
opUserName
)
{
this
.
opUserName
=
opUserName
;
}
public
Long
getPlannedQuantity
()
{
return
plannedQuantity
;
}
public
void
setPlannedQuantity
(
Long
plannedQuantity
)
{
this
.
plannedQuantity
=
plannedQuantity
;
}
public
Long
getActualQuantity
()
{
return
actualQuantity
;
}
public
void
setActualQuantity
(
Long
actualQuantity
)
{
this
.
actualQuantity
=
actualQuantity
;
}
public
Long
getPlannedPackages
()
{
return
plannedPackages
;
}
public
void
setPlannedPackages
(
Long
plannedPackages
)
{
this
.
plannedPackages
=
plannedPackages
;
}
public
Long
getActualPackages
()
{
return
actualPackages
;
}
public
void
setActualPackages
(
Long
actualPackages
)
{
this
.
actualPackages
=
actualPackages
;
}
public
Long
getDivisor
()
{
return
divisor
;
}
public
void
setDivisor
(
Long
divisor
)
{
this
.
divisor
=
divisor
;
}
public
Long
getLabelColor
()
{
return
labelColor
;
}
public
void
setLabelColor
(
Long
labelColor
)
{
this
.
labelColor
=
labelColor
;
}
public
String
getVoucherNumber
()
{
return
voucherNumber
;
}
public
void
setVoucherNumber
(
String
voucherNumber
)
{
this
.
voucherNumber
=
voucherNumber
;
}
public
Long
getUnitPrice
()
{
return
unitPrice
;
}
public
void
setUnitPrice
(
Long
unitPrice
)
{
this
.
unitPrice
=
unitPrice
;
}
public
String
getReceivedBy
()
{
return
receivedBy
;
}
public
void
setReceivedBy
(
String
receivedBy
)
{
this
.
receivedBy
=
receivedBy
;
}
public
String
getCreateUserCode
()
{
return
createUserCode
;
}
public
void
setCreateUserCode
(
String
createUserCode
)
{
this
.
createUserCode
=
createUserCode
;
}
public
String
getUpdateUserCode
()
{
return
updateUserCode
;
}
public
void
setUpdateUserCode
(
String
updateUserCode
)
{
this
.
updateUserCode
=
updateUserCode
;
}
public
Long
getSortNo
()
{
return
sortNo
;
}
public
void
setSortNo
(
Long
sortNo
)
{
this
.
sortNo
=
sortNo
;
}
public
String
getTsCode
()
{
return
tsCode
;
}
public
void
setTsCode
(
String
tsCode
)
{
this
.
tsCode
=
tsCode
;
}
public
Double
getUnitWeight
()
{
return
unitWeight
;
}
public
void
setUnitWeight
(
Double
unitWeight
)
{
this
.
unitWeight
=
unitWeight
;
}
@Override
public
String
toString
()
{
return
"InboundTemplateVO{"
+
"id='"
+
id
+
'\''
+
", inboundDate="
+
inboundDate
+
", sapNo='"
+
sapNo
+
'\''
+
", materialName='"
+
materialName
+
'\''
+
", tsCode='"
+
tsCode
+
'\''
+
", batchId='"
+
batchId
+
'\''
+
", plannedQuantity="
+
plannedQuantity
+
", orderId='"
+
orderId
+
'\''
+
", systemNo='"
+
systemNo
+
'\''
+
", orderTypeId='"
+
orderTypeId
+
'\''
+
", unitWeight="
+
unitWeight
+
", divisor="
+
divisor
+
", actualPackages="
+
actualPackages
+
", actualQuantity="
+
actualQuantity
+
", warehouseId='"
+
warehouseId
+
'\''
+
", locationId='"
+
locationId
+
'\''
+
", labelColor="
+
labelColor
+
", voucherNumber='"
+
voucherNumber
+
'\''
+
", unitPrice="
+
unitPrice
+
", remark='"
+
remark
+
'\''
+
", orderType='"
+
orderType
+
'\''
+
", receivedBy='"
+
receivedBy
+
'\''
+
", remark2='"
+
remark2
+
'\''
+
", ownerId='"
+
ownerId
+
'\''
+
", opUserName='"
+
opUserName
+
'\''
+
", plannedPackages="
+
plannedPackages
+
", sortNo="
+
sortNo
+
", createUserCode='"
+
createUserCode
+
'\''
+
", updateUserCode='"
+
updateUserCode
+
'\''
+
'}'
;
}
}
ruoyi-inventory/src/main/java/com/ruoyi/inventory/domain/vo/inboundVO/InboundFinishTemplateVO.java
0 → 100644
View file @
db0c0a3a
package
com
.
ruoyi
.
inventory
.
domain
.
vo
.
inboundVO
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.ruoyi.common.annotation.Excel
;
import
com.ruoyi.common.core.domain.BaseEntity
;
import
lombok.Data
;
import
java.util.Date
;
@Data
public
class
InboundFinishTemplateVO
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** 编号 */
private
String
id
;
/** 入库日期 日期无时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@Excel
(
name
=
"日期"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
private
Date
inboundDate
;
/** 货物ID 字典,检索条件 */
@Excel
(
name
=
"SAP No"
)
private
String
sapNo
;
/** 货物名称 */
@Excel
(
name
=
"物料名称"
)
private
String
materialName
;
/** 货物名称 */
@Excel
(
name
=
"TS Code"
)
private
String
tsCode
;
/** 批次ID 检索条件 */
@Excel
(
name
=
"批号"
)
private
String
batchId
;
/** 计划数量 */
@Excel
(
name
=
"计划数量"
)
private
Long
plannedQuantity
;
@Excel
(
name
=
"件重"
)
private
Double
packageWeight
;
/** 约数 */
@Excel
(
name
=
"约数"
)
private
Long
divisor
;
@Excel
(
name
=
"件数"
)
private
Long
actualPackages
;
@Excel
(
name
=
"重量"
)
private
Double
unitWeight
;
/** 实际数量 */
// @Excel(name = "实发数量")
private
Long
actualQuantity
;
/** 库位 */
@Excel
(
name
=
"库位"
)
private
String
locationId
;
/** 仓库ID 暂无用 */
@Excel
(
name
=
"仓库"
)
private
String
warehouseId
;
/** 成品表里的第二个 "库位" */
@Excel
(
name
=
"库位"
)
private
String
remark2
;
/** 库位ID 检索条件 */
// @Excel(name = "收货库位")
private
String
relocationId
;
/** 标签颜色 字典,检索条件 */
@Excel
(
name
=
"标签颜色"
)
private
Long
labelColor
;
/** 凭证号 检索条件 */
@Excel
(
name
=
"凭证号"
)
private
String
voucherNumber
;
@Excel
(
name
=
"保温"
)
private
String
keepWarm
;
@Excel
(
name
=
"危险类别"
)
private
String
hazardId
;
/** 入库单号 检索条件 */
@Excel
(
name
=
"智观(客户订单号)"
)
private
String
orderId
;
/** 系统编号 检索条件 */
@Excel
(
name
=
"客户订单号/PO号"
)
private
String
systemNo
;
/** 货主ID */
@Excel
(
name
=
"货主"
)
private
String
ownerId
;
/** 入库类型 字典,检索条件 */
@Excel
(
name
=
"贴标数量"
)
private
String
labelQuantity
;
/** 订单类型 字典,检索条件 */
@Excel
(
name
=
"订单类型"
)
private
String
orderType
;
@Excel
(
name
=
"单个件重"
)
private
Double
packageWeight2
;
/** 单价 */
// @Excel(name = "单价")
private
Long
unitPrice
;
/** 收货人 */
// @Excel(name = "收货人")
private
String
receivedBy
;
/** 物料备注 */
// @Excel(name = "物料备注")
private
String
remark1
;
/** 负责人 暂无用 */
// @Excel(name = "负责人 暂无用")
private
String
opUserName
;
/** 计划件数 暂无用 */
// @Excel(name = "件数")
private
Long
plannedPackages
;
/** 排序号 */
private
Long
sortNo
;
/** 创建日期 */
private
String
createUserCode
;
private
String
updateUserCode
;
}
ruoyi-inventory/src/main/java/com/ruoyi/inventory/domain/vo/inboundVO/InboundTRDCTemplateVO.java
0 → 100644
View file @
db0c0a3a
package
com
.
ruoyi
.
inventory
.
domain
.
vo
.
inboundVO
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.ruoyi.common.annotation.Excel
;
import
com.ruoyi.common.core.domain.BaseEntity
;
import
lombok.Data
;
import
java.util.Date
;
@Data
public
class
InboundTRDCTemplateVO
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** 编号 */
private
String
id
;
/** 入库日期 日期无时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@Excel
(
name
=
"日期"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
private
Date
inboundDate
;
/** 货物ID 字典,检索条件 */
@Excel
(
name
=
"SAP No"
)
private
String
sapNo
;
/** 货物名称 */
@Excel
(
name
=
"物料名称"
)
private
String
materialName
;
/** 货物名称 */
@Excel
(
name
=
"TS Code"
)
private
String
tsCode
;
/** 批次ID 检索条件 */
@Excel
(
name
=
"批号"
)
private
String
batchId
;
/** 计划数量 */
@Excel
(
name
=
"计划数量"
)
private
Long
plannedQuantity
;
@Excel
(
name
=
"件重"
)
private
Double
unitWeight
;
/** 约数 */
@Excel
(
name
=
"约数"
)
private
Long
divisor
;
/** 实际件数 */
@Excel
(
name
=
"件数"
)
private
Long
actualPackages
;
/** 实际数量 */
@Excel
(
name
=
"实发数量"
)
private
Long
actualQuantity
;
/** 库位ID 检索条件 */
@Excel
(
name
=
"库位"
)
private
String
locationId
;
/** 仓库ID 暂无用 */
@Excel
(
name
=
"仓库"
)
private
String
warehouseId
;
/** 备注 */
@Excel
(
name
=
"备注"
)
private
String
remark
;
/** 库位ID 检索条件 */
// @Excel(name = "收货库位")
private
String
relocationId
;
/** 标签颜色 字典,检索条件 */
@Excel
(
name
=
"标签颜色"
)
private
Long
labelColor
;
/** 凭证号 检索条件 */
@Excel
(
name
=
"凭证号"
)
private
String
voucherNumber
;
@Excel
(
name
=
"保温"
)
private
String
keepWarm
;
@Excel
(
name
=
"危险类别"
)
private
String
hazardId
;
/** 入库单号 检索条件 */
@Excel
(
name
=
"单号"
)
private
String
orderId
;
/** 系统编号 检索条件 */
@Excel
(
name
=
"系统编号"
)
private
String
systemNo
;
/** 货主ID */
@Excel
(
name
=
"货主"
)
private
String
ownerId
;
/** 入库类型 字典,检索条件 */
@Excel
(
name
=
"贴标数量"
)
private
String
labelQuantity
;
/** 订单类型 字典,检索条件 */
@Excel
(
name
=
"订单类型"
)
private
String
orderType
;
@Excel
(
name
=
"单件重量"
)
private
Double
packageWeight
;
/** 单价 */
// @Excel(name = "单价")
private
Long
unitPrice
;
/** 收货人 */
// @Excel(name = "收货人")
private
String
receivedBy
;
/** 物料备注 */
// @Excel(name = "物料备注")
private
String
remark2
;
/** 负责人 暂无用 */
// @Excel(name = "负责人 暂无用")
private
String
opUserName
;
/** 计划件数 暂无用 */
// @Excel(name = "件数")
private
Long
plannedPackages
;
/** 排序号 */
private
Long
sortNo
;
/** 创建日期 */
private
String
createUserCode
;
private
String
updateUserCode
;
}
ruoyi-inventory/src/main/java/com/ruoyi/inventory/domain/vo/inboundVO/InboundTemplateVO.java
0 → 100644
View file @
db0c0a3a
package
com
.
ruoyi
.
inventory
.
domain
.
vo
.
inboundVO
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.ruoyi.common.annotation.Excel
;
import
com.ruoyi.common.core.domain.BaseEntity
;
import
lombok.Data
;
import
java.util.Date
;
/**
* 入库单导入对象 inboundTemplate
*
* @author ZTW
* @date 2025-12-02
*/
@Data
public
class
InboundTemplateVO
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** 编号 */
private
String
id
;
/** 入库日期 日期无时间 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@Excel
(
name
=
"日期"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
private
Date
inboundDate
;
/** 货物ID 字典,检索条件 */
@Excel
(
name
=
"SAP No"
)
private
String
sapNo
;
/** 货物名称 */
@Excel
(
name
=
"物料名称"
)
private
String
materialName
;
/** 货物名称 */
@Excel
(
name
=
"TS Code"
)
private
String
tsCode
;
/** 批次ID 检索条件 */
@Excel
(
name
=
"批号"
)
private
String
batchId
;
/** 计划数量 */
@Excel
(
name
=
"计划数量"
)
private
Long
plannedQuantity
;
@Excel
(
name
=
"件重"
)
private
Double
unitWeight
;
/** 约数 */
@Excel
(
name
=
"约数"
)
private
Long
divisor
;
/** 实际件数 */
@Excel
(
name
=
"件数"
)
private
Long
actualPackages
;
/** 实际数量 */
@Excel
(
name
=
"实发数量"
)
private
Long
actualQuantity
;
/** 库位ID 检索条件 */
@Excel
(
name
=
"库位"
)
private
String
locationId
;
/** 仓库ID 暂无用 */
@Excel
(
name
=
"仓库"
)
private
String
warehouseId
;
/** 备注 */
// @Excel(name = "备注")
private
String
remark
;
/** 库位ID 检索条件 */
@Excel
(
name
=
"收货库位"
)
private
String
relocationId
;
/** 标签颜色 字典,检索条件 */
@Excel
(
name
=
"标签颜色"
)
private
Long
labelColor
;
/** 凭证号 检索条件 */
@Excel
(
name
=
"凭证号"
)
private
String
voucherNumber
;
@Excel
(
name
=
"保温"
)
private
String
keepWarm
;
@Excel
(
name
=
"危险类别"
)
private
String
hazardId
;
/** 入库单号 检索条件 */
@Excel
(
name
=
"单号"
)
private
String
orderId
;
/** 系统编号 检索条件 */
@Excel
(
name
=
"系统编号"
)
private
String
systemNo
;
/** 货主ID */
@Excel
(
name
=
"货主"
)
private
String
ownerId
;
/** 入库类型 字典,检索条件 */
@Excel
(
name
=
"贴标数量"
)
private
String
labelQuantity
;
/** 订单类型 字典,检索条件 */
@Excel
(
name
=
"订单类型"
)
private
String
orderType
;
@Excel
(
name
=
"单件重量"
)
private
Double
packageWeight
;
/** 单价 */
// @Excel(name = "单价")
private
Long
unitPrice
;
/** 收货人 */
// @Excel(name = "收货人")
private
String
receivedBy
;
/** 物料备注 */
// @Excel(name = "物料备注")
private
String
remark2
;
/** 负责人 暂无用 */
// @Excel(name = "负责人 暂无用")
private
String
opUserName
;
/** 计划件数 暂无用 */
// @Excel(name = "件数")
private
Long
plannedPackages
;
/** 排序号 */
private
Long
sortNo
;
/** 创建日期 */
private
String
createUserCode
;
private
String
updateUserCode
;
}
ruoyi-inventory/src/main/java/com/ruoyi/inventory/mapper/InventoryMapper.java
View file @
db0c0a3a
...
@@ -116,4 +116,6 @@ public interface InventoryMapper
...
@@ -116,4 +116,6 @@ public interface InventoryMapper
public
List
<
java
.
util
.
Map
<
String
,
String
>>
selectInventoryTopTenByAmount
();
public
List
<
java
.
util
.
Map
<
String
,
String
>>
selectInventoryTopTenByAmount
();
public
List
<
java
.
util
.
Map
<
String
,
String
>>
selectInventoryTopTenByQuantity
();
public
List
<
java
.
util
.
Map
<
String
,
String
>>
selectInventoryTopTenByQuantity
();
public
void
batchUpdateInventory
(
List
<
Inventory
>
inventoryList
);
}
}
ruoyi-inventory/src/main/java/com/ruoyi/inventory/service/IInboundOrdersService.java
View file @
db0c0a3a
...
@@ -2,10 +2,9 @@ package com.ruoyi.inventory.service;
...
@@ -2,10 +2,9 @@ package com.ruoyi.inventory.service;
import
java.util.List
;
import
java.util.List
;
import
com.ruoyi.inventory.domain.InboundOrderItems
;
import
com.ruoyi.inventory.domain.InboundOrders
;
import
com.ruoyi.inventory.domain.InboundOrders
;
import
com.ruoyi.inventory.domain.vo.InboundMaterialTotalVO
;
import
com.ruoyi.inventory.domain.vo.InboundMaterialTotalVO
;
import
com.ruoyi.inventory.domain.vo.InboundTemplateVO
;
/**
/**
* 入库单主Service接口
* 入库单主Service接口
...
@@ -69,7 +68,7 @@ public interface IInboundOrdersService
...
@@ -69,7 +68,7 @@ public interface IInboundOrdersService
* @param inboundOrders,isUpdateSupport,operName 入库单数据信息
* @param inboundOrders,isUpdateSupport,operName 入库单数据信息
* @return 结果
* @return 结果
*/
*/
public
String
importInboundOrders
(
List
<
InboundTemplateVO
>
inboundOrders
,
Integer
isUpdateSupport
,
String
operName
,
Integer
orderType
);
public
<
T
>
String
importInboundOrders
(
List
<
T
>
inboundOrders
,
Integer
isUpdateSupport
,
String
operName
,
Integer
orderType
);
/**
/**
...
...
ruoyi-inventory/src/main/java/com/ruoyi/inventory/service/IOutboundOrderItemsService.java
View file @
db0c0a3a
...
@@ -2,10 +2,7 @@ package com.ruoyi.inventory.service;
...
@@ -2,10 +2,7 @@ package com.ruoyi.inventory.service;
import
java.util.List
;
import
java.util.List
;
import
com.ruoyi.inventory.domain.OutboundOrderItems
;
import
com.ruoyi.inventory.domain.OutboundOrderItems
;
import
com.ruoyi.inventory.domain.vo.InboundTemplateVO
;
import
com.ruoyi.inventory.domain.vo.OutboundOrdersSummaryVO
;
import
com.ruoyi.inventory.domain.vo.OutboundOrdersSummaryVO
;
import
com.ruoyi.inventory.domain.vo.OutboundTemplateVO
;
import
org.springframework.transaction.annotation.Transactional
;
/**
/**
* 出库单明细Service接口
* 出库单明细Service接口
...
...
ruoyi-inventory/src/main/java/com/ruoyi/inventory/service/impl/InboundOrdersServiceImpl.java
View file @
db0c0a3a
差异被折叠。
点击展开。
ruoyi-inventory/src/main/java/com/ruoyi/inventory/service/impl/InventoryServiceImpl.java
View file @
db0c0a3a
...
@@ -159,14 +159,16 @@ public class InventoryServiceImpl implements IInventoryService
...
@@ -159,14 +159,16 @@ public class InventoryServiceImpl implements IInventoryService
// 库存操作表插入数据
// 库存操作表插入数据
InventoryTransactions
transactions
=
new
InventoryTransactions
();
InventoryTransactions
transactions
=
new
InventoryTransactions
();
transactions
.
setId
(
IdUtils
.
simpleUUID
());
transactions
.
setId
(
IdUtils
.
simpleUUID
());
transactions
.
setTransactionType
(
2L
);
// 事务类型-盘点
transactions
.
setTransactionType
(
2L
);
// 事务类型-出库
transactions
.
setBatchCode
(
outboundOrderItem
.
getBatchCode
());
transactions
.
setUnitPrice
(
String
.
valueOf
(
outboundOrderItem
.
getUnitPrice
()));
transactions
.
setInventoryId
(
inventory
.
getId
());
// 库存表Id
transactions
.
setInventoryId
(
inventory
.
getId
());
// 库存表Id
transactions
.
setReferenceId
(
outboundOrderItem
.
getOutboundOrderId
());
//关联单号,相当于主记录-盘点主表
transactions
.
setReferenceId
(
outboundOrderItem
.
getOutboundOrderId
());
//关联单号,相当于主记录-盘点主表
transactions
.
setReferenceItemId
(
outboundOrderItem
.
getId
());
// 盘点子表id
transactions
.
setReferenceItemId
(
outboundOrderItem
.
getId
());
// 盘点子表id
transactions
.
setMaterialId
(
outboundOrderItem
.
getMaterialId
());
transactions
.
setMaterialId
(
outboundOrderItem
.
getMaterialId
());
transactions
.
setWarehouseId
(
outboundOrderItem
.
getWarehouseId
());
transactions
.
setWarehouseId
(
outboundOrderItem
.
getWarehouseId
());
transactions
.
setLocationId
(
outboundOrderItem
.
getLocationId
());
transactions
.
setLocationId
(
outboundOrderItem
.
getLocationId
());
OutboundOrders
outboundOrders
=
outboundOrderMapper
.
selectOutboundOrdersById
(
outboundOrderItem
.
get
Warehouse
Id
());
OutboundOrders
outboundOrders
=
outboundOrderMapper
.
selectOutboundOrdersById
(
outboundOrderItem
.
get
OutboundOrder
Id
());
transactions
.
setOwnerId
(
outboundOrders
.
getOwnerId
());
transactions
.
setOwnerId
(
outboundOrders
.
getOwnerId
());
transactions
.
setQuantityBefore
(
Long
.
valueOf
(
quantity
));
// 变更前数量
transactions
.
setQuantityBefore
(
Long
.
valueOf
(
quantity
));
// 变更前数量
transactions
.
setQuantityAfter
(
inventory
.
getQuantity
());
// 变更后数量
transactions
.
setQuantityAfter
(
inventory
.
getQuantity
());
// 变更后数量
...
@@ -175,10 +177,7 @@ public class InventoryServiceImpl implements IInventoryService
...
@@ -175,10 +177,7 @@ public class InventoryServiceImpl implements IInventoryService
transactions
.
setTransactionTime
(
nowDate
);
transactions
.
setTransactionTime
(
nowDate
);
transactions
.
setOperatedBy
(
SystemUtils
.
getUserName
());
transactions
.
setOperatedBy
(
SystemUtils
.
getUserName
());
int
inventoryTransactions
=
insertInventoryTransactions
.
insertInventoryTransactions
(
transactions
);
insertInventoryTransactions
.
insertInventoryTransactions
(
transactions
);
if
(
inventoryTransactions
<
0
)
{
return
-
1
;
}
}
}
RefreshInventory
(
inventoryIds
);
RefreshInventory
(
inventoryIds
);
}
}
...
...
ruoyi-inventory/src/main/java/com/ruoyi/inventory/service/impl/OutboundOrderItemsServiceImpl.java
View file @
db0c0a3a
...
@@ -11,7 +11,7 @@ import com.ruoyi.common.utils.StringUtils;
...
@@ -11,7 +11,7 @@ import com.ruoyi.common.utils.StringUtils;
import
com.ruoyi.common.utils.bean.BeanUtils
;
import
com.ruoyi.common.utils.bean.BeanUtils
;
import
com.ruoyi.inventory.domain.InboundOrderItems
;
import
com.ruoyi.inventory.domain.InboundOrderItems
;
import
com.ruoyi.inventory.domain.InboundOrders
;
import
com.ruoyi.inventory.domain.InboundOrders
;
import
com.ruoyi.inventory.domain.vo.InboundTemplateVO
;
import
com.ruoyi.inventory.domain.vo.
inboundVO.
InboundTemplateVO
;
import
com.ruoyi.inventory.domain.vo.OutboundOrdersSummaryVO
;
import
com.ruoyi.inventory.domain.vo.OutboundOrdersSummaryVO
;
import
com.ruoyi.inventory.domain.vo.OutboundTemplateVO
;
import
com.ruoyi.inventory.domain.vo.OutboundTemplateVO
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
ruoyi-inventory/src/main/java/com/ruoyi/inventory/service/impl/OutboundOrdersServiceImpl.java
View file @
db0c0a3a
差异被折叠。
点击展开。
ruoyi-inventory/src/main/java/com/ruoyi/inventory/service/impl/StorageLocationsServiceImpl.java
View file @
db0c0a3a
...
@@ -5,6 +5,7 @@ import java.util.Date;
...
@@ -5,6 +5,7 @@ import java.util.Date;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
com.ruoyi.common.config.WarehouseConfig
;
import
com.ruoyi.common.core.domain.entity.Materials
;
import
com.ruoyi.common.core.domain.entity.Materials
;
import
com.ruoyi.common.exception.ServiceException
;
import
com.ruoyi.common.exception.ServiceException
;
import
com.ruoyi.common.utils.DateUtils
;
import
com.ruoyi.common.utils.DateUtils
;
...
@@ -50,8 +51,10 @@ public class StorageLocationsServiceImpl implements IStorageLocationsService
...
@@ -50,8 +51,10 @@ public class StorageLocationsServiceImpl implements IStorageLocationsService
public
StorageLocations
selectStorageLocationsById
(
String
id
)
public
StorageLocations
selectStorageLocationsById
(
String
id
)
{
{
StorageLocations
storageLocations
=
storageLocationsMapper
.
selectStorageLocationsById
(
id
);
StorageLocations
storageLocations
=
storageLocationsMapper
.
selectStorageLocationsById
(
id
);
String
[]
AllowedCategoryIds
=
storageLocations
.
getAllowedCategoryIds
().
split
(
","
);
String
AllowedCategoryName
=
""
;
String
AllowedCategoryName
=
""
;
if
(
storageLocations
.
getAllowedCategoryIds
()
!=
null
)
{
String
[]
AllowedCategoryIds
=
storageLocations
.
getAllowedCategoryIds
().
split
(
","
);
if
(
AllowedCategoryIds
!=
null
&&
AllowedCategoryIds
.
length
>
0
)
{
for
(
String
AllowedCategoryId
:
AllowedCategoryIds
)
{
for
(
String
AllowedCategoryId
:
AllowedCategoryIds
)
{
Materials
materials
=
materialsMapper
.
selectMaterialsById
(
AllowedCategoryId
);
Materials
materials
=
materialsMapper
.
selectMaterialsById
(
AllowedCategoryId
);
if
(
materials
!=
null
&&
materials
.
getMaterialName
()
!=
null
)
{
if
(
materials
!=
null
&&
materials
.
getMaterialName
()
!=
null
)
{
...
@@ -62,6 +65,8 @@ public class StorageLocationsServiceImpl implements IStorageLocationsService
...
@@ -62,6 +65,8 @@ public class StorageLocationsServiceImpl implements IStorageLocationsService
AllowedCategoryName
+=
categoryName
;
AllowedCategoryName
+=
categoryName
;
}
}
}
}
}
}
storageLocations
.
setAllowedCategoryNames
(
AllowedCategoryName
);
storageLocations
.
setAllowedCategoryNames
(
AllowedCategoryName
);
return
storageLocations
;
return
storageLocations
;
}
}
...
@@ -260,6 +265,7 @@ public class StorageLocationsServiceImpl implements IStorageLocationsService
...
@@ -260,6 +265,7 @@ public class StorageLocationsServiceImpl implements IStorageLocationsService
StorageLocations
storageLocations
=
new
StorageLocations
();
StorageLocations
storageLocations
=
new
StorageLocations
();
// 拷贝基础属性
// 拷贝基础属性
BeanUtils
.
copyProperties
(
templateVO
,
storageLocations
);
BeanUtils
.
copyProperties
(
templateVO
,
storageLocations
);
storageLocations
.
setLocationName
(
templateVO
.
getLocationCode
());
// 字段类型转换与赋值
// 字段类型转换与赋值
storageLocations
.
setId
(
UUID
.
randomUUID
().
toString
());
storageLocations
.
setId
(
UUID
.
randomUUID
().
toString
());
...
@@ -274,7 +280,8 @@ public class StorageLocationsServiceImpl implements IStorageLocationsService
...
@@ -274,7 +280,8 @@ public class StorageLocationsServiceImpl implements IStorageLocationsService
storageLocations
.
setCreateBy
(
operId
);
storageLocations
.
setCreateBy
(
operId
);
storageLocations
.
setCreateTime
(
now
);
storageLocations
.
setCreateTime
(
now
);
storageLocations
.
setCreateUserCode
(
operId
);
storageLocations
.
setCreateUserCode
(
operId
);
storageLocations
.
setWarehousesId
(
"572ba484-199c-45d9-9735-610928ed5c70"
);
storageLocations
.
setWarehousesCode
(
"固定仓库"
);
storageLocations
.
setWarehousesId
(
WarehouseConfig
.
DEFAULT_WAREHOUSE_ID
);
// 设置默认值
// 设置默认值
if
(
storageLocations
.
getIsUsed
()
==
null
)
{
if
(
storageLocations
.
getIsUsed
()
==
null
)
{
...
...
ruoyi-inventory/src/main/resources/mapper/inventory/InboundOrdersMapper.xml
View file @
db0c0a3a
...
@@ -231,8 +231,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -231,8 +231,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</foreach>
</insert>
</insert>
<!-- 统计入库次数-->
<!-- 统计入库次数-->
<select
id=
"countInboundOrders"
resultType=
"int"
parameterType=
"String"
>
<select
id=
"countInboundOrders"
resultType=
"int"
parameterType=
"String"
>
select count(id)
select count(id)
...
@@ -247,18 +245,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -247,18 +245,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
column=
"total_money"
property=
"totalMoney"
jdbcType=
"DECIMAL"
/>
<result
column=
"total_money"
property=
"totalMoney"
jdbcType=
"DECIMAL"
/>
</resultMap>
</resultMap>
<select
id=
"countInboundMaterialQuantity"
resultMap=
"InboundMaterialTotalResultMap"
parameterType=
"String"
>
<select
id=
"countInboundMaterialQuantity"
resultMap=
"InboundMaterialTotalResultMap"
parameterType=
"String"
>
select m.material_name,
SELECT t.material_name, t.total_quantity
FROM (
SELECT m.material_name,
COALESCE(SUM(ioi.actual_quantity), 0) as total_quantity
COALESCE(SUM(ioi.actual_quantity), 0) as total_quantity
from materials as m
FROM materials as m
left join inbound_order_items as ioi
LEFT JOIN inbound_order_items as ioi ON m.id = ioi.material_id
on m.id = ioi.material_id
LEFT JOIN inbound_orders as io ON io.id = ioi.inbound_order_id AND io.order_status = 2
left join inbound_orders as io
WHERE m.is_used = 1 AND m.is_active = 1
on io.id = ioi.inbound_order_id
GROUP BY m.id, m.material_name
and io.order_status = 2
ORDER BY total_quantity DESC
group by m.id, m.material_name
LIMIT 10
order by total_quantity desc
) t
ORDER BY t.total_quantity ASC;
</select>
</select>
<select
id=
"countInboundMaterialMoney"
resultMap=
"InboundMaterialTotalResultMap"
parameterType=
"String"
>
<select
id=
"countInboundMaterialMoney"
resultMap=
"InboundMaterialTotalResultMap"
parameterType=
"String"
>
select t.material_name,t.total_money
from(
select m.material_name,
select m.material_name,
COALESCE(sum(ioi.actual_quantity * ioi.unit_price), 0) as total_money
COALESCE(sum(ioi.actual_quantity * ioi.unit_price), 0) as total_money
from materials as m
from materials as m
...
@@ -267,7 +270,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -267,7 +270,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join inbound_orders as io
left join inbound_orders as io
on io.id = ioi.inbound_order_id
on io.id = ioi.inbound_order_id
and io.order_status = 2
and io.order_status = 2
group by m.id, m.material_name
where m.is_used = 1 and m.is_active = 1
group by m.id
order by total_money desc
order by total_money desc
limit 10
) t
order by total_money asc
</select>
</select>
</mapper>
</mapper>
\ No newline at end of file
ruoyi-inventory/src/main/resources/mapper/inventory/InventoryMapper.xml
View file @
db0c0a3a
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
<result
property=
"orderId"
column=
"order_id"
/>
<result
property=
"orderId"
column=
"order_id"
/>
<result
property=
"materialId"
column=
"material_id"
/>
<result
property=
"materialId"
column=
"material_id"
/>
<result
property=
"materialName"
column=
"material_name"
/>
<result
property=
"materialName"
column=
"material_name"
/>
<result
property=
"hazardId"
column=
"hazard_id"
/>
<result
property=
"batchId"
column=
"batch_id"
/>
<result
property=
"batchId"
column=
"batch_id"
/>
<result
property=
"warehousesCode"
column=
"warehouses_code"
/>
<result
property=
"warehousesCode"
column=
"warehouses_code"
/>
<result
property=
"warehousesName"
column=
"warehouses_name"
/>
<result
property=
"warehousesName"
column=
"warehouses_name"
/>
...
@@ -401,6 +402,7 @@
...
@@ -401,6 +402,7 @@
i.order_id,
i.order_id,
i.material_id,
i.material_id,
m.material_name,
m.material_name,
m.hazard_id,
i.batch_id,
i.batch_id,
i.location_id,
i.location_id,
sl.location_name,
sl.location_name,
...
@@ -563,6 +565,9 @@ and inventory_status = '1'
...
@@ -563,6 +565,9 @@ and inventory_status = '1'
and i.unit_price > 0
and i.unit_price > 0
and i.last_inbound_time >= DATE_FORMAT(CURDATE(), '%Y-%m-01')
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')
and i.last_inbound_time
<
DATE_FORMAT(DATE_ADD(CURDATE(), INTERVAL 1 MONTH), '%Y-%m-01')
where
m.is_used =1
and m.is_active =1
group by m.id, m.material_name
group by m.id, m.material_name
order by value desc, m.material_name asc
order by value desc, m.material_name asc
</select>
</select>
...
@@ -577,6 +582,9 @@ and inventory_status = '1'
...
@@ -577,6 +582,9 @@ and inventory_status = '1'
and i.is_used = 1
and i.is_used = 1
and i.last_inbound_time >= DATE_FORMAT(CURDATE(), '%Y-%m-01')
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')
and i.last_inbound_time
<
DATE_FORMAT(DATE_ADD(CURDATE(), INTERVAL 1 MONTH), '%Y-%m-01')
where
m.is_used =1
and m.is_active =1
group by m.id, m.material_name
group by m.id, m.material_name
order by value desc, m.material_name asc
order by value desc, m.material_name asc
</select>
</select>
...
...
ruoyi-inventory/src/main/resources/mapper/inventory/InventoryTransactionsMapper.xml
View file @
db0c0a3a
...
@@ -87,6 +87,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -87,6 +87,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"createUserCode != null"
>
create_user_code,
</if>
<if
test=
"createUserCode != null"
>
create_user_code,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"updateUserCode != null"
>
update_user_code,
</if>
<if
test=
"updateUserCode != null"
>
update_user_code,
</if>
<if
test=
"unitPrice != null"
>
unit_price,
</if>
</trim>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id},
</if>
<if
test=
"id != null"
>
#{id},
</if>
...
@@ -111,6 +112,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -111,6 +112,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"createUserCode != null"
>
#{createUserCode},
</if>
<if
test=
"createUserCode != null"
>
#{createUserCode},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
<if
test=
"updateUserCode != null"
>
#{updateUserCode},
</if>
<if
test=
"updateUserCode != null"
>
#{updateUserCode},
</if>
<if
test=
"unitPrice != null"
>
#{unitPrice},
</if>
</trim>
</trim>
</insert>
</insert>
...
...
ruoyi-inventory/src/main/resources/mapper/inventory/MaterialsMapper.xml
View file @
db0c0a3a
...
@@ -8,6 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -8,6 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
property=
"id"
column=
"id"
/>
<result
property=
"id"
column=
"id"
/>
<result
property=
"materialCode"
column=
"material_code"
/>
<result
property=
"materialCode"
column=
"material_code"
/>
<result
property=
"materialName"
column=
"material_name"
/>
<result
property=
"materialName"
column=
"material_name"
/>
<result
property=
"materialEname"
column=
"material_ename"
/>
<result
property=
"sapNo"
column=
"sap_no"
/>
<result
property=
"sapNo"
column=
"sap_no"
/>
<result
property=
"tsCode"
column=
"ts_code"
/>
<result
property=
"tsCode"
column=
"ts_code"
/>
<result
property=
"categoryCode"
column=
"category_code"
/>
<result
property=
"categoryCode"
column=
"category_code"
/>
...
@@ -36,7 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -36,7 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
</resultMap>
<sql
id=
"selectMaterialsVo"
>
<sql
id=
"selectMaterialsVo"
>
select id, material_code, material_name, sap_no, ts_code, category_code, hazard_id, specification, material_unit, unit_weight, package_weight, total_weight, volume, shelf_life_days, storage_temperature, special_requirements, is_batch_managed, is_serial_managed, min_stock_level, max_stock_level, is_used, is_active, risk_level, sort_no, create_time, create_user_code, update_time, update_user_code from materials
select id, material_code, material_name,
material_ename,
sap_no, ts_code, category_code, hazard_id, specification, material_unit, unit_weight, package_weight, total_weight, volume, shelf_life_days, storage_temperature, special_requirements, is_batch_managed, is_serial_managed, min_stock_level, max_stock_level, is_used, is_active, risk_level, sort_no, create_time, create_user_code, update_time, update_user_code from materials
</sql>
</sql>
<select
id=
"selectMaterialsList"
parameterType=
"Materials"
resultMap=
"MaterialsResult"
>
<select
id=
"selectMaterialsList"
parameterType=
"Materials"
resultMap=
"MaterialsResult"
>
...
@@ -101,6 +102,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -101,6 +102,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"id != null"
>
id,
</if>
<if
test=
"id != null"
>
id,
</if>
<if
test=
"materialCode != null"
>
material_code,
</if>
<if
test=
"materialCode != null"
>
material_code,
</if>
<if
test=
"materialName != null"
>
material_name,
</if>
<if
test=
"materialName != null"
>
material_name,
</if>
<if
test=
"materialEname != null"
>
material_ename,
</if>
<if
test=
"sapNo != null"
>
sap_no,
</if>
<if
test=
"sapNo != null"
>
sap_no,
</if>
<if
test=
"tsCode != null"
>
ts_code,
</if>
<if
test=
"tsCode != null"
>
ts_code,
</if>
<if
test=
"categoryCode != null"
>
category_code,
</if>
<if
test=
"categoryCode != null"
>
category_code,
</if>
...
@@ -131,6 +133,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -131,6 +133,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"id != null"
>
#{id},
</if>
<if
test=
"id != null"
>
#{id},
</if>
<if
test=
"materialCode != null"
>
#{materialCode},
</if>
<if
test=
"materialCode != null"
>
#{materialCode},
</if>
<if
test=
"materialName != null"
>
#{materialName},
</if>
<if
test=
"materialName != null"
>
#{materialName},
</if>
<if
test=
"materialEname != null"
>
#{materialEname},
</if>
<if
test=
"sapNo != null"
>
#{sapNo},
</if>
<if
test=
"sapNo != null"
>
#{sapNo},
</if>
<if
test=
"tsCode != null"
>
#{tsCode},
</if>
<if
test=
"tsCode != null"
>
#{tsCode},
</if>
<if
test=
"categoryCode != null"
>
#{categoryCode},
</if>
<if
test=
"categoryCode != null"
>
#{categoryCode},
</if>
...
@@ -164,6 +167,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -164,6 +167,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim
prefix=
"SET"
suffixOverrides=
","
>
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"materialCode != null"
>
material_code = #{materialCode},
</if>
<if
test=
"materialCode != null"
>
material_code = #{materialCode},
</if>
<if
test=
"materialName != null"
>
material_name = #{materialName},
</if>
<if
test=
"materialName != null"
>
material_name = #{materialName},
</if>
<if
test=
"materialEname != null"
>
material_ename = #{materialEname},
</if>
<if
test=
"sapNo != null"
>
sap_no = #{sapNo},
</if>
<if
test=
"sapNo != null"
>
sap_no = #{sapNo},
</if>
<if
test=
"tsCode != null"
>
ts_code = #{tsCode},
</if>
<if
test=
"tsCode != null"
>
ts_code = #{tsCode},
</if>
<if
test=
"categoryCode != null"
>
category_code = #{categoryCode},
</if>
<if
test=
"categoryCode != null"
>
category_code = #{categoryCode},
</if>
...
...
ruoyi-inventory/src/main/resources/mapper/inventory/OutboundOrdersMapper.xml
View file @
db0c0a3a
...
@@ -315,6 +315,9 @@
...
@@ -315,6 +315,9 @@
and ooi.is_used = 1
and ooi.is_used = 1
and ooi.shipped_at >= DATE_FORMAT(CURDATE(), '%Y-%m-01 00:00:00')
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')
and ooi.shipped_at
<
DATE_FORMAT(DATE_ADD(CURDATE(), INTERVAL 1 MONTH), '%Y-%m-01 00:00:00')
where
m.is_used =1
and m.is_active =1
group by m.id, m.material_name
group by m.id, m.material_name
order by value desc
order by value desc
limit 10;
limit 10;
...
@@ -330,6 +333,9 @@
...
@@ -330,6 +333,9 @@
and ooi.is_used = 1
and ooi.is_used = 1
and ooi.shipped_at >= DATE_FORMAT(CURDATE(), '%Y-%m-01 00:00:00')
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')
and ooi.shipped_at
<
DATE_FORMAT(DATE_ADD(CURDATE(), INTERVAL 1 MONTH), '%Y-%m-01 00:00:00')
where
m.is_used =1
and m.is_active =1
group by m.id, m.material_name
group by m.id, m.material_name
order by value desc
order by value desc
limit 10;
limit 10;
...
@@ -338,4 +344,15 @@
...
@@ -338,4 +344,15 @@
select count(*) from outbound_orders where is_used = 1 and order_status=2 and inbound_date
>
= DATE_FORMAT(CURDATE(), '%Y-%m-01')
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(DATE_ADD(CURDATE(), INTERVAL 1 MONTH), '%Y-%m-01')
</select>
</select>
<update
id=
"batchUpdateInventory"
>
<foreach
collection=
"list"
item=
"item"
separator=
";"
>
UPDATE inventory
SET quantity = #{item.quantity},
inventory_status = #{item.inventoryStatus},
update_by = #{item.updateBy},
update_time = #{item.updateTime}
WHERE id = #{item.id}
</foreach>
</update>
</mapper>
</mapper>
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论