订单管理相关
This commit is contained in:
@@ -12,6 +12,6 @@ import com.zt.plat.framework.common.exception.ErrorCode;
|
||||
public interface ErrorCodeConstants {
|
||||
|
||||
ErrorCode PURCHASE_ORDER_NOT_EXISTS = new ErrorCode(1_008_000_001, "采购订单不存在");
|
||||
|
||||
ErrorCode ORDER_ID_NOT_EXISTS = new ErrorCode(1_008_000_010, "订单id不能为空");
|
||||
ErrorCode PRCH_ORD_DTL_NOT_EXISTS = new ErrorCode(1_008_001_001, "采购订单明细不存在");
|
||||
}
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.zt.plat.module.contractorder.enums.purchaseorder;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
public enum PurchaseOrderStatusEnum {
|
||||
// 草稿状态
|
||||
DRAFT("DRAFT", "草稿"),
|
||||
// 审批中状态
|
||||
APPROVING("APPR", "审批中"),
|
||||
// 待提交ERP状态
|
||||
TO_SUBMIT_ERP("SUB", "待提交ERP"),
|
||||
// 执行中状态
|
||||
IN_PROGRESS("IN_PROGRESS", "执行中"),
|
||||
// 关闭状态
|
||||
CLOSED("CLOSE", "关闭");
|
||||
|
||||
/** 状态编码 */
|
||||
private final String code;
|
||||
/** 状态描述 */
|
||||
private final String description;
|
||||
|
||||
PurchaseOrderStatusEnum(String code, String description) {
|
||||
this.code = code;
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据编码获取枚举实例
|
||||
* @param code 状态编码
|
||||
* @return 匹配的枚举,无匹配时返回 null
|
||||
*/
|
||||
public static PurchaseOrderStatusEnum getByCode(String code) {
|
||||
for (PurchaseOrderStatusEnum status : PurchaseOrderStatusEnum.values()) {
|
||||
if (status.getCode().equals(code)) {
|
||||
return status;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -107,4 +107,20 @@ public class PurchaseOrderController implements BusinessControllerMarker {
|
||||
BeanUtils.toBean(list, PurchaseOrderRespVO.class));
|
||||
}
|
||||
|
||||
//提交订单审核
|
||||
@PostMapping("/submit-order")
|
||||
@Operation(summary = "提交订单审核")
|
||||
@PreAuthorize("@ss.hasPermission('bse:purchase-order:update')")
|
||||
public CommonResult<Boolean> submitOrder(@RequestParam("id") Long id) {
|
||||
purchaseOrderService.submitOrder(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
//提交ERP订单
|
||||
@PostMapping("/submit-erp")
|
||||
@Operation(summary = "提交ERP订单", description = "bse:purchase-order:update')")
|
||||
public CommonResult<?> submitErp(@RequestBody List<Long> ids) {
|
||||
return success( purchaseOrderService.submitErp(ids));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.zt.plat.module.contractorder.controller.admin.purchaseorder.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
@@ -148,4 +149,22 @@ public class PurchaseOrderSaveReqVO {
|
||||
@Schema(description = "订单明细")
|
||||
@ExcelProperty("订单明细")
|
||||
private List<PrchOrdDtlSaveReqVO> prchOrdDtlSaveReqVOS;
|
||||
|
||||
|
||||
@Schema(description = "流程实例编号")
|
||||
@ExcelProperty("流程实例编号")
|
||||
@NotEmpty(message = "流程实例编号不能为空")
|
||||
private String processInstanceId;
|
||||
|
||||
@Schema(description = "流程当前任务节点id")
|
||||
@ExcelProperty("流程当前任务节点id")
|
||||
private String taskId;
|
||||
|
||||
@Schema(description = " 审批意见")
|
||||
@ExcelProperty(" 审批意见")
|
||||
private String reviewOpinion;
|
||||
|
||||
@Schema(description = "是否提交审核,value为0或1")
|
||||
@ExcelProperty("是否提交审核")
|
||||
private int isPush;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.zt.plat.module.contractorder.controller.admin.purchaseorder.vo;
|
||||
|
||||
import com.zt.plat.module.contractorder.dal.dataobject.purchaseorder.PrchOrdDtlDO;
|
||||
import com.zt.plat.module.contractorder.dal.dataobject.purchaseorder.PurchaseOrderDO;
|
||||
import lombok.Data;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 采购订单及明细查询结果 VO
|
||||
*/
|
||||
@Data
|
||||
public class PurchaseOrderWithDetailsVO {
|
||||
|
||||
/**
|
||||
* 采购订单信息
|
||||
*/
|
||||
private PurchaseOrderDO purchaseOrder;
|
||||
|
||||
/**
|
||||
* 订单明细列表
|
||||
*/
|
||||
private List<PrchOrdDtlDO> orderDetails;
|
||||
|
||||
/**
|
||||
* 订单号(用于分组)
|
||||
*/
|
||||
private String systemOrderNumber;
|
||||
}
|
||||
@@ -214,4 +214,27 @@ public class PurchaseOrderDO extends BusinessBaseDO {
|
||||
@TableField("PRCH_GRP_NAME")
|
||||
private String purchaseGroupName;
|
||||
|
||||
/**
|
||||
* 流程实例编号
|
||||
*/
|
||||
@TableField("PRCS_INSC_ID")
|
||||
private String processInstanceId;
|
||||
|
||||
/**
|
||||
* 流程当前任务节点id
|
||||
*/
|
||||
@TableField("TSK_NDE_ID")
|
||||
private String taskId;
|
||||
|
||||
/**
|
||||
* 审批意见
|
||||
*/
|
||||
@TableField("RVW_ONN")
|
||||
private String reviewOpinion;
|
||||
|
||||
/**
|
||||
* 是否需要审批
|
||||
*/
|
||||
@TableField("IS_PUSH")
|
||||
private int isPush;
|
||||
}
|
||||
|
||||
@@ -7,8 +7,10 @@ import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||
|
||||
import com.zt.plat.module.contractorder.controller.admin.purchaseorder.vo.PurchaseOrderPageReqVO;
|
||||
import com.zt.plat.module.contractorder.controller.admin.purchaseorder.vo.PurchaseOrderWithDetailsVO;
|
||||
import com.zt.plat.module.contractorder.dal.dataobject.purchaseorder.PurchaseOrderDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
|
||||
/**
|
||||
@@ -60,4 +62,5 @@ public interface PurchaseOrderMapper extends BaseMapperX<PurchaseOrderDO> {
|
||||
.orderByDesc(PurchaseOrderDO::getId));
|
||||
}
|
||||
|
||||
List<PurchaseOrderWithDetailsVO> selectOrderById(@Param("ids") List<Long> id);
|
||||
}
|
||||
|
||||
@@ -63,4 +63,8 @@ public interface PurchaseOrderService {
|
||||
*/
|
||||
PageResult<PurchaseOrderDO> getPurchaseOrderPage(PurchaseOrderPageReqVO pageReqVO);
|
||||
|
||||
String submitOrder(Long id);
|
||||
|
||||
String submitErp(List<Long> ids);
|
||||
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,6 @@
|
||||
package com.zt.plat.module.contractorder.util.constants;
|
||||
|
||||
public interface ProcessDefinitionKeyConstants {
|
||||
|
||||
String PURCHASE_ORDER_REVIEW_PROCESS = "purchase_order_review_process";
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user