Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
4b59703b
Commit
4b59703b
authored
Jun 23, 2021
by
季圣华
Browse files
给供应商导入增加判断
parent
c8f996dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
jshERP-boot/src/main/java/com/jsh/erp/service/supplier/SupplierService.java
View file @
4b59703b
...
@@ -375,7 +375,16 @@ public class SupplierService {
...
@@ -375,7 +375,16 @@ public class SupplierService {
Map
<
String
,
Object
>
data
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
data
=
new
HashMap
<
String
,
Object
>();
try
{
try
{
for
(
Supplier
s:
mList
)
{
for
(
Supplier
s:
mList
)
{
supplierMapper
.
insertSelective
(
s
);
SupplierExample
example
=
new
SupplierExample
();
example
.
createCriteria
().
andSupplierEqualTo
(
s
.
getSupplier
()).
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
);
List
<
Supplier
>
list
=
supplierMapper
.
selectByExample
(
example
);
if
(
list
.
size
()
<=
0
)
{
supplierMapper
.
insertSelective
(
s
);
}
else
{
Long
id
=
list
.
get
(
0
).
getId
();
s
.
setId
(
id
);
supplierMapper
.
updateByPrimaryKeySelective
(
s
);
}
}
}
info
.
code
=
200
;
info
.
code
=
200
;
data
.
put
(
"message"
,
"成功"
);
data
.
put
(
"message"
,
"成功"
);
...
...
Write
Preview
Supports
Markdown
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