commit message:```
新增资产领用API和DTO类以支持资产管理系统 添加了AssetReceiveApi接口,该接口包含创建资产领用信息的方法。同时,新增了AssetReceiveSaveDTO类,用于管理后台资产领用新增/修改的Request VO。这些改动支持了资产管理系统的新功能。 ```
This commit is contained in:
parent
9ae3e93768
commit
5ffffb58a5
@ -0,0 +1,23 @@
|
||||
package cn.iocoder.yudao.module.system.api.assetreceive;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.module.system.api.assetreceive.dto.AssetReceiveSaveDTO;
|
||||
import cn.iocoder.yudao.module.system.enums.ApiConstants;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory =
|
||||
@Tag(name = "RPC 服务 - 资产领用")
|
||||
public interface AssetReceiveApi {
|
||||
|
||||
String PREFIX = ApiConstants.PREFIX + "/assetReceive";
|
||||
|
||||
@PostMapping(PREFIX + "/createReceive")
|
||||
@Operation(summary = "创建资产领用信息")
|
||||
CommonResult<Boolean> createReceive(@RequestBody List<AssetReceiveSaveDTO> saveDTOs);
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
package cn.iocoder.yudao.module.system.api.assetreceive.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.time.LocalDate;
|
||||
|
||||
@Schema(description = "管理后台 - 资产领用新增/修改 Request VO")
|
||||
@Data
|
||||
public class AssetReceiveSaveDTO {
|
||||
|
||||
@Schema(description = "资产领用表单主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "领用人的用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "146")
|
||||
@NotNull(message = "领用人的用户编号不能为空")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "领用人的部门编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "128")
|
||||
@NotNull(message = "领用人的部门编号不能为空")
|
||||
private Long deptId;
|
||||
|
||||
@Schema(description = "分配人的用户编号")
|
||||
private Long receiveUserId;
|
||||
|
||||
@Schema(description = "资产编号")
|
||||
private String assetsNo;
|
||||
|
||||
@Schema(description = "资产类型编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "资产类型编号不能为空")
|
||||
private Long assetsTypeId;
|
||||
|
||||
@Schema(description = "数量", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "数量不能为空")
|
||||
private Integer num;
|
||||
|
||||
@Schema(description = "申请日期")
|
||||
private LocalDate applyDate;
|
||||
|
||||
@Schema(description = "分配日期")
|
||||
private LocalDate allocationDate;
|
||||
|
||||
@Schema(description = "领用状态 | 0待领用 1采购中 2已领用 ", example = "0")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "附件信息")
|
||||
private String fileItems;
|
||||
|
||||
}
|
@ -242,6 +242,7 @@ public interface ErrorCodeConstants {
|
||||
ErrorCode INSUFFICIENT_IDLE_MATERIALS = new ErrorCode(1_010_001_005, "空闲物料不足!");
|
||||
|
||||
ErrorCode THE_CORRESPONDING_ASSET_TYPE_WAS_NOT_FOUND = new ErrorCode(1_010_001_006, "未找到对应的资产类型!");
|
||||
ErrorCode ASSET_RECEIVE_NOT_EXISTS = new ErrorCode(1_010_001_007, "资产领用不存在");
|
||||
|
||||
// ========== 考勤设备相关 1-011-001-001 ==========
|
||||
ErrorCode USERS_EXT_NOT_EXISTS = new ErrorCode(1_011_001_001, "用户信息不存在!");
|
||||
|
Loading…
Reference in New Issue
Block a user