Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wms_api
Project
Project
Details
Activity
Releases
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
高宇
wms_api
Commits
d018db35
Commit
d018db35
authored
Dec 13, 2024
by
罗林杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
845e0c71
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
7 deletions
+29
-7
WmsGoodsServiceImpl.java
...cisoft/bus/wmsgoods/service/impl/WmsGoodsServiceImpl.java
+8
-4
WmsGoodsApplyServiceImpl.java
.../wmsgoodsapply/service/impl/WmsGoodsApplyServiceImpl.java
+4
-2
WmsGoodsStockServiceImpl.java
.../wmsgoodsstock/service/impl/WmsGoodsStockServiceImpl.java
+2
-1
application-dev-conf.yml
src/main/resources/application-dev-conf.yml
+3
-0
CustInfoMapper.xml
src/main/resources/mapper/bus/custInfo/CustInfoMapper.xml
+6
-0
CustRechargeMapper.xml
.../resources/mapper/bus/custRecharge/CustRechargeMapper.xml
+6
-0
No files found.
src/main/java/org/rcisoft/bus/wmsgoods/service/impl/WmsGoodsServiceImpl.java
View file @
d018db35
...
...
@@ -56,8 +56,9 @@ public class WmsGoodsServiceImpl extends ServiceImpl<WmsGoodsRepository, WmsGood
// 批量插入
String
goodsCode
=
wmsGoods
.
getGoodsCode
();
String
[]
goodStr
=
goodsCode
.
split
(
":"
);
if
(
goodStr
.
length
<
2
)
if
(
goodStr
.
length
<
2
)
{
throw
new
CyServiceException
(
1001
,
"数据不合法"
);
}
String
[]
itemCode
=
goodStr
[
1
].
split
(
","
);
// 循环
for
(
int
i
=
0
;
i
<
itemCode
.
length
;
i
++)
{
...
...
@@ -245,8 +246,9 @@ public class WmsGoodsServiceImpl extends ServiceImpl<WmsGoodsRepository, WmsGood
@Override
public
WmsGoods
findByOss
(
int
id
)
{
WmsGoods
goods
=
baseMapper
.
selectById
(
id
);
if
(
goods
!=
null
)
if
(
goods
!=
null
)
{
goods
.
setOssInfoList
(
baseMapper
.
findOss
(
goods
));
}
return
goods
;
}
...
...
@@ -261,13 +263,15 @@ public class WmsGoodsServiceImpl extends ServiceImpl<WmsGoodsRepository, WmsGood
param
.
setActualGoodsCode
(
wmsGoods
.
getGoodsCode
());
// 1. 查询 goodsNumber
List
<
WmsGoods
>
result
=
baseMapper
.
queryWmsGoods
(
param
);
if
(
CollectionUtils
.
isEmpty
(
result
)
||
result
.
size
()
>
1
)
if
(
CollectionUtils
.
isEmpty
(
result
)
||
result
.
size
()
>
1
)
{
throw
new
CyServiceException
(
500
,
"商品不存在!"
);
}
WmsGoods
goods
=
result
.
get
(
0
);
// 2. 查询 kwh
WmsGoodsStock
wmsGoodsStock
=
wmsGoodsStockRepository
.
selectByIdOut
(
goods
.
getBusinessId
());
if
(
wmsGoodsStock
!=
null
)
if
(
wmsGoodsStock
!=
null
)
{
goods
.
setGoodsNumber
(
wmsGoodsStock
.
getGoodsNumber
());
}
return
goods
;
}
}
src/main/java/org/rcisoft/bus/wmsgoodsapply/service/impl/WmsGoodsApplyServiceImpl.java
View file @
d018db35
...
...
@@ -127,8 +127,9 @@ public class WmsGoodsApplyServiceImpl extends ServiceImpl<WmsGoodsApplyRepositor
// 3.2 库存满足 => 减库存,日志
// 4. 批量插入日志
// 1. 集合空 判断
if
(
CollectionUtil
.
isEmpty
(
addwmsGoodsApply
.
getBoxList
()))
if
(
CollectionUtil
.
isEmpty
(
addwmsGoodsApply
.
getBoxList
()))
{
throw
new
CyServiceException
(
1001
,
"入库商品为空!"
);
}
// 出库
WmsGoodsApply
wmsGoodsApplyOut
=
new
WmsGoodsApply
();
BeanUtils
.
copyProperties
(
addwmsGoodsApply
,
wmsGoodsApplyOut
);
...
...
@@ -146,8 +147,9 @@ public class WmsGoodsApplyServiceImpl extends ServiceImpl<WmsGoodsApplyRepositor
WmsGoodsStock
goodsStock
=
wmsGoodsStockRepository
.
selectById
(
box
.
getBusinessId
());
// 库存不存在
if
(
goodsStock
==
null
)
if
(
goodsStock
==
null
)
{
throw
new
CyServiceException
(
1001
,
"库存数量不足"
);
}
// 库存不足
if
(
box
.
getOutCounts
()
>
goodsStock
.
getGoodsCounts
())
{
throw
new
CyServiceException
(
1001
,
"库存数量不足"
);
...
...
src/main/java/org/rcisoft/bus/wmsgoodsstock/service/impl/WmsGoodsStockServiceImpl.java
View file @
d018db35
...
...
@@ -160,8 +160,9 @@ public class WmsGoodsStockServiceImpl extends ServiceImpl<WmsGoodsStockRepositor
stock
.
setActualGtGoodsCounts
(
0
);
// 1. 查询 goodsNumber
List
<
WmsGoodsStock
>
result
=
baseMapper
.
queryWmsGoodsStocks
(
stock
);
if
(
CollectionUtils
.
isEmpty
(
result
)
||
result
.
size
()
>
1
||
result
.
get
(
0
).
getGoodsCounts
()
<
1
)
if
(
CollectionUtils
.
isEmpty
(
result
)
||
result
.
size
()
>
1
||
result
.
get
(
0
).
getGoodsCounts
()
<
1
)
{
throw
new
CyServiceException
(
500
,
"商品不存在或库存不足!"
);
}
return
result
.
get
(
0
);
}
...
...
src/main/resources/application-dev-conf.yml
View file @
d018db35
...
...
@@ -174,3 +174,6 @@ logging:
level
:
root
:
info
com.alibaba.nacos
:
info
system
:
goods_h5
:
value
\ No newline at end of file
src/main/resources/mapper/bus/custInfo/CustInfoMapper.xml
View file @
d018db35
...
...
@@ -56,6 +56,9 @@
<if
test=
"entity.storeId !=null and entity.storeId != '' "
>
and store_id like concat('%',#{entity.storeId},'%')
</if>
<if
test=
"entity.createName !=null and entity.createName != '' "
>
and create_tb.name like concat('%',#{entity.createName},'%')
</if>
ORDER BY cio.business_id DESC
</select>
...
...
@@ -95,6 +98,9 @@
<if
test=
"entity.storeId !=null and entity.storeId != '' "
>
and store_id like concat('%',#{entity.storeId},'%')
</if>
<if
test=
"entity.createName !=null and entity.createName != '' "
>
and create_tb.name like concat('%',#{entity.createName},'%')
</if>
ORDER BY cio.business_id DESC
</select>
</mapper>
\ No newline at end of file
src/main/resources/mapper/bus/custRecharge/CustRechargeMapper.xml
View file @
d018db35
...
...
@@ -61,6 +61,9 @@
<if
test=
"entity.isRecharge !=null and entity.isRecharge != '' "
>
and is_recharge = #{entity.isRecharge}
</if>
<if
test=
"entity.createName !=null and entity.createName != '' "
>
and create_tb.name like concat('%',#{entity.createName},'%')
</if>
ORDER BY cre.business_id DESC
</select>
...
...
@@ -103,6 +106,9 @@
<if
test=
"entity.isRecharge !=null and entity.isRecharge != '' "
>
and is_recharge = #{entity.isRecharge}
</if>
<if
test=
"entity.createName !=null and entity.createName != '' "
>
and create_tb.name like concat('%',#{entity.createName},'%')
</if>
ORDER BY cre.business_id DESC
</select>
</mapper>
\ No newline at end of file
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