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
95997a0d
Commit
95997a0d
authored
Feb 21, 2023
by
zhanglt
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.yqdchina.com/huyi/warehouse
into zlt
parents
667689a8
e1c2204f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
22 deletions
+20
-22
GoodsService.java
...jeeplus/modules/warehouse/goods/service/GoodsService.java
+8
-3
IKSegmenterTest.java
...jeeplus/modules/warehouse/ikanalyzer/IKSegmenterTest.java
+1
-1
StorageService.java
...lus/modules/warehouse/storage/service/StorageService.java
+4
-2
StorageController.java
...plus/modules/warehouse/storage/web/StorageController.java
+7
-16
No files found.
src/main/java/com/jeeplus/modules/warehouse/goods/service/GoodsService.java
View file @
95997a0d
...
...
@@ -128,7 +128,6 @@ public class GoodsService extends CrudService<GoodsMapper, Goods> {
qrCode
.
setGoodsInfo
(
goodsInfo
);
qrCode
.
setState
(
"0"
);
qrCode
.
setGoodsInfo
(
goodsInfo
);
qrCode
.
preInsert
();
try
{
BuildQcUtil
.
buildQr
(
qrCode
,
qrImgPath
+
"/"
+
numSeq
+
".png"
,
qrImgPath
+
"/"
+
numSeq
+
"_"
+
i
+
".png"
);
// 生成图片
...
...
@@ -138,6 +137,7 @@ public class GoodsService extends CrudService<GoodsMapper, Goods> {
qrCode
.
setUrl
(
Global
.
getAttachmentUrl
()
+
"image/"
+
numSeq
+
"_"
+
i
+
".png"
);
qrCodeMapper
.
insert
(
qrCode
);
qrCode
=
qrCodeMapper
.
get
(
qrCode
.
getId
());
qrCodeList
.
add
(
qrCode
);
}
...
...
@@ -148,7 +148,7 @@ public class GoodsService extends CrudService<GoodsMapper, Goods> {
qrInterval
=
beginNumSeq
+
"_"
+
endNumSeq
.
substring
(
13
,
17
);
}
goodsInfo
.
setQrInterval
(
qrInterval
);
// 设置编码区间
goodsInfo
.
preUpdate
();
//
goodsInfo.preUpdate();
goodsInfoMapper
.
update
(
goodsInfo
);
goodsInfo
.
setQrCodeList
(
qrCodeList
);
return
goodsInfo
;
...
...
@@ -174,7 +174,12 @@ public class GoodsService extends CrudService<GoodsMapper, Goods> {
String
url
=
qrCode
.
getUrl
();
if
(
null
!=
url
&&
url
.
contains
(
"image"
))
{
String
photo
=
url
.
split
(
"image/"
)[
1
];
FileUtil
.
deleteFile
(
new
File
(
Global
.
getAttachmentDir
()
+
"image/"
+
photo
));
File
file
=
new
File
(
Global
.
getAttachmentDir
()
+
"image/"
+
photo
);
if
(
file
.
exists
())
{
FileUtil
.
deleteFile
(
new
File
(
Global
.
getAttachmentDir
()
+
"image/"
+
photo
));
}
else
{
logger
.
info
(
"二维码路径不存在,执行删除"
);
}
}
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
...
...
src/main/java/com/jeeplus/modules/warehouse/ikanalyzer/IKSegmenterTest.java
View file @
95997a0d
...
...
@@ -50,7 +50,7 @@ public class IKSegmenterTest {
return
strs
;
}
public
static
void
main
(
String
[]
args
)
{
String
text
=
"185的绿
色
军鞋15双"
;
String
text
=
"185的绿军鞋15双"
;
System
.
out
.
println
(
"使用智能分词结果:"
+
splitStr
(
text
,
true
));
System
.
out
.
println
(
"最细粒度分词结果:"
+
splitStr
(
text
,
false
));
}
...
...
src/main/java/com/jeeplus/modules/warehouse/storage/service/StorageService.java
View file @
95997a0d
...
...
@@ -219,7 +219,7 @@ public class StorageService extends CrudService<StorageMapper, Storage> {
* @return
*/
@Transactional
(
readOnly
=
false
)
public
List
<
StorageInfo
>
findByPcTypeModel
(
GoodsInfo
goodsInfo
)
{
public
Page
<
StorageInfo
>
findByPcTypeModel
(
Page
<
StorageInfo
>
page
,
GoodsInfo
goodsInfo
)
{
QrCode
temQr
=
new
QrCode
();
temQr
.
setGoodsInfo
(
goodsInfo
);
List
<
QrCode
>
qrCodeList
=
qrCodeMapper
.
findByPcTypeModel
(
temQr
);
...
...
@@ -236,6 +236,7 @@ public class StorageService extends CrudService<StorageMapper, Storage> {
storageInfo
.
setQrCode
(
qrCode
);
storageInfoList
.
add
(
storageInfo
);
}
return
storageInfoList
;
page
.
setList
(
storageInfoList
);
return
page
;
}
}
\ No newline at end of file
src/main/java/com/jeeplus/modules/warehouse/storage/web/StorageController.java
View file @
95997a0d
...
...
@@ -18,6 +18,7 @@ import com.jeeplus.modules.warehouse.goods.entity.Goods;
import
com.jeeplus.modules.warehouse.goods.entity.GoodsInfo
;
import
com.jeeplus.modules.warehouse.materialtype.entity.MaterialType
;
import
com.jeeplus.modules.warehouse.qrcode.entity.QrCode
;
import
com.jeeplus.modules.warehouse.shelves.entity.Shelves
;
import
com.jeeplus.modules.warehouse.storage.dto.CountStorageInfo
;
import
com.jeeplus.modules.warehouse.storage.entity.StorageInfo
;
import
org.apache.shiro.authz.annotation.Logical
;
...
...
@@ -261,28 +262,19 @@ public class StorageController extends BaseController {
/**
* 查询需要入库的货品信息
* @param
goods
Info
* @param
storage
Info
* @return
*/
@ResponseBody
@RequestMapping
(
value
=
"findByPcTypeModel"
)
public
AjaxJson
findByPcTypeModel
(
GoodsInfo
goodsInfo
)
{
Goods
goods
=
new
Goods
();
goods
.
setBatchNum
(
"PC-2023-02-0003"
);
goodsInfo
.
setType
(
new
MaterialType
(
"3c56529c82bd49c38ebd27d5264af130"
));
goodsInfo
.
setGoods
(
goods
);
AjaxJson
j
=
new
AjaxJson
();
public
Map
<
String
,
Object
>
findByPcTypeModel
(
HttpServletRequest
request
,
HttpServletResponse
response
,
StorageInfo
storageInfo
)
{
GoodsInfo
goodsInfo
=
storageInfo
.
getGoodsInfo
();
if
(
null
!=
goodsInfo
&&
null
!=
goodsInfo
.
getGoods
()
&&
null
!=
goodsInfo
.
getType
()
&&
StringUtils
.
isNotBlank
(
goodsInfo
.
getGoods
().
getBatchNum
())
&&
StringUtils
.
isNotBlank
(
goodsInfo
.
getType
().
getId
()))
{
List
<
StorageInfo
>
storageInfoList
=
storageService
.
findByPcTypeModel
(
goodsInfo
);
j
.
put
(
"storageInfoList"
,
storageInfoList
);
j
.
setSuccess
(
true
);
j
.
setMsg
(
"查询成功"
);
Page
<
StorageInfo
>
page
=
storageService
.
findByPcTypeModel
(
new
Page
<
StorageInfo
>(
request
,
response
),
goodsInfo
);
return
getBootstrapData
(
page
);
}
else
{
j
.
setSuccess
(
false
);
j
.
setMsg
(
"查询条件不能为空"
);
return
null
;
}
return
j
;
}
}
\ 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