Browse Source

fix:修改拆单任务接受数据错误的情况

visual
pref_mail@163.com 3 months ago
parent
commit
be7073e5fd
  1. 6
      blade-biz-common/src/main/java/org/springblade/common/constant/order/OrderSplitAllTaskStateConstant.java
  2. 10
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/controller/DistributionSplitOrderTaskController.java
  3. 1
      blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSplitOrderTaskServiceImpl.java

6
blade-biz-common/src/main/java/org/springblade/common/constant/order/OrderSplitAllTaskStateConstant.java

@ -10,9 +10,9 @@ import lombok.Getter;
@Getter
public enum OrderSplitAllTaskStateConstant {
InProgress("未完成",0),
finish("已完成",1),
cancel("已撤销",2);
InProgress("未完成",1),
finish("已完成",2),
cancel("已撤销",3);
private final String name;
private final Integer value;

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

@ -14,6 +14,7 @@ import org.springblade.core.tool.api.R;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
@RestController
@AllArgsConstructor
@ -23,8 +24,13 @@ public class DistributionSplitOrderTaskController {
@PostMapping("/add-package-code")
public R<String> addPackageCode(Long taskId, List<String> packageCodes) {
return distributionSplitOrderTaskService.addPackageCode(taskId, packageCodes);
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);
}
@GetMapping("/all-task-list")

1
blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionSplitOrderTaskServiceImpl.java

@ -204,6 +204,7 @@ public class DistributionSplitOrderTaskServiceImpl extends BaseServiceImpl<Distr
if (task == null) {
return R.fail("拆单任务不存在");
}
if (!task.getState().equals(OrderSplitAllTaskStateConstant.InProgress.getValue())) {
return R.fail("拆单任务已完成,无法添加");
}

Loading…
Cancel
Save