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
130851a7
Commit
130851a7
authored
Mar 02, 2023
by
zhanglt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生成二维码
parent
cba7bb77
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
ProfitWarehousingService.java
...e/profitwarehousing/service/ProfitWarehousingService.java
+11
-4
No files found.
src/main/java/com/jeeplus/modules/warehouse/profitwarehousing/service/ProfitWarehousingService.java
View file @
130851a7
...
...
@@ -23,6 +23,8 @@ import com.jeeplus.modules.warehouse.qrcode.entity.QrCode;
import
com.jeeplus.modules.warehouse.qrcode.mapper.QrCodeMapper
;
import
com.jeeplus.modules.warehouse.qrcode.service.QrCodeService
;
import
com.jeeplus.modules.warehouse.qrcode.util.BuildQcUtil
;
import
com.jeeplus.modules.warehouse.wzcode.entity.Wzcode
;
import
com.jeeplus.modules.warehouse.wzcode.service.WzcodeService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -56,6 +58,8 @@ public class ProfitWarehousingService extends CrudService<ProfitWarehousingMappe
private
LedgerService
ledgerService
;
@Autowired
private
QrCodeService
qrCodeService
;
@Autowired
private
WzcodeService
wzcodeService
;
public
ProfitWarehousing
get
(
String
id
)
{
ProfitWarehousing
profitWarehousing
=
super
.
get
(
id
);
...
...
@@ -87,24 +91,27 @@ public class ProfitWarehousingService extends CrudService<ProfitWarehousingMappe
file
.
mkdirs
();
}
ProfitWarehousingInfo
profitWarehousingInfo
=
profitWarehousingInfoMapper
.
get
(
infoId
);
String
numSeq
=
CodeUtil
.
code
(
"WZBM"
,
StaticNumSeq
.
WZBM
);
// String numSeq = CodeUtil.code("WZBM", StaticNumSeq.WZBM);
Wzcode
wzcode
=
wzcodeService
.
findByCode
(
profitWarehousingInfo
.
getType
().
getCode
());
QrCode
qrCode
=
new
QrCode
();
qrCode
.
setProfitWarehousingInfo
(
profitWarehousingInfo
);
qrCode
.
setComeFlag
(
"1"
);
qrCode
.
setCode
(
numSeq
);
qrCode
.
setCode
(
wzcode
.
getCodeAndNum
()
);
qrCode
.
setState
(
"0"
);
qrCode
.
preInsert
();
try
{
BuildQcUtil
.
buildQrOne
(
qrCode
,
qrImgPath
+
"/"
+
numSeq
+
".png"
,
qrImgPath
+
"/"
+
numSeq
+
"_0"
+
".png"
);
// 生成图片
BuildQcUtil
.
buildQrOne
(
qrCode
,
qrImgPath
+
"/"
+
wzcode
.
getCodeAndNum
()
+
".png"
,
qrImgPath
+
"/"
+
wzcode
.
getCodeAndNum
()
+
"_0"
+
".png"
);
// 生成图片
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
qrCode
.
setUrl
(
Global
.
getAttachmentUrl
()
+
"image/"
+
numSeq
+
"_0"
+
".png"
);
qrCode
.
setUrl
(
Global
.
getAttachmentUrl
()
+
"image/"
+
wzcode
.
getCodeAndNum
()
+
"_0"
+
".png"
);
qrCodeMapper
.
insert
(
qrCode
);
qrCode
=
qrCodeMapper
.
get
(
qrCode
.
getId
());
profitWarehousingInfo
.
setQrCode
(
qrCode
);
profitWarehousingInfo
.
preUpdate
();
profitWarehousingInfoMapper
.
update
(
profitWarehousingInfo
);
// 更新物资编码表
wzcodeService
.
save
(
wzcode
);
return
profitWarehousingInfo
;
}
/**
...
...
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