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 21be21c0
authored
Aug 01, 2023
by
丁伟峰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
工程师日程类型列表实现
1 parent
d0f2a375
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
78 additions
and
0 deletions
project-order/src/main/java/com/dituhui/pea/order/controller/EngineerCalendarController.java
project-order/src/main/java/com/dituhui/pea/order/dto/CalendarTypeDTO.java
project-order/src/main/java/com/dituhui/pea/order/service/EngineerCalendarService.java
project-order/src/main/java/com/dituhui/pea/order/controller/EngineerCalendarController.java
0 → 100644
View file @
21be21c
package
com
.
dituhui
.
pea
.
order
.
controller
;
import
com.dituhui.pea.common.BusinessException
;
import
com.dituhui.pea.common.Result
;
import
com.dituhui.pea.order.dto.EngineerCalendarDTO
;
import
com.dituhui.pea.order.service.EngineerCalendarService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
@Slf4j
@RestController
@RequestMapping
(
"/pea-order"
)
public
class
EngineerCalendarController
{
@Autowired
EngineerCalendarService
engineerCalendarService
;
@GetMapping
(
"/engineer/calendar"
)
public
Result
<?>
getEngineerCalendar
(
@Validated
EngineerCalendarDTO
.
Request
reqDTO
)
{
Result
<?>
res
=
null
;
try
{
res
=
engineerCalendarService
.
getEngineersCalendar
(
reqDTO
);
}
catch
(
BusinessException
e
)
{
return
Result
.
failed
(
e
.
getMessage
());
}
return
res
;
}
@GetMapping
(
"/engineer/calendar/type/list"
)
public
Result
<?>
getCalendarTypeList
()
{
Result
<?>
res
=
null
;
try
{
res
=
engineerCalendarService
.
getCalendarTypeList
();
}
catch
(
BusinessException
e
)
{
return
Result
.
failed
(
e
.
getMessage
());
}
return
res
;
}
}
project-order/src/main/java/com/dituhui/pea/order/dto/CalendarTypeDTO.java
0 → 100644
View file @
21be21c
package
com
.
dituhui
.
pea
.
order
.
dto
;
import
lombok.Data
;
import
java.util.List
;
public
class
CalendarTypeDTO
{
@lombok
.
Data
public
static
class
Result
{
private
List
<
Type
>
types
;
}
@lombok
.
Data
public
static
class
Type
{
private
BarStyle
barStyle
;
private
TagStyle
tagStyle
;
private
String
type
;
private
String
typeName
;
}
@lombok
.
Data
public
static
class
BarStyle
{
private
String
backgroundColor
;
private
String
color
;
}
@lombok
.
Data
public
static
class
TagStyle
{
private
String
backgroundColor
;
}
}
project-order/src/main/java/com/dituhui/pea/order/service/EngineerCalendarService.java
View file @
21be21c
...
...
@@ -6,4 +6,6 @@ import com.dituhui.pea.order.dto.EngineerCalendarDTO;
public
interface
EngineerCalendarService
{
Result
<?>
getEngineersCalendar
(
EngineerCalendarDTO
.
Request
engineerCalendarReq
);
Result
<?>
getCalendarTypeList
();
}
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