mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
新增设置排单优先级接口
This commit is contained in:
+9
@@ -12,6 +12,7 @@ import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
import com.cf.imes.framework.common.pojo.PageParam;
|
||||
@@ -65,6 +66,7 @@ public class PlanController {
|
||||
return success(planService.cancellation(id));
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得排单")
|
||||
@Parameter(name = "id", description = "排单id", required = true, example = "1024")
|
||||
@@ -96,6 +98,13 @@ public class PlanController {
|
||||
return success(BeanUtils.toBean(pageResult, PlanRespVO.class));
|
||||
}
|
||||
|
||||
@PostMapping("/setSort")
|
||||
@Operation(summary = "设置排单优先级")
|
||||
@PreAuthorize("@ss.hasPermission('executor:plan:query')")
|
||||
public CommonResult<Boolean> setSort(@Valid @NotEmpty(message = "参数不能空") @RequestBody List<SortVO> list) {
|
||||
return success(planService.setSort(list));
|
||||
}
|
||||
|
||||
@GetMapping("getNotPlanOrderListPage")
|
||||
@Operation(summary = "获取未排单的板材生产单板材分页列表")
|
||||
@PreAuthorize("@ss.hasPermission('executor:plan:query')")
|
||||
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.cf.imes.module.executor.controller.admin.plan.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @author Beal
|
||||
*/
|
||||
@Data
|
||||
@Valid
|
||||
public class SortVO {
|
||||
@Schema(description = "排单id")
|
||||
@NotNull(message = "排单id 不能空")
|
||||
private Long planId;
|
||||
|
||||
@Schema(description = "排序")
|
||||
@NotNull(message = "排序不能空")
|
||||
private Long sort;
|
||||
|
||||
}
|
||||
+2
@@ -66,4 +66,6 @@ public interface PlanService {
|
||||
PageResult<OrderRespVO> getOrderByPlanId(PlanOrderPageReqVO pageReqVO);
|
||||
|
||||
PageResult<PlanGoodsVO> getNotPlanGoodsListPageByOrderId( NotPlanGoodsListPageVO pageVO);
|
||||
|
||||
Boolean setSort(List<SortVO> list);
|
||||
}
|
||||
+14
@@ -403,4 +403,18 @@ public class PlanServiceImpl implements PlanService {
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean setSort(List<SortVO> list) {
|
||||
ArrayList<PlanDO> planDOS = new ArrayList<>();
|
||||
list.forEach(e->{
|
||||
planDOS.add(PlanDO.builder()
|
||||
.id(e.getPlanId())
|
||||
.sort(e.getSort())
|
||||
.build());
|
||||
|
||||
});
|
||||
planMapper.updateBatch(planDOS);
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user