Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
warehouse
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
胡懿
warehouse
Commits
6b5c96bc
Commit
6b5c96bc
authored
Jul 17, 2023
by
胡懿
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
品名代码增加单价和单位
parent
714ae25c
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
13 deletions
+36
-13
GoodsInfo.java
...com/jeeplus/modules/warehouse/goods/entity/GoodsInfo.java
+10
-0
GoodsInfoMapper.xml
...us/modules/warehouse/goods/mapper/xml/GoodsInfoMapper.xml
+4
-0
MaterialTypeMapper.xml
.../warehouse/materialtype/mapper/xml/MaterialTypeMapper.xml
+9
-3
StorageInfo.java
...jeeplus/modules/warehouse/storage/entity/StorageInfo.java
+10
-0
StorageService.java
...lus/modules/warehouse/storage/service/StorageService.java
+3
-10
No files found.
src/main/java/com/jeeplus/modules/warehouse/goods/entity/GoodsInfo.java
View file @
6b5c96bc
...
@@ -28,6 +28,7 @@ public class GoodsInfo extends DataEntity<GoodsInfo> {
...
@@ -28,6 +28,7 @@ public class GoodsInfo extends DataEntity<GoodsInfo> {
private
Goods
goods
;
// 主表ID 父类
private
Goods
goods
;
// 主表ID 父类
private
String
qrInterval
;
// 物资编码区间
private
String
qrInterval
;
// 物资编码区间
private
BigDecimal
amount
;
// 单价
private
BigDecimal
amount
;
// 单价
public
BigDecimal
infoSum
;
// 总价
private
QrCode
qrCode
;
// 二维码(xml中无关联查询)
private
QrCode
qrCode
;
// 二维码(xml中无关联查询)
private
List
<
String
>
modelList
;
// 查询时使用的属性
private
List
<
String
>
modelList
;
// 查询时使用的属性
...
@@ -119,4 +120,12 @@ public class GoodsInfo extends DataEntity<GoodsInfo> {
...
@@ -119,4 +120,12 @@ public class GoodsInfo extends DataEntity<GoodsInfo> {
public
void
setModelList
(
List
<
String
>
modelList
)
{
public
void
setModelList
(
List
<
String
>
modelList
)
{
this
.
modelList
=
modelList
;
this
.
modelList
=
modelList
;
}
}
public
BigDecimal
getInfoSum
()
{
return
infoSum
;
}
public
void
setInfoSum
(
BigDecimal
infoSum
)
{
this
.
infoSum
=
infoSum
;
}
}
}
\ No newline at end of file
src/main/java/com/jeeplus/modules/warehouse/goods/mapper/xml/GoodsInfoMapper.xml
View file @
6b5c96bc
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
a.num AS "num",
a.num AS "num",
a.remarks AS "remarks",
a.remarks AS "remarks",
a.amount as "amount",
a.amount as "amount",
a.info_sum as "infoSum",
a.qr_interval AS "qrInterval",
a.qr_interval AS "qrInterval",
a.goods_id AS "goods.id",
a.goods_id AS "goods.id",
a.create_by AS "createBy.id",
a.create_by AS "createBy.id",
...
@@ -101,6 +102,7 @@
...
@@ -101,6 +102,7 @@
num,
num,
remarks,
remarks,
amount,
amount,
info_sum,
qr_interval,
qr_interval,
goods_id,
goods_id,
create_by,
create_by,
...
@@ -116,6 +118,7 @@
...
@@ -116,6 +118,7 @@
#{num},
#{num},
#{remarks},
#{remarks},
#{amount},
#{amount},
#{infoSum},
#{qrInterval},
#{qrInterval},
#{goods.id},
#{goods.id},
#{createBy.id},
#{createBy.id},
...
@@ -134,6 +137,7 @@
...
@@ -134,6 +137,7 @@
num = #{num},
num = #{num},
remarks = #{remarks},
remarks = #{remarks},
amount = #{amount},
amount = #{amount},
info_sum = #{infoSum},
qr_interval = #{qrInterval},
qr_interval = #{qrInterval},
goods_id = #{goods.id},
goods_id = #{goods.id},
update_by = #{updateBy.id},
update_by = #{updateBy.id},
...
...
src/main/java/com/jeeplus/modules/warehouse/materialtype/mapper/xml/MaterialTypeMapper.xml
View file @
6b5c96bc
...
@@ -121,7 +121,9 @@
...
@@ -121,7 +121,9 @@
name,
name,
sort,
sort,
code,
code,
last
last,
amount,
unit
) VALUES (
) VALUES (
#{id},
#{id},
#{createBy.id},
#{createBy.id},
...
@@ -135,7 +137,9 @@
...
@@ -135,7 +137,9 @@
#{name},
#{name},
#{sort},
#{sort},
#{code},
#{code},
#{last}
#{last},
#{amount},
#{unit}
)
)
</insert>
</insert>
...
@@ -149,7 +153,9 @@
...
@@ -149,7 +153,9 @@
name = #{name},
name = #{name},
sort = #{sort},
sort = #{sort},
code = #{code},
code = #{code},
last = #{last}
last = #{last},
amount = #{amount},
unit = #{unit}
WHERE id = #{id}
WHERE id = #{id}
</update>
</update>
...
...
src/main/java/com/jeeplus/modules/warehouse/storage/entity/StorageInfo.java
View file @
6b5c96bc
...
@@ -32,6 +32,7 @@ public class StorageInfo extends DataEntity<StorageInfo> {
...
@@ -32,6 +32,7 @@ public class StorageInfo extends DataEntity<StorageInfo> {
private
String
warehouseIds
;
// 仓库id集合
private
String
warehouseIds
;
// 仓库id集合
private
BigDecimal
amount
;
// 单价
private
BigDecimal
amount
;
// 单价
private
int
num
;
// 数量
private
int
num
;
// 数量
private
BigDecimal
infoSum
;
// 总价
private
List
<
Shelves
>
shelvesList
;
// 货架id
private
List
<
Shelves
>
shelvesList
;
// 货架id
private
List
<
Warehouse
>
warehouseList
;
// 仓库外键
private
List
<
Warehouse
>
warehouseList
;
// 仓库外键
...
@@ -150,4 +151,12 @@ public class StorageInfo extends DataEntity<StorageInfo> {
...
@@ -150,4 +151,12 @@ public class StorageInfo extends DataEntity<StorageInfo> {
public
void
setWarehouseList
(
List
<
Warehouse
>
warehouseList
)
{
public
void
setWarehouseList
(
List
<
Warehouse
>
warehouseList
)
{
this
.
warehouseList
=
warehouseList
;
this
.
warehouseList
=
warehouseList
;
}
}
public
BigDecimal
getInfoSum
()
{
return
infoSum
;
}
public
void
setInfoSum
(
BigDecimal
infoSum
)
{
this
.
infoSum
=
infoSum
;
}
}
}
\ No newline at end of file
src/main/java/com/jeeplus/modules/warehouse/storage/service/StorageService.java
View file @
6b5c96bc
...
@@ -94,15 +94,8 @@ public class StorageService extends CrudService<StorageMapper, Storage> {
...
@@ -94,15 +94,8 @@ public class StorageService extends CrudService<StorageMapper, Storage> {
storageInfoMapper
.
insert
(
storageInfo
);
storageInfoMapper
.
insert
(
storageInfo
);
// 计算需要变更的总价格
// 计算需要变更的总价格
money
=
money
.
subtract
(
goodsInfo
.
getAmount
());
money
=
money
.
subtract
(
goodsInfo
.
getInfoSum
());
// 计算货品明细中的需要变更的数量
Integer
count
=
map
.
get
(
goodsInfo
.
getId
());
if
(
null
==
count
)
{
count
=
-
1
;
}
else
{
count
--;
}
map
.
put
(
goodsInfo
.
getId
(),
count
);
// 更改二维码状态为已入库
// 更改二维码状态为已入库
QrCode
qrCode
=
qrCodeMapper
.
get
(
storageInfo
.
getQrCode
().
getId
());
QrCode
qrCode
=
qrCodeMapper
.
get
(
storageInfo
.
getQrCode
().
getId
());
...
@@ -115,7 +108,7 @@ public class StorageService extends CrudService<StorageMapper, Storage> {
...
@@ -115,7 +108,7 @@ public class StorageService extends CrudService<StorageMapper, Storage> {
}
}
}
else
{
}
else
{
storageInfoMapper
.
delete
(
storageInfo
);
storageInfoMapper
.
delete
(
storageInfo
);
money
=
money
.
add
(
goodsInfo
.
getAmount
());
money
=
money
.
add
(
goodsInfo
.
getAmount
()
.
multiply
(
new
BigDecimal
(
goodsInfo
.
getNum
()))
);
// 计算货品明细中的需要变更的数量
// 计算货品明细中的需要变更的数量
Integer
count
=
map
.
get
(
goodsInfo
.
getId
());
Integer
count
=
map
.
get
(
goodsInfo
.
getId
());
if
(
null
==
count
)
{
if
(
null
==
count
)
{
...
...
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