Compare commits

...

2 Commits

Author SHA1 Message Date
chenlong 790fa56e81 Merge branch 'refs/heads/chenglong' into dev 1 month ago
chenlong 1167fdf256 修改拆单 1 month ago
  1. 89
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSplitOrderTaskController.java
  2. 14
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/splitOrder/AddPackageCodeDTO.java
  3. 12
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/splitOrder/AddTaskDTO.java
  4. 7
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/splitOrder/CancelPackageCodeDTO.java
  5. 10
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/splitOrder/TaskId.java

89
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSplitOrderTaskController.java

@ -2,19 +2,20 @@ package com.logpm.distribution.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.logpm.distribution.dto.splitOrder.DistributionSplitAllTaskSearchDTO;
import com.logpm.distribution.dto.splitOrder.DistributionSplitTaskSearchDTO;
import com.logpm.distribution.dto.splitOrder.*;
import com.logpm.distribution.entity.DistributionSplitOrderAllTaskEntity;
import com.logpm.distribution.entity.DistributionSplitOrderTaskEntity;
import com.logpm.distribution.service.IDistributionSplitOrderTaskService;
import com.logpm.distribution.vo.SplitPackageOrderVO;
import lombok.AllArgsConstructor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@RestController
@AllArgsConstructor
@ -24,13 +25,8 @@ public class DistributionSplitOrderTaskController {
@PostMapping("/add-package-code")
public R<String> addPackageCode(@RequestBody Map mao) {
String taskId = (String) mao.get("taskId");
List<String> packageCodes = (List<String>) mao.get("packageCodes");
return distributionSplitOrderTaskService.addPackageCode(Long.parseLong(taskId), packageCodes);
public R<String> addPackageCode(@RequestBody AddPackageCodeDTO addPackageCodeDTO) {
return distributionSplitOrderTaskService.addPackageCode(addPackageCodeDTO.getTaskId(), addPackageCodeDTO.getPackageCodes());
}
@GetMapping("/all-task-list")
@ -39,81 +35,92 @@ public class DistributionSplitOrderTaskController {
}
@PostMapping("/batch-create-task")
public R<String> batchCreateTask(@RequestBody List<DistributionSplitOrderTaskEntity> distributionSplitOrderTaskList) {
public R<String> batchCreateTask(@RequestBody ArrayList<DistributionSplitOrderTaskEntity> distributionSplitOrderTaskList) {
return distributionSplitOrderTaskService.batchCreateTask(distributionSplitOrderTaskList);
}
@PostMapping("/add-task")
public R<String> addTask(Long allTaskId, List<DistributionSplitOrderTaskEntity> task) {
return distributionSplitOrderTaskService.addTask(allTaskId, task);
public R<String> addTask(@RequestBody AddTaskDTO addTaskDTO) {
return distributionSplitOrderTaskService.addTask(addTaskDTO.getAllTaskId(), addTaskDTO.getTask());
}
@PostMapping("/cancel-all-task")
public R<String> cancelAllTask(Long allTaskId) {
return distributionSplitOrderTaskService.cancelAllTask(allTaskId);
public R<String> cancelAllTask(@RequestBody TaskId allTaskId) {
return distributionSplitOrderTaskService.cancelAllTask(allTaskId.getAllTaskId());
}
@RequestMapping("/cancel-package-code")
public R<String> cancelPackageCode(Long taskId, List<String> packageCodes) {
return distributionSplitOrderTaskService.cancelPackageCode(taskId, packageCodes);
@PostMapping("/cancel-package-code")
public R<String> cancelPackageCode(@RequestBody CancelPackageCodeDTO cancelPackageCodeDTO) {
return distributionSplitOrderTaskService.cancelPackageCode(cancelPackageCodeDTO.getTaskId(), cancelPackageCodeDTO.getPackageCodes());
}
@RequestMapping("/cancel-task")
public R<String> cancelTask(Long taskId) {
return distributionSplitOrderTaskService.cancelTask(taskId);
@PostMapping("/cancel-task")
public R<String> cancelTask(@RequestBody TaskId taskId) {
return distributionSplitOrderTaskService.cancelTask(taskId.getTaskId());
}
/**
* 用不着
* @param distributionSplitOrderTaskEntity
* @param packageCodeList
* @return
*/
@RequestMapping("/create-task")
public R<String> createTask(DistributionSplitOrderTaskEntity distributionSplitOrderTaskEntity, List<String> packageCodeList) {
public R<String> createTask(DistributionSplitOrderTaskEntity distributionSplitOrderTaskEntity, ArrayList<String> packageCodeList) {
return distributionSplitOrderTaskService.createTask(distributionSplitOrderTaskEntity, packageCodeList);
}
@RequestMapping("/delete-all-task")
public R<String> deleteAllTask(Long allTaskId) {
return distributionSplitOrderTaskService.deleteAllTask(allTaskId);
@PostMapping("/delete-all-task")
public R<String> deleteAllTask(@RequestBody TaskId allTaskId) {
return distributionSplitOrderTaskService.deleteAllTask(allTaskId.getAllTaskId());
}
@RequestMapping("/delete-task")
public R<String> deleteTask(Long taskId) {
return distributionSplitOrderTaskService.deleteTask(taskId);
@PostMapping("/delete-task")
public R<String> deleteTask(@RequestBody TaskId taskId) {
return distributionSplitOrderTaskService.deleteTask(taskId.getTaskId());
}
@RequestMapping("/finish-all-task")
public R<String> finishAllTask(Long allTaskId) {
return distributionSplitOrderTaskService.finishAllTask(allTaskId);
@PostMapping("/finish-all-task")
public R<String> finishAllTask(@RequestBody TaskId allTaskId) {
return distributionSplitOrderTaskService.finishAllTask(allTaskId.getAllTaskId());
}
@RequestMapping("/finish-task")
public R<String> finishTask(Long taskId) {
return distributionSplitOrderTaskService.finishTask(taskId);
@PostMapping("/finish-task")
public R<String> finishTask(@RequestBody TaskId taskId) {
return distributionSplitOrderTaskService.finishTask(taskId.getTaskId());
}
@RequestMapping("/get-task-detail")
@GetMapping("/get-task-detail")
public R<Object> getTaskDetail(Long taskId) {
return distributionSplitOrderTaskService.getTaskDetail(taskId);
}
@RequestMapping("/task-list")
@GetMapping("/task-list")
public R<IPage<DistributionSplitOrderTaskEntity>> taskList(Query query, DistributionSplitTaskSearchDTO distributionSplitTaskSearchDTO) {
return distributionSplitOrderTaskService.taskList(query, distributionSplitTaskSearchDTO);
}
@RequestMapping("/update-task")
public R<String> updateTask(DistributionSplitOrderTaskEntity distributionSplitOrderTaskEntity) {
@PostMapping("/update-task")
public R<String> updateTask(@RequestBody DistributionSplitOrderTaskEntity distributionSplitOrderTaskEntity) {
return distributionSplitOrderTaskService.updateTask(distributionSplitOrderTaskEntity);
}
@RequestMapping("/check-order-code")
/**
* 检查是否已经被拆单
* @param orderCode
* @return
*/
@GetMapping("/check-order-code")
public R<String> checkOrderCode(String orderCode) {
return distributionSplitOrderTaskService.checkOrderCode(orderCode);
}
@RequestMapping("/get-package-code-by-order-code")
@GetMapping("/get-package-code-by-order-code")
public R<IPage<SplitPackageOrderVO>> getPackageCodeByOrderCode(Query query, String orderCode) {
return distributionSplitOrderTaskService.getPackageCodeByOrderCode(query, orderCode);
}
@RequestMapping("/get-package-code-by-task-id")
@GetMapping("/get-package-code-by-task-id")
public R<List<SplitPackageOrderVO>> getPackageCodeByTaskId(Long taskId) {
return distributionSplitOrderTaskService.getPackageCodeByTaskId( taskId);
}

14
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/splitOrder/AddPackageCodeDTO.java

@ -0,0 +1,14 @@
package com.logpm.distribution.dto.splitOrder;
import lombok.Data;
import java.util.List;
@Data
public class AddPackageCodeDTO {
private Long taskId;
private List<String> packageCodes;
}

12
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/splitOrder/AddTaskDTO.java

@ -0,0 +1,12 @@
package com.logpm.distribution.dto.splitOrder;
import com.logpm.distribution.entity.DistributionSplitOrderTaskEntity;
import lombok.Data;
import java.util.List;
@Data
public class AddTaskDTO {
private Long allTaskId;
private List<DistributionSplitOrderTaskEntity> task;
}

7
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/splitOrder/CancelPackageCodeDTO.java

@ -0,0 +1,7 @@
package com.logpm.distribution.dto.splitOrder;
public class CancelPackageCodeDTO extends AddPackageCodeDTO{
}

10
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/dto/splitOrder/TaskId.java

@ -0,0 +1,10 @@
package com.logpm.distribution.dto.splitOrder;
import lombok.Data;
@Data
public class TaskId {
private Long taskId;
private Long allTaskId;
}
Loading…
Cancel
Save