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
e309c2c4
Commit
e309c2c4
authored
Feb 24, 2023
by
胡懿
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
二维码findlist增加根据货品信息查询
parent
693f5f8a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
3 deletions
+24
-3
QrCode.java
...a/com/jeeplus/modules/warehouse/qrcode/entity/QrCode.java
+9
-0
QrCodeMapper.xml
...plus/modules/warehouse/qrcode/mapper/xml/QrCodeMapper.xml
+6
-3
QrCodeService.java
...eplus/modules/warehouse/qrcode/service/QrCodeService.java
+9
-0
No files found.
src/main/java/com/jeeplus/modules/warehouse/qrcode/entity/QrCode.java
View file @
e309c2c4
...
...
@@ -22,6 +22,7 @@ public class QrCode extends DataEntity<QrCode> {
private
String
code
;
// 物资编码
private
String
url
;
// 二维码存储路径
private
String
state
;
// 物资状态码 (0:未入库,1:已入库未入账,2:已入账未下账,3:下账)
private
List
<
String
>
modelList
;
// 查询时使用的属性
public
QrCode
()
{
super
();
...
...
@@ -66,4 +67,11 @@ public class QrCode extends DataEntity<QrCode> {
this
.
state
=
state
;
}
public
List
<
String
>
getModelList
()
{
return
modelList
;
}
public
void
setModelList
(
List
<
String
>
modelList
)
{
this
.
modelList
=
modelList
;
}
}
\ No newline at end of file
src/main/java/com/jeeplus/modules/warehouse/qrcode/mapper/xml/QrCodeMapper.xml
View file @
e309c2c4
...
...
@@ -52,16 +52,19 @@
<if
test=
"code != null and code != ''"
>
AND a.code like concat('%',#{code},'%')
</if>
<if
test=
"goodsInfo.goods.batchNum != null and goodsInfo.goods.batchNum != ''"
>
<if
test=
"goodsInfo
!= null and goodsInfo.goods != null and goodsInfo
.goods.batchNum != null and goodsInfo.goods.batchNum != ''"
>
AND g.batch_num = #{goodsInfo.goods.batchNum}
</if>
<if
test=
"goodsInfo.type.id != null and goodsInfo.type.id != ''"
>
<if
test=
"goodsInfo != null and goodsInfo.name != null and goodsInfo.name != ''"
>
AND gi.name like concat('%',#{goodsInfo.name},'%')
</if>
<if
test=
"goodsInfo != null and goodsInfo,type != null and goodsInfo.type.id != null and goodsInfo.type.id != ''"
>
AND gi.type_id = #{goodsInfo.type.id}
</if>
<if
test=
"state != null and state != ''"
>
AND a.state = #{state}
</if>
<if
test=
"goodsInfo.modelList != null and goodsInfo.modelList.size() != 0"
>
<if
test=
"goodsInfo
!= null and goodsInfo
.modelList != null and goodsInfo.modelList.size() != 0"
>
AND
<foreach
collection=
"goodsInfo.modelList"
item=
"model"
index=
"index"
separator=
" AND"
open=
"("
close=
")"
>
gi.model like concat('%',#{model},'%')
...
...
src/main/java/com/jeeplus/modules/warehouse/qrcode/service/QrCodeService.java
View file @
e309c2c4
...
...
@@ -5,6 +5,9 @@ package com.jeeplus.modules.warehouse.qrcode.service;
import
java.util.List
;
import
com.jeeplus.common.utils.StringUtils
;
import
com.jeeplus.modules.warehouse.goods.entity.GoodsInfo
;
import
com.jeeplus.modules.warehouse.ikanalyzer.IKSegmenter
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -31,6 +34,12 @@ public class QrCodeService extends CrudService<QrCodeMapper, QrCode> {
}
public
Page
<
QrCode
>
findPage
(
Page
<
QrCode
>
page
,
QrCode
qrCode
)
{
GoodsInfo
goodsInfo
=
qrCode
.
getGoodsInfo
();
if
(
null
!=
goodsInfo
)
{
if
(
StringUtils
.
isNotBlank
(
goodsInfo
.
getModel
()))
{
qrCode
.
setModelList
(
IKSegmenter
.
splitStr
(
goodsInfo
.
getModel
(),
false
));
}
}
return
super
.
findPage
(
page
,
qrCode
);
}
...
...
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