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 3ac2e062
authored
Jul 11, 2023
by
王力
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_rescheduling20230711' into 'develop'
修改 See merge request !194
2 parents
686f10b0
9315d2c2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
13 deletions
project-order/src/main/java/com/dituhui/pea/order/common/OrderAssignCheck.java
project-order/src/main/java/com/dituhui/pea/order/service/impl/OrderAssignImpl.java
project-order/src/main/java/com/dituhui/pea/order/common/OrderAssignCheck.java
View file @
3ac2e06
...
@@ -11,7 +11,6 @@ import com.dituhui.pea.order.entity.SkillInfo;
...
@@ -11,7 +11,6 @@ import com.dituhui.pea.order.entity.SkillInfo;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
java.sql.Timestamp
;
import
java.sql.Timestamp
;
...
@@ -24,11 +23,9 @@ import java.util.List;
...
@@ -24,11 +23,9 @@ import java.util.List;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
@Component
@Slf4j
@Slf4j
public
class
OrderAssignCheck
{
public
class
OrderAssignCheck
{
private
String
orderId
;
private
String
engineerCode
;
@Autowired
@Autowired
OrderRequestMPDao
orderRequestMPDao
;
OrderRequestMPDao
orderRequestMPDao
;
...
@@ -41,10 +38,6 @@ public class OrderAssignCheck {
...
@@ -41,10 +38,6 @@ public class OrderAssignCheck {
@Autowired
@Autowired
EngineerBusinessMPDao
engineerBusinessMPDao
;
EngineerBusinessMPDao
engineerBusinessMPDao
;
public
OrderAssignCheck
(
String
orderId
,
String
engineerCode
)
{
this
.
orderId
=
orderId
;
this
.
engineerCode
=
engineerCode
;
}
@Data
@Data
public
class
Result
{
public
class
Result
{
...
@@ -65,10 +58,10 @@ public class OrderAssignCheck {
...
@@ -65,10 +58,10 @@ public class OrderAssignCheck {
}
}
}
}
public
Result
orderAssignCheck
()
{
public
Result
orderAssignCheck
(
String
orderId
,
String
engineerCode
)
{
log
.
info
(
"begin orderAssignCheck:orderId={}, engineerCode={}"
,
this
.
orderId
,
this
.
engineerCode
);
log
.
info
(
"begin orderAssignCheck:orderId={}, engineerCode={}"
,
orderId
,
engineerCode
);
OrderRequest
order
=
orderRequestMPDao
.
getByOrderId
(
this
.
orderId
);
OrderRequest
order
=
orderRequestMPDao
.
getByOrderId
(
orderId
);
double
curX
=
Double
.
parseDouble
(
order
.
getX
());
double
curX
=
Double
.
parseDouble
(
order
.
getX
());
double
curY
=
Double
.
parseDouble
(
order
.
getY
());
double
curY
=
Double
.
parseDouble
(
order
.
getY
());
...
...
project-order/src/main/java/com/dituhui/pea/order/service/impl/OrderAssignImpl.java
View file @
3ac2e06
...
@@ -131,8 +131,8 @@ public class OrderAssignImpl implements OrderAssign {
...
@@ -131,8 +131,8 @@ public class OrderAssignImpl implements OrderAssign {
throw
new
BusinessException
(
String
.
format
(
"订单已指派个技术员[%s], 不必重复指派给同一个技术员"
,
engineer
.
getName
()));
throw
new
BusinessException
(
String
.
format
(
"订单已指派个技术员[%s], 不必重复指派给同一个技术员"
,
engineer
.
getName
()));
}
}
OrderAssignCheck
ck
=
new
OrderAssignCheck
(
orderId
,
engineerCode
);
OrderAssignCheck
ck
=
new
OrderAssignCheck
();
OrderAssignCheck
.
Result
result
=
ck
.
orderAssignCheck
();
OrderAssignCheck
.
Result
result
=
ck
.
orderAssignCheck
(
orderId
,
engineerCode
);
log
.
info
(
"指派检查结果:{}"
,
result
);
log
.
info
(
"指派检查结果:{}"
,
result
);
if
(!
result
.
getCanAssign
()){
if
(!
result
.
getCanAssign
()){
throw
new
BusinessException
(
"指派失败, 未能找到合适的时间段, 请选择其他技术员"
);
throw
new
BusinessException
(
"指派失败, 未能找到合适的时间段, 请选择其他技术员"
);
...
...
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