Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
maintain_service
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘帅
maintain_service
Commits
fb4938de
Commit
fb4938de
authored
Aug 05, 2025
by
刘帅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.优化
parent
0105a573
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
141 additions
and
68 deletions
+141
-68
ErpMaterialPicking.java
...java/com/maintain/business/domain/ErpMaterialPicking.java
+8
-0
ErpMaterialInventoryRecordBo.java
...tain/business/domain/bo/ErpMaterialInventoryRecordBo.java
+5
-0
ErpMaterialPickingBo.java
...com/maintain/business/domain/bo/ErpMaterialPickingBo.java
+11
-0
ErpMaterialPickingVo.java
...com/maintain/business/domain/vo/ErpMaterialPickingVo.java
+13
-0
ErpMaterialInventoryRecordServiceImpl.java
...s/service/impl/ErpMaterialInventoryRecordServiceImpl.java
+1
-0
ErpMaterialPickingServiceImpl.java
.../business/service/impl/ErpMaterialPickingServiceImpl.java
+12
-5
ErpMaterialInventoryRecordMapper.xml
...ain/resources/mapper/ErpMaterialInventoryRecordMapper.xml
+2
-1
index.vue
maintain-ui/src/views/business/materialPicking/index.vue
+40
-17
index1.vue
...-ui/src/views/business/settlementMaterial/info/index1.vue
+49
-45
No files found.
maintain-business/src/main/java/com/maintain/business/domain/ErpMaterialPicking.java
View file @
fb4938de
...
...
@@ -50,6 +50,14 @@ public class ErpMaterialPicking extends BaseEntity {
* 退料时间
*/
private
Date
returnTime
;
/**
* 供应商ID
*/
private
Long
vendorId
;
/**
* 供应商名称
*/
private
String
vendorName
;
/**
* 车辆ID
*/
...
...
maintain-business/src/main/java/com/maintain/business/domain/bo/ErpMaterialInventoryRecordBo.java
View file @
fb4938de
...
...
@@ -124,5 +124,10 @@ public class ErpMaterialInventoryRecordBo extends BaseEntity {
*/
private
Long
createDeptId
;
/**
* 库存数量
*/
private
BigDecimal
inventory
;
}
maintain-business/src/main/java/com/maintain/business/domain/bo/ErpMaterialPickingBo.java
View file @
fb4938de
...
...
@@ -59,6 +59,17 @@ public class ErpMaterialPickingBo extends BaseEntity {
*/
private
Date
returnTime
;
/**
* 供应商ID
*/
@NotNull
(
message
=
"供应商不能为空"
,
groups
=
{
AddGroup
.
class
,
EditGroup
.
class
})
private
Long
vendorId
;
/**
* 供应商名称
*/
private
String
vendorName
;
/**
* 车辆ID
*/
...
...
maintain-business/src/main/java/com/maintain/business/domain/vo/ErpMaterialPickingVo.java
View file @
fb4938de
...
...
@@ -4,8 +4,11 @@ import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.maintain.common.annotation.ExcelDictFormat
;
import
com.maintain.common.convert.ExcelDictConvert
;
import
com.maintain.common.core.validate.AddGroup
;
import
com.maintain.common.core.validate.EditGroup
;
import
lombok.Data
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Date
;
...
...
@@ -57,6 +60,16 @@ public class ErpMaterialPickingVo implements Serializable {
@ExcelProperty
(
value
=
"退料时间"
)
private
Date
returnTime
;
/**
* 供应商ID
*/
private
Long
vendorId
;
/**
* 供应商名称
*/
private
String
vendorName
;
/**
* 车辆ID
*/
...
...
maintain-business/src/main/java/com/maintain/business/service/impl/ErpMaterialInventoryRecordServiceImpl.java
View file @
fb4938de
...
...
@@ -90,6 +90,7 @@ public class ErpMaterialInventoryRecordServiceImpl implements IErpMaterialInvent
.
like
(
null
!=
bo
.
getVendorId
(),
"t.vendor_id"
,
bo
.
getVendorId
())
.
like
(
null
!=
bo
.
getWarehouseId
(),
"t.warehouse_id"
,
bo
.
getWarehouseId
())
.
in
(!
bo
.
getWarehouseIdList
().
isEmpty
(),
"t.warehouse_id"
,
bo
.
getWarehouseIdList
())
.
ge
(
null
!=
bo
.
getInventory
(),
"t.inventory"
,
bo
.
getInventory
())
.
orderByDesc
(
"t.create_time"
);
Page
<
ErpMaterialInventoryRecordVo
>
queryPageList
=
baseMapper
.
customQueryPageInventoryList
(
pageQuery
.
build
(),
query
);
return
TableDataInfo
.
build
(
queryPageList
);
...
...
maintain-business/src/main/java/com/maintain/business/service/impl/ErpMaterialPickingServiceImpl.java
View file @
fb4938de
...
...
@@ -54,6 +54,7 @@ public class ErpMaterialPickingServiceImpl implements IErpMaterialPickingService
private
final
ErpMaterialInventoryRecordMapper
materialInventoryRecordMapper
;
private
final
ErpWarehouseMapper
warehouseMapper
;
private
final
SysDeptMapper
deptMapper
;
private
final
ErpMaterialVendorMapper
vendorMapper
;
/**
* 查询报修单-领料出库单
...
...
@@ -66,8 +67,10 @@ public class ErpMaterialPickingServiceImpl implements IErpMaterialPickingService
List
<
ErpMaterialPickingInfoVo
>
infoVoList
=
pickingInfoMapper
.
selectVoList
(
lqw
);
if
(!
infoVoList
.
isEmpty
())
{
for
(
ErpMaterialPickingInfoVo
infoVo
:
infoVoList
)
{
ErpMaterialInventoryRecordVo
recordVo
=
materialInventoryRecordMapper
.
customQueryInventoryById
(
infoVo
.
getRecordId
());
infoVo
.
setInventory
(
recordVo
.
getInventory
());
if
(
infoVo
.
getRecordId
()
!=
null
)
{
ErpMaterialInventoryRecordVo
recordVo
=
materialInventoryRecordMapper
.
customQueryInventoryById
(
infoVo
.
getRecordId
());
infoVo
.
setInventory
(
recordVo
.
getInventory
());
}
}
materialVo
.
setPickingInfoList
(
infoVoList
);
}
...
...
@@ -95,10 +98,8 @@ public class ErpMaterialPickingServiceImpl implements IErpMaterialPickingService
LambdaQueryWrapper
<
ErpMaterialPicking
>
lqw
=
buildQueryWrapper
(
bo
);
Page
<
ErpMaterialPickingVo
>
result
=
baseMapper
.
selectVoPage
(
pageQuery
.
build
(),
lqw
);
// 查询出库明细列表
LambdaQueryWrapper
<
ErpMaterialPickingInfo
>
queryWrapper
=
Wrappers
.
lambdaQuery
();
for
(
ErpMaterialPickingVo
pickingVo
:
result
.
getRecords
())
{
queryWrapper
.
eq
(
ErpMaterialPickingInfo:
:
getPickingId
,
pickingVo
.
getId
());
List
<
ErpMaterialPickingInfoVo
>
infoVoList
=
pickingInfoMapper
.
selectVoList
(
queryWrapper
);
List
<
ErpMaterialPickingInfoVo
>
infoVoList
=
pickingInfoMapper
.
selectVoList
(
new
LambdaQueryWrapper
<>(
ErpMaterialPickingInfo
.
class
).
eq
(
ErpMaterialPickingInfo:
:
getPickingId
,
pickingVo
.
getId
()));
for
(
ErpMaterialPickingInfoVo
infoVo
:
infoVoList
)
{
LambdaQueryWrapper
<
ErpMaterialPutawayInfo
>
putawayInfoLambdaQueryWrapper
=
Wrappers
.
lambdaQuery
();
putawayInfoLambdaQueryWrapper
.
eq
(
ErpMaterialPutawayInfo:
:
getMaterialId
,
infoVo
.
getMaterialId
());
...
...
@@ -159,6 +160,9 @@ public class ErpMaterialPickingServiceImpl implements IErpMaterialPickingService
add
.
setReceiveUserId
(
LoginHelper
.
getUserId
());
add
.
setReceiveUserName
(
LoginHelper
.
getUsername
());
add
.
setReceiveTime
(
new
Date
());
ErpMaterialVendor
materialVendor
=
vendorMapper
.
selectById
(
bo
.
getVendorId
());
add
.
setVendorId
(
materialVendor
.
getId
());
add
.
setVendorName
(
materialVendor
.
getVendorName
());
BigDecimal
moneyTotal
=
bo
.
getMaterialList
().
stream
().
map
(
ErpMaterialPickingInfoAddBo:
:
getMoney
).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
);
add
.
setOutMoney
(
moneyTotal
);
add
.
setCreateDeptId
(
LoginHelper
.
getUserId
());
...
...
@@ -231,6 +235,9 @@ public class ErpMaterialPickingServiceImpl implements IErpMaterialPickingService
update
.
setRepairNumber
(
repairForm
.
getRepairNumber
());
update
.
setPlateNumber
(
erpCar
.
getPlateNumber
());
update
.
setOutMoney
(
moneyTotal
);
ErpMaterialVendor
materialVendor
=
vendorMapper
.
selectById
(
bo
.
getVendorId
());
update
.
setVendorId
(
materialVendor
.
getId
());
update
.
setVendorName
(
materialVendor
.
getVendorName
());
validEntityBeforeSave
(
update
);
boolean
flag
=
baseMapper
.
updateById
(
update
)
>
0
;
if
(
flag
)
{
...
...
maintain-business/src/main/resources/mapper/ErpMaterialInventoryRecordMapper.xml
View file @
fb4938de
...
...
@@ -191,8 +191,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
resultType=
"com.maintain.business.domain.vo.ErpMaterialInventoryRecordVo"
>
<include
refid=
"list"
/>
<where>
and t.type = 1
<if
test=
"id != null"
>
t.recordId = #{id}
and
t.recordId = #{id}
</if>
</where>
</select>
...
...
maintain-ui/src/views/business/materialPicking/index.vue
View file @
fb4938de
...
...
@@ -102,19 +102,20 @@
{{
scope
.
row
.
plateNumber
||
'
/
'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"出库金额"
align=
"center"
prop=
"outMoney"
>
<el-table-column
label=
"供应商"
align=
"center"
prop=
"vendorName"
width=
"200"
show-overflow-tooltip
/>
<el-table-column
label=
"出库金额"
align=
"center"
prop=
"outMoney"
width=
"80"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
outMoney
||
'
/
'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"领料人"
align=
"center"
prop=
"receiveUserName"
>
<el-table-column
label=
"领料人"
align=
"center"
prop=
"receiveUserName"
width=
"100"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
receiveUserName
||
'
/
'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"领料时间"
align=
"center"
prop=
"receiveTime"
width=
"180"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
receiveTime
?
parseTime
(
scope
.
row
.
receiveTime
,
'
{y
}
-{m
}
-{d
}
'
)
:
'
/
'
}}
<
/span
>
<span>
{{
scope
.
row
.
receiveTime
?
parseTime
(
scope
.
row
.
receiveTime
,
'
{y
}
-{m
}
-{d
}
{h
}
:{i
}
:{s
}
'
)
:
'
/
'
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"
状态
"
align
=
"
center
"
prop
=
"
state
"
>
...
...
@@ -129,7 +130,7 @@
<
/el-table-column
>
<
el
-
table
-
column
label
=
"
出库时间
"
align
=
"
center
"
prop
=
"
outTime
"
width
=
"
180
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
span
>
{{
parseTime
(
scope
.
row
.
outTime
,
'
{y
}
-{m
}
-{d
}
'
)
}}
<
/span
>
<
span
>
{{
parseTime
(
scope
.
row
.
outTime
,
'
{y
}
-{m
}
-{d
}
{h
}
:{i
}
:{s
}
'
)
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"
操作
"
align
=
"
center
"
width
=
"
200px
"
class
-
name
=
"
small-padding fixed-width
"
>
...
...
@@ -180,11 +181,6 @@
<
el
-
dialog
:
title
=
"
title
"
:
visible
.
sync
=
"
open
"
width
=
"
80%
"
append
-
to
-
body
>
<
el
-
form
ref
=
"
form
"
:
model
=
"
form
"
:
rules
=
"
rules
"
label
-
width
=
"
110px
"
>
<
el
-
row
>
<
el
-
col
:
span
=
"
6
"
>
<
el
-
form
-
item
label
=
"
出库单号
"
prop
=
"
outNumber
"
>
<
el
-
input
v
-
model
=
"
form.outNumber
"
disabled
placeholder
=
"
自动生成
"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"
6
"
>
<
el
-
form
-
item
label
=
"
出库时间
"
prop
=
"
outTime
"
>
<
el
-
date
-
picker
clearable
...
...
@@ -196,6 +192,11 @@
<
/el-date-picker
>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"
6
"
>
<
el
-
form
-
item
label
=
"
出库单号
"
prop
=
"
outNumber
"
>
<
el
-
input
v
-
model
=
"
form.outNumber
"
disabled
placeholder
=
"
自动生成
"
/>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"
6
"
>
<
el
-
form
-
item
label
=
"
出库金额
"
prop
=
"
outMoney
"
>
<
el
-
input
v
-
model
=
"
form.outMoney
"
disabled
/>
...
...
@@ -232,6 +233,13 @@
<
/el-col
>
<
/el-row
>
<
el
-
row
>
<
el
-
col
:
span
=
"
6
"
>
<
el
-
form
-
item
label
=
"
供应商
"
prop
=
"
vendorId
"
>
<
el
-
select
v
-
model
=
"
form.vendorId
"
placeHolder
=
"
请选择供应商
"
filterable
@
change
=
"
vendorIdChange
"
style
=
"
width: 100%
"
>
<
el
-
option
v
-
for
=
"
item in materialVendorOpt
"
:
key
=
"
item.id
"
:
value
=
"
item.id
"
:
label
=
"
item.vendorName
"
/>
<
/el-select
>
<
/el-form-item
>
<
/el-col
>
<
el
-
col
:
span
=
"
6
"
>
<
el
-
form
-
item
label
=
"
操作人
"
prop
=
"
createBy
"
>
<
el
-
input
v
-
model
=
"
form.createBy
"
placeholder
=
"
请输入操作人
"
disabled
/>
...
...
@@ -293,7 +301,7 @@
<
/el-dialog
>
<!--
物料列表对话框
-->
<
el
-
dialog
title
=
"
物料列表
"
:
visible
.
sync
=
"
open1
"
width
=
"
6
5%
"
append
-
to
-
body
>
<
el
-
dialog
title
=
"
物料列表
"
:
visible
.
sync
=
"
open1
"
width
=
"
7
5%
"
append
-
to
-
body
>
<
el
-
form
:
model
=
"
queryMaterialParams
"
ref
=
"
queryMaterialForm
"
size
=
"
small
"
:
inline
=
"
true
"
v
-
show
=
"
showSearch
"
label
-
width
=
"
80px
"
>
<!--
<
el
-
form
-
item
label
=
"
仓库
"
prop
=
"
warehouseId
"
>-->
<!--
<
el
-
select
v
-
model
=
"
queryMaterialParams.warehouseId
"
placeHolder
=
"
请选择仓库
"
>-->
...
...
@@ -301,7 +309,7 @@
<!--
<
/el-select>--
>
<!--
<
/el-form-item>--
>
<
el
-
form
-
item
label
=
"
供应商
"
prop
=
"
vendorId
"
>
<
el
-
select
v
-
model
=
"
queryMaterialParams.vendorId
"
filterable
placeholder
=
"
请选择供应商
"
style
=
"
width: 100%
"
>
<
el
-
select
v
-
model
=
"
queryMaterialParams.vendorId
"
filterable
disabled
placeholder
=
"
请选择供应商
"
style
=
"
width: 100%
"
>
<
el
-
option
v
-
for
=
"
item in materialVendorOpt
"
:
key
=
"
item.id
"
:
value
=
"
item.id
"
:
label
=
"
item.vendorName
"
/>
<
/el-select
>
<
/el-form-item
>
...
...
@@ -335,15 +343,15 @@
<
el
-
table
-
column
label
=
"
物资编码
"
align
=
"
center
"
prop
=
"
materialCode
"
/>
<
el
-
table
-
column
label
=
"
物资名称
"
align
=
"
center
"
prop
=
"
materialName
"
/>
<
el
-
table
-
column
label
=
"
物资规格
"
align
=
"
center
"
prop
=
"
materialSpecifications
"
/>
<
el
-
table
-
column
label
=
"
物资单位
"
align
=
"
center
"
prop
=
"
materialUnit
"
>
<
el
-
table
-
column
label
=
"
物资单位
"
align
=
"
center
"
prop
=
"
materialUnit
"
width
=
"
80
"
>
<
template
slot
-
scope
=
"
scope
"
>
<
dict
-
tag
:
options
=
"
dict.type.material_unit
"
:
value
=
"
scope.row.materialUnit
"
/>
<
/template
>
<
/el-table-column
>
<!--
<
el
-
table
-
column
label
=
"
质保期
"
align
=
"
center
"
prop
=
"
materialWarrantyPeriod
"
/>-->
<
el
-
table
-
column
label
=
"
参考价
"
align
=
"
center
"
prop
=
"
referencePrice
"
/>
<
el
-
table
-
column
label
=
"
销售价
"
align
=
"
center
"
prop
=
"
sellingPrice
"
/>
<
el
-
table
-
column
label
=
"
库存
"
align
=
"
center
"
prop
=
"
inventory
"
/>
<
el
-
table
-
column
label
=
"
参考价
"
align
=
"
center
"
prop
=
"
referencePrice
"
width
=
"
100
"
/>
<
el
-
table
-
column
label
=
"
销售价
"
align
=
"
center
"
prop
=
"
sellingPrice
"
width
=
"
100
"
/>
<
el
-
table
-
column
label
=
"
库存
"
align
=
"
center
"
prop
=
"
inventory
"
width
=
"
100
"
/>
<
/el-table
>
<
pagination
v
-
show
=
"
materialTotal>0
"
:
total
=
"
materialTotal
"
:
page
.
sync
=
"
queryMaterialParams.pageNum
"
:
limit
.
sync
=
"
queryMaterialParams.pageSize
"
@
pagination
=
"
getMaterialList
"
/>
<
div
slot
=
"
footer
"
class
=
"
dialog-footer
"
>
...
...
@@ -357,14 +365,15 @@
<
span
style
=
"
font-weight: bold; font-size: 18px
"
>
出库信息
<
/span
>
<
el
-
divider
/>
<
el
-
descriptions
border
:
column
=
"
3
"
>
<
el
-
descriptions
-
item
label
=
"
出库单号
"
>
{{
form
.
outNumber
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
label
=
"
出库时间
"
>
{{
form
.
outTime
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
label
=
"
出库单号
"
>
{{
form
.
outNumber
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
label
=
"
出库金额
"
>
{{
form
.
outMoney
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
label
=
"
客户名称
"
>
{{
form
.
clientName
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
label
=
"
报修单
"
>
{{
form
.
repairNumber
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
label
=
"
车牌号
"
>
{{
form
.
plateNumber
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
label
=
"
部门
"
>
{{
form
.
repairerDeptName
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
label
=
"
班组
"
>
{{
form
.
repairerGroupName
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
label
=
"
供应商
"
>
{{
form
.
vendorName
}}
<
/el-descriptions-item
>
<
el
-
descriptions
-
item
label
=
"
状态
"
>
<
dict
-
tag
:
options
=
"
dict.type.picking_state
"
:
value
=
"
form.state
"
/>
<
/el-descriptions-item
>
...
...
@@ -494,6 +503,9 @@ export default {
outTime
:
[
{
required
:
true
,
message
:
"
出库时间不能为空
"
,
trigger
:
"
blur
"
}
],
vendorId
:
[
{
required
:
true
,
message
:
"
供应商不能为空
"
,
trigger
:
"
blur
"
}
],
}
}
;
}
,
...
...
@@ -546,14 +558,22 @@ export default {
}
,
/** 打开物料列表 */
openMaterialModel
()
{
this
.
getVendorList
();
if
(
!
this
.
form
.
repairerDeptId
)
{
this
.
$modal
.
msgError
(
"
请先选择报修单
"
);
return
}
if
(
!
this
.
form
.
vendorId
)
{
this
.
$modal
.
msgError
(
"
请先选择供应商
"
);
return
}
this
.
open1
=
true
this
.
getMaterialList
()
}
,
/** 供应商改变 */
vendorIdChange
(
vendorId
)
{
this
.
queryMaterialParams
.
vendorId
=
vendorId
;
this
.
form
.
pickingInfoList
=
[]
}
,
/** 搜索按钮操作 */
handleMaterialQuery
()
{
this
.
queryMaterialParams
.
pageNum
=
1
;
...
...
@@ -634,6 +654,8 @@ export default {
returnNumber
:
undefined
,
carId
:
undefined
,
plateNumber
:
undefined
,
vendorId
:
undefined
,
vendorName
:
undefined
,
outMoney
:
undefined
,
receiveUserId
:
undefined
,
receiveUserName
:
undefined
,
...
...
@@ -679,6 +701,7 @@ export default {
this
.
open
=
true
;
this
.
title
=
"
添加物料出库
"
;
this
.
getRepairList
()
this
.
getVendorList
()
}
,
// 详情按钮
handleDetail
(
row
)
{
...
...
maintain-ui/src/views/business/settlementMaterial/info/index1.vue
View file @
fb4938de
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment