Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
yangxiujun
/
paidan_demo
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 9c9cd33e
authored
Nov 24, 2023
by
刘鑫
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
https://gitlab.dituhui.com/bsh/project/project
into develop
2 parents
b763b989
1c4b007e
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
2 additions
and
14 deletions
project-order/src/main/java/com/dituhui/pea/order/dao/OrgBranchDao.java
project-order/src/main/java/com/dituhui/pea/order/dao/OrgClusterDao.java
project-order/src/main/java/com/dituhui/pea/order/dao/OrgGroupDao.java
project-order/src/main/java/com/dituhui/pea/order/dao/OrgTeamDao.java
project-order/src/main/java/com/dituhui/pea/order/service/impl/OrderCreateServiceImpl.java
project-order/src/main/java/com/dituhui/pea/order/dao/OrgBranchDao.java
View file @
9c9cd33
...
...
@@ -8,7 +8,6 @@ import org.springframework.stereotype.Repository;
import
java.util.List
;
@Repository
@Where
(
clause
=
"status = 1"
)
public
interface
OrgBranchDao
extends
JpaRepository
<
OrgBranchEntity
,
Integer
>
{
List
<
OrgBranchEntity
>
findAllByClusterId
(
String
clusterId
);
...
...
project-order/src/main/java/com/dituhui/pea/order/dao/OrgClusterDao.java
View file @
9c9cd33
...
...
@@ -9,7 +9,6 @@ import org.springframework.data.jpa.repository.JpaRepository;
import
org.springframework.stereotype.Repository
;
@Repository
@Where
(
clause
=
"status = 1"
)
public
interface
OrgClusterDao
extends
JpaRepository
<
OrgClusterEntity
,
Integer
>
{
OrgClusterEntity
getByClusterId
(
String
clusterId
);
...
...
project-order/src/main/java/com/dituhui/pea/order/dao/OrgGroupDao.java
View file @
9c9cd33
...
...
@@ -10,7 +10,6 @@ import org.springframework.stereotype.Repository;
import
java.util.List
;
@Repository
@Where
(
clause
=
"status = 1"
)
public
interface
OrgGroupDao
extends
JpaRepository
<
OrgGroupEntity
,
Integer
>
{
List
<
OrgGroupEntity
>
findAllByBranchId
(
String
branchId
);
...
...
project-order/src/main/java/com/dituhui/pea/order/dao/OrgTeamDao.java
View file @
9c9cd33
...
...
@@ -14,7 +14,6 @@ import java.util.List;
import
java.util.Set
;
@Repository
@Where
(
clause
=
"status = 1"
)
public
interface
OrgTeamDao
extends
JpaRepository
<
OrgTeamEntity
,
Integer
>,
JpaSpecificationExecutor
<
OrgTeamEntity
>
{
@Query
(
"select t from OrgTeamEntity t where t.clusterId = :clusterId and t.status=1"
)
...
...
project-order/src/main/java/com/dituhui/pea/order/service/impl/OrderCreateServiceImpl.java
View file @
9c9cd33
...
...
@@ -272,11 +272,10 @@ public class OrderCreateServiceImpl implements OrderCreateService {
OrderInfoEntity
entity
=
new
OrderInfoEntity
();
String
orderId
=
req
.
getOrderId
();
if
(
StringUtils
.
isEmpty
(
orderId
))
{
String
s
=
UUID
.
randomUUID
().
toString
().
replace
(
"-"
,
""
);
orderId
=
s
.
substring
(
s
.
length
()
-
9
);
return
Result
.
failed
(
StatusCodeEnum
.
COMMON_PARAM_EMPTY
);
}
OrderInfoEntity
byOrderId
=
orderInfoDao
.
getByOrderId
(
req
.
getOrderId
());
String
peaBrand
=
fixBrand
(
req
.
getBrand
());
String
peaBrand
=
CommonUtil
.
fixBrand
(
req
.
getBrand
());
if
(
ObjectUtil
.
isNotNull
(
byOrderId
))
{
return
Result
.
failed
(
StatusCodeEnum
.
ORDER_EXISTS
);
}
...
...
@@ -507,11 +506,4 @@ public class OrderCreateServiceImpl implements OrderCreateService {
return
String
.
format
(
"%s_%s"
,
orderId
,
DateUtils
.
formatDateTime
(
LocalDateTime
.
now
(),
"MMdd"
));
}
private
String
fixBrand
(
String
brand
)
{
if
(!
brand
.
equals
(
"嘉格纳"
))
{
return
"博世/西门子以及其他品牌"
;
}
else
{
return
brand
;
}
}
}
Write
Preview
Markdown
is supported
Attach a file
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 post a comment