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 b875887b
authored
Jul 17, 2023
by
丁伟峰
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-dingwf-0717' into develop
2 parents
81b0f9b4
130561b8
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
25 additions
and
11 deletions
.gitignore
project-order/src/main/java/com/dituhui/pea/order/dao/OrderRequestDao.java
project-order/src/main/java/com/dituhui/pea/order/dao/OrderSkillProjection.java
project-order/src/main/java/com/dituhui/pea/order/dto/EngineersGanttDTO.java
project-order/src/main/java/com/dituhui/pea/order/service/impl/CapacityQueryServiceImpl.java
project-order/src/main/java/com/dituhui/pea/order/service/impl/EngineerGanttServiceImpl.java
.gitignore
View file @
b875887
...
...
@@ -10,3 +10,4 @@
/*/logs/
/*/.gitignore
dispatchSolution-*.json
/project-order/src/main/resources/application-dev.yaml
project-order/src/main/java/com/dituhui/pea/order/dao/OrderRequestDao.java
View file @
b875887
...
...
@@ -2,14 +2,21 @@ package com.dituhui.pea.order.dao;
import
com.dituhui.pea.order.entity.OrderRequestEntity
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.jpa.repository.Query
;
import
org.springframework.data.repository.query.Param
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
@Repository
public
interface
OrderRequestDao
extends
JpaRepository
<
OrderRequestEntity
,
Long
>
{
public
interface
OrderRequestDao
extends
JpaRepository
<
OrderRequestEntity
,
Long
>
{
OrderRequestEntity
getByOrderId
(
String
orderId
);
List
<
OrderRequestEntity
>
findAllByOrderIdIn
(
List
<
String
>
orderIds
);
@Query
(
"SELECT o.orderId, s.skillCategory as skillCaption FROM OrderRequestEntity o JOIN SkillInfoEntity s on o.brand=s.brand and o.type=s.type and o.skill=s.skill WHERE o.orderId = :orderId"
)
OrderSkillProjection
getOrderSkillCaptionByOrderId
(
@Param
(
"orderId"
)
String
orderId
);
}
project-order/src/main/java/com/dituhui/pea/order/dao/OrderSkillProjection.java
0 → 100644
View file @
b875887
package
com
.
dituhui
.
pea
.
order
.
dao
;
public
interface
OrderSkillProjection
{
String
getOrderId
();
String
getSkillCaption
();
}
project-order/src/main/java/com/dituhui/pea/order/dto/EngineersGanttDTO.java
View file @
b875887
...
...
@@ -80,6 +80,8 @@ public class EngineersGanttDTO {
* 工单ID
*/
private
String
orderId
;
private
String
caption
;
/**
* 排班状态
*/
...
...
project-order/src/main/java/com/dituhui/pea/order/service/impl/CapacityQueryServiceImpl.java
View file @
b875887
...
...
@@ -117,7 +117,7 @@ public class CapacityQueryServiceImpl implements CapacityQueryService {
OrgTeamEntity
orgTeamEntity
=
orgTeamDao
.
getByTeamId
(
teamId
);
SpanInfo
r
=
new
SpanInfo
();
if
(
"全天"
.
equals
(
timeSpan
))
{
r
.
setTitle
(
"全天
都可以
"
);
r
.
setTitle
(
"全天"
);
r
.
setTimeBegin
(
String
.
format
(
"%s %s:00"
,
date
,
orgTeamEntity
.
getWorkOn
()));
r
.
setTimeEnd
(
String
.
format
(
"%s %s:00"
,
date
,
orgTeamEntity
.
getWorkOff
()));
}
else
{
...
...
project-order/src/main/java/com/dituhui/pea/order/service/impl/EngineerGanttServiceImpl.java
View file @
b875887
...
...
@@ -2,16 +2,10 @@ package com.dituhui.pea.order.service.impl;
import
com.dituhui.pea.common.Result
;
import
com.dituhui.pea.order.common.EngineerUtils
;
import
com.dituhui.pea.order.dao.CapacityEngineerStatDao
;
import
com.dituhui.pea.order.dao.EngineerInfoDao
;
import
com.dituhui.pea.order.dao.OrderAppointmentDao
;
import
com.dituhui.pea.order.dao.OrderRequestDao
;
import
com.dituhui.pea.order.dao.*
;
import
com.dituhui.pea.order.dto.EngineersGanttDTO
;
import
com.dituhui.pea.order.dto.LabelValueDTO
;
import
com.dituhui.pea.order.entity.CapacityEngineerStatEntity
;
import
com.dituhui.pea.order.entity.EngineerInfoEntity
;
import
com.dituhui.pea.order.entity.OrderAppointmentEntity
;
import
com.dituhui.pea.order.entity.OrderRequestEntity
;
import
com.dituhui.pea.order.entity.*
;
import
com.dituhui.pea.order.service.EngineerGanttService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
...
...
@@ -63,6 +57,11 @@ public class EngineerGanttServiceImpl implements EngineerGanttService {
order
.
setStartTime
(
e
.
getExpectStartTime
()).
setEndTime
(
e
.
getExpectEndTime
());
order
.
setOrderId
(
e
.
getOrderId
()).
setPreStatus
(
e
.
getPreStatus
());
order
.
setTips
(
getOrderTips
(
e
.
getOrderId
()));
OrderSkillProjection
orderSkill
=
orderRequestDao
.
getOrderSkillCaptionByOrderId
(
e
.
getOrderId
());
if
(
orderSkill
!=
null
)
{
order
.
setCaption
(
orderSkill
.
getSkillCaption
());
}
order
.
setAppointmentStatus
(
mapOrderRequest
.
get
(
e
.
getOrderId
()).
getAppointmentStatus
());
List
<
EngineersGanttDTO
.
Order
>
orders
=
null
;
if
(
mapEngineers
.
containsKey
(
e
.
getEngineerCode
()))
{
...
...
@@ -156,5 +155,4 @@ public class EngineerGanttServiceImpl implements EngineerGanttService {
tips
.
add
(
new
LabelValueDTO
().
setLabel
(
"标签"
).
setValue
(
order
.
getTags
()));
return
tips
;
}
}
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