Commit 8041eba5 by 张晓

Merge branch 'feature-dispatch-zx' into develop

2 parents 65f7a6dd 782c0ce7
......@@ -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>
......
......@@ -24,7 +24,7 @@ import org.springframework.scheduling.annotation.EnableScheduling;
* @author gpzhang
*/
@SpringBootApplication
@EnableScheduling
//@EnableScheduling
public class DispatchServiceApplication {
public static void main(String[] args) {
......
......@@ -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("/batch/build/{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);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!