mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-13 21:32:07 +08:00
1、移除排单分页 默认不展示已开料逻辑;2、新增排单优先级查询列表
This commit is contained in:
+7
@@ -98,6 +98,13 @@ public class PlanController {
|
||||
return success(BeanUtils.toBean(pageResult, PlanRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/sort/page")
|
||||
@Operation(summary = "获得排单优先级列表")
|
||||
@PreAuthorize("@ss.hasAnyPermissions('placeorder:query','placeorder:priority','producePlan:query')")
|
||||
public CommonResult<List<PlanRespVO>> getPlanSortPage() {
|
||||
return success(planService.getPlanSortPage());
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("getPlanList")
|
||||
@Operation(summary = "查询排单(未分页)")
|
||||
|
||||
+2
@@ -2,6 +2,7 @@ package com.cf.imes.module.executor.controller.admin.plan.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@@ -12,6 +13,7 @@ import java.util.List;
|
||||
@Schema(description = "管理后台 - 订单开料排单 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class PlanRespVO {
|
||||
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "12776")
|
||||
|
||||
+6
@@ -33,6 +33,12 @@ public interface PlanMapper extends BaseMapperX<PlanDO> {
|
||||
|
||||
IPage<PlanDO> selectPlanPageList(@Param("page") IPage page,@Param(Constants.WRAPPER) Wrapper<PlanDO> wrapper);
|
||||
|
||||
/**
|
||||
* 按排单优先级查询排单
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<PlanDO> selectPlanSortList();
|
||||
|
||||
List<PlateOptimize> selectPlateListByPlanId(@Param("planId") Long planId, @Param("organId") Long organId);
|
||||
|
||||
|
||||
+7
@@ -55,6 +55,13 @@ public interface PlanService {
|
||||
*/
|
||||
PageResult<PlanRespVO> getPlanPage(PlanPageReqVO pageReqVO);
|
||||
|
||||
/**
|
||||
* 获取排单优先级列表
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<PlanRespVO> getPlanSortPage();
|
||||
|
||||
List<PlanRespVO> getPlanList();
|
||||
|
||||
/**
|
||||
|
||||
+5
-7
@@ -394,7 +394,6 @@ public class PlanServiceImpl implements PlanService {
|
||||
planPageTurning(pageReqVO,planDOPageResult);
|
||||
|
||||
}else {
|
||||
List<Integer> statusList = pageReqVO.getStatus();
|
||||
|
||||
QueryWrapperX<PlanDO> queryWrapperX = new QueryWrapperX<>();
|
||||
queryWrapperX
|
||||
@@ -404,16 +403,11 @@ public class PlanServiceImpl implements PlanService {
|
||||
.eqIfPresent(FIELD_OP_ID, pageReqVO.getId())
|
||||
.eqIfPresent("op.sort", pageReqVO.getSort())
|
||||
.eqIfPresent("op.type", pageReqVO.getType())
|
||||
.inIfPresent("op.status", statusList)
|
||||
.inIfPresent("op.status", pageReqVO.getStatus())
|
||||
.betweenIfPresent("op.plan_time", pageReqVO.getPlanTime())
|
||||
.likeIfPresent("op.order_nos", pageReqVO.getOrderNos())
|
||||
.likeIfPresent(FIELD_CUSTOMER, pageReqVO.getCustomer());
|
||||
|
||||
// 如果状态没有显式选择已开料那么不显示已开料
|
||||
if (CollUtil.isEmpty(statusList) || !statusList.contains(PlanStatusEnum.OPENED.getStatus())) {
|
||||
queryWrapperX.ne("op.status", PlanStatusEnum.OPENED.getStatus());
|
||||
}
|
||||
|
||||
planDOPageResult = planMapper.selectPlanPageList(page,queryWrapperX);
|
||||
|
||||
if (CollUtil.isEmpty(planDOPageResult.getRecords())) {
|
||||
@@ -481,6 +475,10 @@ public class PlanServiceImpl implements PlanService {
|
||||
return new PageResult<>(planRespVOPageResult, planDOPageResult.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PlanRespVO> getPlanSortPage() {
|
||||
return BeanUtil.copyToList(planMapper.selectPlanSortList(), PlanRespVO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PlanRespVO> getPlanList() {
|
||||
|
||||
+7
@@ -23,6 +23,13 @@
|
||||
ORDER BY op.sort
|
||||
</select>
|
||||
|
||||
<select id="selectPlanSortList" resultType="com.cf.imes.module.executor.dal.dataobject.plan.PlanDO">
|
||||
select distinct op.*
|
||||
from order_plan op
|
||||
join order_plate opt on op.organ_id = opt.organ_id and op.id = opt.plan_id and opt.deleted = false
|
||||
where op.status != 3 and op.deleted = false
|
||||
ORDER BY op.sort
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectPlateListByPlanId"
|
||||
|
||||
Reference in New Issue
Block a user