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 8041eba5
authored
Jul 07, 2023
by
张晓
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-dispatch-zx' into develop
2 parents
65f7a6dd
782c0ce7
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
3 deletions
project-dispatch/pom.xml
project-dispatch/src/main/java/com/dituhui/pea/dispatch/DispatchServiceApplication.java
project-dispatch/src/main/java/com/dituhui/pea/dispatch/controller/BatchController.java
project-dispatch/pom.xml
View file @
8041eba
...
...
@@ -127,6 +127,13 @@
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
com.fasterxml.jackson.datatype
</groupId>
<artifactId>
jackson-datatype-jsr310
</artifactId>
<version>
2.13.0
</version>
</dependency>
</dependencies>
<build>
<plugins>
...
...
project-dispatch/src/main/java/com/dituhui/pea/dispatch/DispatchServiceApplication.java
View file @
8041eba
...
...
@@ -24,7 +24,7 @@ import org.springframework.scheduling.annotation.EnableScheduling;
* @author gpzhang
*/
@SpringBootApplication
@EnableScheduling
//
@EnableScheduling
public
class
DispatchServiceApplication
{
public
static
void
main
(
String
[]
args
)
{
...
...
project-dispatch/src/main/java/com/dituhui/pea/dispatch/controller/BatchController.java
View file @
8041eba
...
...
@@ -6,6 +6,11 @@ import cn.hutool.core.bean.copier.CopyOptions;
import
com.dituhui.pea.common.Result
;
import
com.dituhui.pea.dispatch.entity.DispatchBatch
;
import
com.dituhui.pea.dispatch.service.BatchService
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.databind.annotation.JsonDeserialize
;
import
com.fasterxml.jackson.databind.annotation.JsonSerialize
;
import
com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer
;
import
com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer
;
import
lombok.Data
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.io.IOUtils
;
...
...
@@ -43,7 +48,15 @@ public class BatchController {
String
batchNo
;
int
engineerNum
;
int
orderNum
;
@JsonDeserialize
(
using
=
LocalDateTimeDeserializer
.
class
)
@JsonSerialize
(
using
=
LocalDateTimeSerializer
.
class
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
LocalDateTime
startTime
;
@JsonDeserialize
(
using
=
LocalDateTimeDeserializer
.
class
)
@JsonSerialize
(
using
=
LocalDateTimeSerializer
.
class
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
LocalDateTime
endTime
;
String
status
;
}
...
...
@@ -78,7 +91,7 @@ public class BatchController {
/*
* 检查指定日期的小组是否有在运行的批次任务,有则返回,没有则创建后返回批次码
*/
@GetMapping
(
"/b
atch/b
uild/{groupId}/{day}"
)
@GetMapping
(
"/build/{groupId}/{day}"
)
public
Result
<?>
buildBatch
(
@PathVariable
String
groupId
,
@PathVariable
String
day
)
{
log
.
info
(
"buildBatch, groupId:{}, day:{}"
,
groupId
,
day
);
try
{
...
...
@@ -94,7 +107,7 @@ public class BatchController {
}
@GetMapping
(
"/
batch/
query/{groupId}/{batchNo}"
)
@GetMapping
(
"/query/{groupId}/{batchNo}"
)
public
Result
<?>
queryBatch
(
@PathVariable
String
groupId
,
@PathVariable
String
batchNo
)
{
log
.
info
(
"buildBatch, groupId:{}, batchNo:{}"
,
groupId
,
batchNo
);
DispatchBatch
batch
=
batchService
.
queryBatch
(
groupId
,
batchNo
);
...
...
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