Compare commits
No commits in common. 'main' and 'ck' have entirely different histories.
@ -1,29 +0,0 @@
|
||||
package cn.iocoder.yudao.module.common.enums;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum MoldBrandStatusEnum implements IntArrayValuable {
|
||||
|
||||
ON_MACHINE(0, "在机"),
|
||||
STANDBY(1, "待用"),
|
||||
REPAIRING(2, "维修"),
|
||||
SCRAPPED(3, "报废"),
|
||||
IN_STOCK(4, "在库");
|
||||
|
||||
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(MoldBrandStatusEnum::getStatus).toArray();
|
||||
|
||||
private final Integer status;
|
||||
private final String name;
|
||||
|
||||
@Override
|
||||
public int[] array() {
|
||||
return ARRAYS;
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,25 +0,0 @@
|
||||
package cn.iocoder.yudao.module.erp.enums;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
@RequiredArgsConstructor
|
||||
@Getter
|
||||
public enum ErpStockInStatusEnum implements IntArrayValuable {
|
||||
|
||||
WAIT_IN(0, "待入库"),
|
||||
IN_STOCK(20, "已入库");
|
||||
|
||||
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(ErpStockInStatusEnum::getStatus).toArray();
|
||||
|
||||
private final Integer status;
|
||||
private final String name;
|
||||
|
||||
@Override
|
||||
public int[] array() {
|
||||
return ARRAYS;
|
||||
}
|
||||
}
|
||||
@ -1,25 +0,0 @@
|
||||
package cn.iocoder.yudao.module.erp.enums;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
@RequiredArgsConstructor
|
||||
@Getter
|
||||
public enum ErpStockOutStatusEnum implements IntArrayValuable {
|
||||
|
||||
WAIT_OUT(0, "待出库"),
|
||||
OUT_STOCK(20, "已出库");
|
||||
|
||||
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(ErpStockOutStatusEnum::getStatus).toArray();
|
||||
|
||||
private final Integer status;
|
||||
private final String name;
|
||||
|
||||
@Override
|
||||
public int[] array() {
|
||||
return ARRAYS;
|
||||
}
|
||||
}
|
||||
@ -1,38 +0,0 @@
|
||||
package cn.iocoder.yudao.module.erp.enums;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
@RequiredArgsConstructor
|
||||
@Getter
|
||||
public enum ErpStockOutUsageTypeEnum implements IntArrayValuable {
|
||||
|
||||
REPAIR_RECEIVE(1, "维修领用"),
|
||||
MAINTENANCE_RECEIVE(2, "保养领用"),
|
||||
OTHER_OUT(3, "其他出库");
|
||||
|
||||
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(ErpStockOutUsageTypeEnum::getType).toArray();
|
||||
|
||||
private final Integer type;
|
||||
private final String name;
|
||||
|
||||
@Override
|
||||
public int[] array() {
|
||||
return ARRAYS;
|
||||
}
|
||||
|
||||
public static String getNameByType(Integer type) {
|
||||
if (type == null) {
|
||||
return null;
|
||||
}
|
||||
for (ErpStockOutUsageTypeEnum value : values()) {
|
||||
if (value.getType().equals(type)) {
|
||||
return value.getName();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -1,16 +0,0 @@
|
||||
package cn.iocoder.yudao.module.erp.enums.stock;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
@RequiredArgsConstructor
|
||||
@Getter
|
||||
public enum ErpStockCheckApproveActionEnum {
|
||||
|
||||
SUBMIT("SUBMIT"),
|
||||
APPROVE("APPROVE"),
|
||||
REJECT("REJECT");
|
||||
|
||||
private final String actionType;
|
||||
|
||||
}
|
||||
@ -1,26 +0,0 @@
|
||||
package cn.iocoder.yudao.module.erp.enums.stock;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
@RequiredArgsConstructor
|
||||
@Getter
|
||||
public enum ErpStockCheckSourceTypeEnum implements IntArrayValuable {
|
||||
|
||||
BY_LOCATION(1, "按库存"),
|
||||
BY_PRODUCT(2, "按产品");
|
||||
|
||||
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(ErpStockCheckSourceTypeEnum::getType).toArray();
|
||||
|
||||
private final Integer type;
|
||||
private final String name;
|
||||
|
||||
@Override
|
||||
public int[] array() {
|
||||
return ARRAYS;
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,17 +0,0 @@
|
||||
package cn.iocoder.yudao.module.erp.enums.stock;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
@RequiredArgsConstructor
|
||||
@Getter
|
||||
public enum ErpStockInApproveActionEnum {
|
||||
|
||||
SUBMIT("SUBMIT"),
|
||||
APPROVE("APPROVE"),
|
||||
REJECT("REJECT"),
|
||||
AUTO_APPROVE("AUTO_APPROVE");
|
||||
|
||||
private final String actionType;
|
||||
|
||||
}
|
||||
@ -1,17 +0,0 @@
|
||||
package cn.iocoder.yudao.module.erp.enums.stock;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
@RequiredArgsConstructor
|
||||
@Getter
|
||||
public enum ErpStockOutApproveActionEnum {
|
||||
|
||||
SUBMIT("SUBMIT"),
|
||||
APPROVE("APPROVE"),
|
||||
REJECT("REJECT"),
|
||||
AUTO_APPROVE("AUTO_APPROVE");
|
||||
|
||||
private final String actionType;
|
||||
|
||||
}
|
||||
@ -1,106 +0,0 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.mold;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.mold.vo.MoldPressureNetRecordPageReqVO;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.mold.vo.MoldPressureNetRecordRespVO;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.mold.vo.MoldPressureNetRecordSaveReqVO;
|
||||
import cn.iocoder.yudao.module.erp.dal.dataobject.mold.MoldPressureNetRecordDO;
|
||||
import cn.iocoder.yudao.module.erp.service.mold.MoldPressureNetRecordService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
|
||||
@Tag(name = "管理后台 - 子模具压网记录")
|
||||
@RestController
|
||||
@RequestMapping("/erp/mold-pressure-net-record")
|
||||
@Validated
|
||||
public class MoldPressureNetRecordController {
|
||||
|
||||
@Resource
|
||||
private MoldPressureNetRecordService moldPressureNetRecordService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建子模具压网记录")
|
||||
@PreAuthorize("@ss.hasPermission('erp:mold-brand:create')")
|
||||
public CommonResult<Long> createMoldPressureNetRecord(@Valid @RequestBody MoldPressureNetRecordSaveReqVO createReqVO) {
|
||||
return success(moldPressureNetRecordService.createMoldPressureNetRecord(createReqVO));
|
||||
}
|
||||
|
||||
@PostMapping("/batch-create")
|
||||
@Operation(summary = "批量创建子模具压网记录")
|
||||
@PreAuthorize("@ss.hasPermission('erp:mold-brand:create')")
|
||||
public CommonResult<Boolean> createMoldPressureNetRecordBatch(@Valid @RequestBody List<MoldPressureNetRecordSaveReqVO> createReqVOList) {
|
||||
moldPressureNetRecordService.createBatchMoldPressureNetRecord(createReqVOList);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新子模具压网记录")
|
||||
@PreAuthorize("@ss.hasPermission('erp:mold-brand:update')")
|
||||
public CommonResult<Boolean> updateMoldPressureNetRecord(@Valid @RequestBody MoldPressureNetRecordSaveReqVO updateReqVO) {
|
||||
moldPressureNetRecordService.updateMoldPressureNetRecord(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除子模具压网记录")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('erp:mold-brand:delete')")
|
||||
public CommonResult<Boolean> deleteMoldPressureNetRecord(@RequestParam("id") Long id) {
|
||||
moldPressureNetRecordService.deleteMoldPressureNetRecord(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得子模具压网记录")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('erp:mold-brand:query')")
|
||||
public CommonResult<MoldPressureNetRecordRespVO> getMoldPressureNetRecord(@RequestParam("id") Long id) {
|
||||
MoldPressureNetRecordDO record = moldPressureNetRecordService.getMoldPressureNetRecord(id);
|
||||
return success(BeanUtils.toBean(record, MoldPressureNetRecordRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得子模具压网记录分页")
|
||||
@PreAuthorize("@ss.hasPermission('erp:mold-brand:query')")
|
||||
public CommonResult<PageResult<MoldPressureNetRecordRespVO>> getMoldPressureNetRecordPage(@Valid MoldPressureNetRecordPageReqVO pageReqVO) {
|
||||
PageResult<MoldPressureNetRecordDO> pageResult = moldPressureNetRecordService.getMoldPressureNetRecordPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, MoldPressureNetRecordRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出子模具压网记录 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('erp:mold-brand:query')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportMoldPressureNetRecordExcel(@Valid MoldPressureNetRecordPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<MoldPressureNetRecordDO> list = moldPressureNetRecordService.getMoldPressureNetRecordPage(pageReqVO).getList();
|
||||
ExcelUtils.write(response, "子模具压网记录.xls", "数据", MoldPressureNetRecordRespVO.class,
|
||||
BeanUtils.toBean(list, MoldPressureNetRecordRespVO.class));
|
||||
}
|
||||
}
|
||||
@ -1,32 +0,0 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.mold.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 模具型号分页 Response VO")
|
||||
@Data
|
||||
public class MoldBrandPageRespVO {
|
||||
|
||||
@Schema(description = "分页结果", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private PageResult<MoldBrandRespVO> pageResult;
|
||||
|
||||
@Schema(description = "全部数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
|
||||
private Long allCount;
|
||||
|
||||
@Schema(description = "在机数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
|
||||
private Long onMachineCount;
|
||||
|
||||
@Schema(description = "待用数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "20")
|
||||
private Long standbyCount;
|
||||
|
||||
@Schema(description = "在库数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "8")
|
||||
private Long inStockCount;
|
||||
|
||||
@Schema(description = "维修数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "5")
|
||||
private Long repairingCount;
|
||||
|
||||
@Schema(description = "报废数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
private Long scrappedCount;
|
||||
|
||||
}
|
||||
@ -1,28 +0,0 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.mold.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 模具型号状态统计 Response VO")
|
||||
@Data
|
||||
public class MoldBrandStatusStatisticsRespVO {
|
||||
|
||||
@Schema(description = "全部数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
|
||||
private Long allCount;
|
||||
|
||||
@Schema(description = "在机数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
|
||||
private Long onMachineCount;
|
||||
|
||||
@Schema(description = "待用数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "20")
|
||||
private Long standbyCount;
|
||||
|
||||
@Schema(description = "在库数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "8")
|
||||
private Long inStockCount;
|
||||
|
||||
@Schema(description = "维修数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "5")
|
||||
private Long repairingCount;
|
||||
|
||||
@Schema(description = "报废数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
private Long scrappedCount;
|
||||
|
||||
}
|
||||
@ -1,42 +0,0 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.mold.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 子模具压网记录分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class MoldPressureNetRecordPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "模具组ID", example = "1")
|
||||
private Long moldBrandId;
|
||||
|
||||
@Schema(description = "模具组名称", example = "A组")
|
||||
private String moldBrandName;
|
||||
|
||||
@Schema(description = "子模具ID", example = "1")
|
||||
private Long moldId;
|
||||
|
||||
@Schema(description = "子模具名称", example = "子模具A")
|
||||
private String moldName;
|
||||
|
||||
@Schema(description = "压网时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] pressureNetTime;
|
||||
|
||||
@Schema(description = "备注", example = "备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
}
|
||||
@ -1,49 +0,0 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.mold.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 子模具压网记录 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class MoldPressureNetRecordRespVO {
|
||||
|
||||
@Schema(description = "ID", example = "1")
|
||||
@ExcelProperty("ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "模具组ID", example = "1")
|
||||
@ExcelProperty("模具组ID")
|
||||
private Long moldBrandId;
|
||||
|
||||
@Schema(description = "模具组名称", example = "A组")
|
||||
@ExcelProperty("模具组名称")
|
||||
private String moldBrandName;
|
||||
|
||||
@Schema(description = "子模具ID", example = "1")
|
||||
@ExcelProperty("子模具ID")
|
||||
private Long moldId;
|
||||
|
||||
@Schema(description = "子模具名称", example = "子模具A")
|
||||
@ExcelProperty("子模具名称")
|
||||
private String moldName;
|
||||
|
||||
@Schema(description = "压网时间")
|
||||
@ExcelProperty("压网时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime pressureNetTime;
|
||||
|
||||
@Schema(description = "备注", example = "备注")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
}
|
||||
@ -1,44 +0,0 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.mold.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
|
||||
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 子模具压网记录新增/修改 Request VO")
|
||||
@Data
|
||||
public class MoldPressureNetRecordSaveReqVO {
|
||||
|
||||
@Schema(description = "ID", example = "1")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "模具组ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "模具组ID不能为空")
|
||||
private Long moldBrandId;
|
||||
|
||||
@Schema(description = "模具组名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "A组")
|
||||
private String moldBrandName;
|
||||
|
||||
@Schema(description = "子模具ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "子模具ID不能为空")
|
||||
private Long moldId;
|
||||
|
||||
@Schema(description = "子模具名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "子模具A")
|
||||
private String moldName;
|
||||
|
||||
@Schema(description = "压网时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "压网时间不能为空")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonSerialize(using = LocalDateTimeSerializer.class)
|
||||
@JsonDeserialize(using = LocalDateTimeDeserializer.class)
|
||||
private LocalDateTime pressureNetTime;
|
||||
|
||||
@Schema(description = "备注", example = "备注")
|
||||
private String remark;
|
||||
}
|
||||
@ -1,82 +0,0 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.pallet;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.pallet.vo.ErpPalletPageReqVO;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.pallet.vo.ErpPalletRespVO;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.pallet.vo.ErpPalletSaveReqVO;
|
||||
import cn.iocoder.yudao.module.erp.dal.dataobject.pallet.ErpPalletDO;
|
||||
import cn.iocoder.yudao.module.erp.service.pallet.ErpPalletService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList;
|
||||
|
||||
@Tag(name = "管理后台 - ERP 托盘")
|
||||
@RestController
|
||||
@RequestMapping("/erp/pallet")
|
||||
@Validated
|
||||
public class ErpPalletController {
|
||||
|
||||
@Resource
|
||||
private ErpPalletService palletService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建托盘")
|
||||
@PreAuthorize("@ss.hasPermission('erp:pallet:create')")
|
||||
public CommonResult<Long> createPallet(@Valid @RequestBody ErpPalletSaveReqVO createReqVO) {
|
||||
return success(palletService.createPallet(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新托盘")
|
||||
@PreAuthorize("@ss.hasPermission('erp:pallet:update')")
|
||||
public CommonResult<Boolean> updatePallet(@Valid @RequestBody ErpPalletSaveReqVO updateReqVO) {
|
||||
palletService.updatePallet(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除托盘")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('erp:pallet:delete')")
|
||||
public CommonResult<Boolean> deletePallet(@RequestParam("id") Long id) {
|
||||
palletService.deletePallet(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得托盘")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1")
|
||||
@PreAuthorize("@ss.hasPermission('erp:pallet:query')")
|
||||
public CommonResult<ErpPalletRespVO> getPallet(@RequestParam("id") Long id) {
|
||||
ErpPalletDO pallet = palletService.getPallet(id);
|
||||
return success(BeanUtils.toBean(pallet, ErpPalletRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得托盘分页")
|
||||
@PreAuthorize("@ss.hasPermission('erp:pallet:query')")
|
||||
public CommonResult<PageResult<ErpPalletRespVO>> getPalletPage(@Valid ErpPalletPageReqVO pageReqVO) {
|
||||
PageResult<ErpPalletDO> pageResult = palletService.getPalletPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, ErpPalletRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/simple-list")
|
||||
@Operation(summary = "获得托盘精简列表")
|
||||
@Parameter(name = "status", description = "托盘状态", example = "1")
|
||||
public CommonResult<List<ErpPalletRespVO>> getPalletSimpleList(@RequestParam(value = "status", required = false) Integer status) {
|
||||
List<ErpPalletDO> list = palletService.getPalletListByStatus(status);
|
||||
return success(convertList(list, item -> BeanUtils.toBean(item, ErpPalletRespVO.class)));
|
||||
}
|
||||
}
|
||||
@ -1,26 +0,0 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.pallet.enums;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum ErpPalletStatusEnum implements IntArrayValuable {
|
||||
|
||||
IDLE(1, "空闲"),
|
||||
OCCUPIED(2, "占用"),
|
||||
SCRAPPED(3, "报废");
|
||||
|
||||
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(ErpPalletStatusEnum::getStatus).toArray();
|
||||
|
||||
private final Integer status;
|
||||
private final String name;
|
||||
|
||||
@Override
|
||||
public int[] array() {
|
||||
return ARRAYS;
|
||||
}
|
||||
}
|
||||
@ -1,26 +0,0 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.pallet.enums;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum ErpPalletTypeEnum implements IntArrayValuable {
|
||||
|
||||
PLASTIC(1, "塑料"),
|
||||
STEEL(2, "钢质"),
|
||||
WOOD(3, "木托盘");
|
||||
|
||||
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(ErpPalletTypeEnum::getType).toArray();
|
||||
|
||||
private final Integer type;
|
||||
private final String name;
|
||||
|
||||
@Override
|
||||
public int[] array() {
|
||||
return ARRAYS;
|
||||
}
|
||||
}
|
||||
@ -1,59 +0,0 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.pallet.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.validation.InEnum;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.pallet.enums.ErpPalletStatusEnum;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.pallet.enums.ErpPalletTypeEnum;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY;
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - ERP 托盘分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class ErpPalletPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "托盘编码", example = "TP202506100001")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "托盘类型", example = "1")
|
||||
@InEnum(ErpPalletTypeEnum.class)
|
||||
private Integer palletType;
|
||||
|
||||
@Schema(description = "托盘状态", example = "1")
|
||||
@InEnum(ErpPalletStatusEnum.class)
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "仓库编号", example = "1")
|
||||
private Long warehouseId;
|
||||
|
||||
@Schema(description = "库区编号", example = "11")
|
||||
private Long areaId;
|
||||
|
||||
@Schema(description = "生产任务单号", example = "PLAN20250610001")
|
||||
private String planCode;
|
||||
|
||||
@Schema(description = "产品编号", example = "1001")
|
||||
private Long productId;
|
||||
|
||||
@Schema(description = "采购日期")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
|
||||
private LocalDate[] purchaseDate;
|
||||
|
||||
@Schema(description = "投入使用日期")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
|
||||
private LocalDate[] useDate;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
}
|
||||
@ -1,108 +0,0 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.product;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.product.vo.packagingscheme.ErpPackagingSchemePageReqVO;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.product.vo.packagingscheme.ErpPackagingSchemeRespVO;
|
||||
import cn.iocoder.yudao.module.erp.controller.admin.product.vo.packagingscheme.ErpPackagingSchemeSaveReqVO;
|
||||
import cn.iocoder.yudao.module.erp.dal.dataobject.product.ErpPackagingSchemeDO;
|
||||
import cn.iocoder.yudao.module.erp.service.product.ErpPackagingSchemeService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertList;
|
||||
|
||||
@Tag(name = "管理后台 - ERP 包装方案")
|
||||
@RestController
|
||||
@RequestMapping("/erp/packaging-scheme")
|
||||
@Validated
|
||||
public class ErpPackagingSchemeController {
|
||||
|
||||
@Resource
|
||||
private ErpPackagingSchemeService packagingSchemeService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建包装方案")
|
||||
@PreAuthorize("@ss.hasPermission('erp:packaging-scheme:create')")
|
||||
public CommonResult<Long> createPackagingScheme(@Valid @RequestBody ErpPackagingSchemeSaveReqVO createReqVO) {
|
||||
return success(packagingSchemeService.createPackagingScheme(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新包装方案")
|
||||
@PreAuthorize("@ss.hasPermission('erp:packaging-scheme:update')")
|
||||
public CommonResult<Boolean> updatePackagingScheme(@Valid @RequestBody ErpPackagingSchemeSaveReqVO updateReqVO) {
|
||||
packagingSchemeService.updatePackagingScheme(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除包装方案")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('erp:packaging-scheme:delete')")
|
||||
public CommonResult<Boolean> deletePackagingScheme(@RequestParam("id") Long id) {
|
||||
packagingSchemeService.deletePackagingScheme(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得包装方案")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('erp:packaging-scheme:query')")
|
||||
public CommonResult<ErpPackagingSchemeRespVO> getPackagingScheme(@RequestParam("id") Long id) {
|
||||
ErpPackagingSchemeDO scheme = packagingSchemeService.getPackagingScheme(id);
|
||||
return success(BeanUtils.toBean(scheme, ErpPackagingSchemeRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得包装方案分页")
|
||||
@PreAuthorize("@ss.hasPermission('erp:packaging-scheme:query')")
|
||||
public CommonResult<PageResult<ErpPackagingSchemeRespVO>> getPackagingSchemePage(@Valid ErpPackagingSchemePageReqVO pageReqVO) {
|
||||
PageResult<ErpPackagingSchemeDO> pageResult = packagingSchemeService.getPackagingSchemePage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, ErpPackagingSchemeRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/simple-list")
|
||||
@Operation(summary = "获得包装方案精简列表", description = "只包含已启用的包装方案")
|
||||
public CommonResult<List<ErpPackagingSchemeRespVO>> getPackagingSchemeSimpleList() {
|
||||
List<ErpPackagingSchemeDO> list = packagingSchemeService.getPackagingSchemeListByStatus(CommonStatusEnum.ENABLE.getStatus());
|
||||
return success(convertList(list, item -> BeanUtils.toBean(item, ErpPackagingSchemeRespVO.class)));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出包装方案 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('erp:packaging-scheme:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportPackagingSchemeExcel(@Valid ErpPackagingSchemePageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<ErpPackagingSchemeDO> list = packagingSchemeService.getPackagingSchemePage(pageReqVO).getList();
|
||||
ExcelUtils.write(response, "包装方案.xls", "数据", ErpPackagingSchemeRespVO.class,
|
||||
BeanUtils.toBean(list, ErpPackagingSchemeRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,20 +0,0 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.product.vo.category;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - ERP 产品分类树状 Response VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class ErpProductCategoryTreeRespVO extends ErpProductCategoryRespVO {
|
||||
|
||||
@Schema(description = "子分类列表")
|
||||
private List<ErpProductCategoryTreeRespVO> children;
|
||||
|
||||
@Schema(description = "是否叶子节点", example = "true")
|
||||
private Boolean leaf = true;
|
||||
|
||||
}
|
||||
@ -1,18 +0,0 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.product.vo.category;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - ERP 产品分类按类型分组 Response VO")
|
||||
@Data
|
||||
public class ErpProductCategoryTypeGroupRespVO {
|
||||
|
||||
@Schema(description = "分类类型", example = "1")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "该类型下的树状分类列表")
|
||||
private List<ErpProductCategoryTreeRespVO> children;
|
||||
|
||||
}
|
||||
@ -1,34 +0,0 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.product.vo.packagingscheme;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - ERP 包装方案分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class ErpPackagingSchemePageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "方案编码", example = "BZFA202501010001")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "方案名称", example = "标准包装方案")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "状态", example = "0")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
@ -1,56 +0,0 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.product.vo.packagingscheme;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
|
||||
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
|
||||
import cn.iocoder.yudao.module.system.enums.DictTypeConstants;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - ERP 包装方案 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class ErpPackagingSchemeRespVO {
|
||||
|
||||
@Schema(description = "包装方案编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@ExcelProperty("编号")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "方案编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "BZFA202501010001")
|
||||
@ExcelProperty("方案编码")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "方案名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "标准包装方案")
|
||||
@ExcelProperty("方案名称")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "每包数量(件)", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
|
||||
@ExcelProperty("每包数量(件)")
|
||||
private BigDecimal packageQuantity;
|
||||
|
||||
@Schema(description = "每托包数(包)", requiredMode = Schema.RequiredMode.REQUIRED, example = "20")
|
||||
@ExcelProperty("每托包数(包)")
|
||||
private BigDecimal palletPackageQuantity;
|
||||
|
||||
@Schema(description = "每托总数量(件)", requiredMode = Schema.RequiredMode.REQUIRED, example = "2000")
|
||||
@ExcelProperty("每托总数量(件)")
|
||||
private BigDecimal palletTotalQuantity;
|
||||
|
||||
@Schema(description = "备注", example = "默认包装")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "0")
|
||||
@ExcelProperty(value = "状态", converter = DictConvert.class)
|
||||
@DictFormat(DictTypeConstants.COMMON_STATUS)
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@ -1,48 +0,0 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.product.vo.packagingscheme;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
|
||||
import cn.iocoder.yudao.framework.common.validation.InEnum;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.DecimalMin;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Schema(description = "管理后台 - ERP 包装方案新增/修改 Request VO")
|
||||
@Data
|
||||
public class ErpPackagingSchemeSaveReqVO {
|
||||
|
||||
@Schema(description = "包装方案编号", example = "1")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "方案编码", example = "BZFA202501010001")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "方案名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "标准包装方案")
|
||||
@NotBlank(message = "方案名称不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "每包数量(件)", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
|
||||
@NotNull(message = "每包数量不能为空")
|
||||
@DecimalMin(value = "0", inclusive = false, message = "每包数量必须大于 0")
|
||||
private BigDecimal packageQuantity;
|
||||
|
||||
@Schema(description = "每托包数(包)", requiredMode = Schema.RequiredMode.REQUIRED, example = "20")
|
||||
@NotNull(message = "每托包数不能为空")
|
||||
@DecimalMin(value = "0", inclusive = false, message = "每托包数必须大于 0")
|
||||
private BigDecimal palletPackageQuantity;
|
||||
|
||||
@Schema(description = "每托总数量(件)", example = "2000")
|
||||
private BigDecimal palletTotalQuantity;
|
||||
|
||||
@Schema(description = "备注", example = "默认包装")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "0")
|
||||
@NotNull(message = "状态不能为空")
|
||||
@InEnum(CommonStatusEnum.class)
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
@ -1,33 +0,0 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.product.vo.product;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Schema(description = "管理后台 - 产品关联包装方案 Response VO")
|
||||
@Data
|
||||
public class ProductPackagingSchemeRespVO {
|
||||
|
||||
@Schema(description = "关联记录 ID", example = "1")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "包装方案 ID", example = "1")
|
||||
private Long packagingSchemeId;
|
||||
|
||||
@Schema(description = "包装方案名称", example = "标准包装方案")
|
||||
private String packagingSchemeName;
|
||||
|
||||
@Schema(description = "每包数量(件)", example = "100")
|
||||
private BigDecimal packageQuantity;
|
||||
|
||||
@Schema(description = "每托包数(包)", example = "20")
|
||||
private BigDecimal palletPackageQuantity;
|
||||
|
||||
@Schema(description = "每托总数量(件)", example = "2000")
|
||||
private BigDecimal palletTotalQuantity;
|
||||
|
||||
@Schema(description = "是否默认方案", example = "1")
|
||||
private Integer defaultStatus;
|
||||
|
||||
}
|
||||
@ -1,19 +0,0 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.product.vo.product;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Schema(description = "管理后台 - 产品关联包装方案 Request VO")
|
||||
@Data
|
||||
public class ProductPackagingSchemeSaveReqVO {
|
||||
|
||||
@Schema(description = "包装方案 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "包装方案 ID 不能为空")
|
||||
private Long packagingSchemeId;
|
||||
|
||||
@Schema(description = "是否默认方案", example = "1")
|
||||
private Integer defaultStatus;
|
||||
|
||||
}
|
||||
@ -1,22 +0,0 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.product.vo.product;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 产品关联供应商 Response VO")
|
||||
@Data
|
||||
public class ProductSupplierRespVO {
|
||||
|
||||
@Schema(description = "关联记录 ID", example = "1")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "供应商 ID", example = "1")
|
||||
private Long supplierId;
|
||||
|
||||
@Schema(description = "供应商名称", example = "默认供应商")
|
||||
private String supplierName;
|
||||
|
||||
@Schema(description = "是否默认供应商", example = "1")
|
||||
private Integer defaultStatus;
|
||||
|
||||
}
|
||||
@ -1,19 +0,0 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.product.vo.product;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Schema(description = "管理后台 - 产品关联供应商 Request VO")
|
||||
@Data
|
||||
public class ProductSupplierSaveReqVO {
|
||||
|
||||
@Schema(description = "供应商 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "供应商 ID 不能为空")
|
||||
private Long supplierId;
|
||||
|
||||
@Schema(description = "是否默认供应商", example = "1")
|
||||
private Integer defaultStatus;
|
||||
|
||||
}
|
||||
@ -1,28 +0,0 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.stock.enums;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.core.IntArrayValuable;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum ErpWarehouseCategoryEnum implements IntArrayValuable {
|
||||
|
||||
PRODUCT(1, "产品"),
|
||||
MATERIAL(2, "物料"),
|
||||
SPARE_PART(3, "备件"),
|
||||
OTHER(4, "其他");
|
||||
|
||||
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(ErpWarehouseCategoryEnum::getCategory).toArray();
|
||||
|
||||
private final Integer category;
|
||||
private final String name;
|
||||
|
||||
@Override
|
||||
public int[] array() {
|
||||
return ARRAYS;
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,45 +0,0 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.stock.vo.check;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - ERP 库存盘点单审核记录 Response VO")
|
||||
@Data
|
||||
public class ErpStockCheckApproveRecordRespVO {
|
||||
|
||||
@Schema(description = "编号", example = "1")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "盘点单编号", example = "1")
|
||||
private Long stockCheckId;
|
||||
|
||||
@Schema(description = "操作类型", example = "SUBMIT")
|
||||
private String actionType;
|
||||
|
||||
@Schema(description = "变更前状态", example = "0")
|
||||
private Integer fromStatus;
|
||||
|
||||
@Schema(description = "变更后状态", example = "10")
|
||||
private Integer toStatus;
|
||||
|
||||
@Schema(description = "目标审核人编号", example = "1")
|
||||
private Long targetUserId;
|
||||
|
||||
@Schema(description = "目标审核人名称", example = "李四")
|
||||
private String targetUserName;
|
||||
|
||||
@Schema(description = "备注", example = "请审核")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "操作人", example = "1")
|
||||
private String creator;
|
||||
|
||||
@Schema(description = "操作人名称", example = "张三")
|
||||
private String creatorName;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@ -1,23 +0,0 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.stock.vo.check;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Schema(description = "管理后台 - ERP 库存盘点单审核 Request VO")
|
||||
@Data
|
||||
public class ErpStockCheckAuditReqVO {
|
||||
|
||||
@Schema(description = "盘点编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "11756")
|
||||
@NotNull(message = "盘点编号不能为空")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "审核结果 20-通过 1-驳回", requiredMode = Schema.RequiredMode.REQUIRED, example = "20")
|
||||
@NotNull(message = "审核结果不能为空")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "审核备注", example = "审核通过")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@ -1,25 +0,0 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.stock.vo.check;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - ERP 库存盘点按仓库/库区生成盘点项 Request VO")
|
||||
@Data
|
||||
public class ErpStockCheckGenerateByLocationReqVO {
|
||||
|
||||
@Schema(description = "仓库编号列表", example = "[1,2]")
|
||||
private List<Long> warehouseIds;
|
||||
|
||||
@Schema(description = "库区编号列表", example = "[11,12]")
|
||||
private List<Long> areaIds;
|
||||
|
||||
@Schema(description = "是否允许为空库存,默认 true", example = "true")
|
||||
private Boolean allowEmpty = Boolean.TRUE;
|
||||
|
||||
public boolean validSelection() {
|
||||
return (warehouseIds != null && !warehouseIds.isEmpty()) || (areaIds != null && !areaIds.isEmpty());
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,20 +0,0 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.stock.vo.check;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - ERP 库存盘点按产品生成盘点项 Request VO")
|
||||
@Data
|
||||
public class ErpStockCheckGenerateByProductReqVO {
|
||||
|
||||
@Schema(description = "产品编号列表", requiredMode = Schema.RequiredMode.REQUIRED, example = "[1,2]")
|
||||
@NotEmpty(message = "产品编号列表不能为空")
|
||||
private List<Long> productIds;
|
||||
|
||||
@Schema(description = "是否允许为空库存,默认 true", example = "true")
|
||||
private Boolean allowEmpty = Boolean.TRUE;
|
||||
|
||||
}
|
||||
@ -1,22 +0,0 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.stock.vo.check;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Schema(description = "管理后台 - ERP 库存盘点单提交审核 Request VO")
|
||||
@Data
|
||||
public class ErpStockCheckSubmitReqVO {
|
||||
|
||||
@Schema(description = "盘点编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "11756")
|
||||
@NotNull(message = "盘点编号不能为空")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "审核人编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1888")
|
||||
private Long auditUserId;
|
||||
|
||||
@Schema(description = "提交备注", example = "请审核")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@ -1,50 +0,0 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.stock.vo.in;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - ERP 其它入库单审核记录 Response VO")
|
||||
@Data
|
||||
public class ErpStockInApproveRecordRespVO {
|
||||
|
||||
@Schema(description = "编号", example = "1")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "入库单编号", example = "1")
|
||||
private Long stockInId;
|
||||
|
||||
@Schema(description = "操作类型", example = "SUBMIT")
|
||||
private String actionType;
|
||||
|
||||
@Schema(description = "变更前状态", example = "0")
|
||||
private Integer fromStatus;
|
||||
|
||||
@Schema(description = "变更前状态名称", example = "待入库")
|
||||
private String fromStatusName;
|
||||
|
||||
@Schema(description = "变更后状态", example = "10")
|
||||
private Integer toStatus;
|
||||
|
||||
@Schema(description = "变更后状态名称", example = "已入库")
|
||||
private String toStatusName;
|
||||
|
||||
@Schema(description = "目标审核人编号", example = "1")
|
||||
private Long targetUserId;
|
||||
|
||||
@Schema(description = "目标审核人名称", example = "李四")
|
||||
private String targetUserName;
|
||||
|
||||
@Schema(description = "备注", example = "请审核")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "操作人", example = "1")
|
||||
private String creator;
|
||||
|
||||
@Schema(description = "操作人名称", example = "张三")
|
||||
private String creatorName;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
}
|
||||
@ -1,22 +0,0 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.stock.vo.in;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Schema(description = "管理后台 - ERP 其它入库单审核 Request VO")
|
||||
@Data
|
||||
public class ErpStockInAuditReqVO {
|
||||
|
||||
@Schema(description = "入库编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "11756")
|
||||
@NotNull(message = "入库编号不能为空")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "审核结果 20-通过 1-驳回", requiredMode = Schema.RequiredMode.REQUIRED, example = "20")
|
||||
@NotNull(message = "审核结果不能为空")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "审核备注", example = "审核通过")
|
||||
private String remark;
|
||||
}
|
||||
@ -1,21 +0,0 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.stock.vo.in;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Schema(description = "管理后台 - ERP 其它入库单提交审核 Request VO")
|
||||
@Data
|
||||
public class ErpStockInSubmitReqVO {
|
||||
|
||||
@Schema(description = "入库编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "11756")
|
||||
@NotNull(message = "入库编号不能为空")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "审核人编号", example = "1888")
|
||||
private Long auditUserId;
|
||||
|
||||
@Schema(description = "提交备注", example = "请审核")
|
||||
private String remark;
|
||||
}
|
||||
@ -1,50 +0,0 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.stock.vo.out;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - ERP 其它出库单审核记录 Response VO")
|
||||
@Data
|
||||
public class ErpStockOutApproveRecordRespVO {
|
||||
|
||||
@Schema(description = "编号", example = "1")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "出库单编号", example = "1")
|
||||
private Long stockOutId;
|
||||
|
||||
@Schema(description = "操作类型", example = "SUBMIT")
|
||||
private String actionType;
|
||||
|
||||
@Schema(description = "变更前状态", example = "0")
|
||||
private Integer fromStatus;
|
||||
|
||||
@Schema(description = "变更前状态名称", example = "待出库")
|
||||
private String fromStatusName;
|
||||
|
||||
@Schema(description = "变更后状态", example = "10")
|
||||
private Integer toStatus;
|
||||
|
||||
@Schema(description = "变更后状态名称", example = "已出库")
|
||||
private String toStatusName;
|
||||
|
||||
@Schema(description = "目标审核人编号", example = "1")
|
||||
private Long targetUserId;
|
||||
|
||||
@Schema(description = "目标审核人名称", example = "李四")
|
||||
private String targetUserName;
|
||||
|
||||
@Schema(description = "备注", example = "请审核")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "操作人", example = "1")
|
||||
private String creator;
|
||||
|
||||
@Schema(description = "操作人名称", example = "张三")
|
||||
private String creatorName;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
}
|
||||
@ -1,22 +0,0 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.stock.vo.out;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Schema(description = "管理后台 - ERP 其它出库单审核 Request VO")
|
||||
@Data
|
||||
public class ErpStockOutAuditReqVO {
|
||||
|
||||
@Schema(description = "出库编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "11756")
|
||||
@NotNull(message = "出库编号不能为空")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "审核结果 20-通过 1-驳回", requiredMode = Schema.RequiredMode.REQUIRED, example = "20")
|
||||
@NotNull(message = "审核结果不能为空")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "审核备注", example = "审核通过")
|
||||
private String remark;
|
||||
}
|
||||
@ -1,52 +0,0 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.stock.vo.out;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.validation.InEnum;
|
||||
import cn.iocoder.yudao.module.erp.enums.ErpStockOutUsageTypeEnum;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Schema(description = "ERP 其它出库单明细项")
|
||||
@Data
|
||||
public class ErpStockOutSaveReqVOItem {
|
||||
|
||||
@Schema(description = "出库项编号", example = "11756")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "模具组 id", example = "101")
|
||||
private Long moldSetId;
|
||||
|
||||
@Schema(description = "仓库编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "3113")
|
||||
private Long warehouseId;
|
||||
|
||||
@Schema(description = "库区编号", example = "1")
|
||||
private Long areaId;
|
||||
|
||||
@Schema(description = "产品 id", example = "3113")
|
||||
private Long productId;
|
||||
|
||||
@Schema(description = "产品单价", example = "100.00")
|
||||
private BigDecimal productPrice;
|
||||
|
||||
@Schema(description = "产品数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "100.00")
|
||||
private BigDecimal count;
|
||||
|
||||
@Schema(description = "出库用途", example = "1")
|
||||
@InEnum(ErpStockOutUsageTypeEnum.class)
|
||||
@NotNull(message = "出库用途不能为空")
|
||||
private Integer outUsageType;
|
||||
|
||||
@Schema(description = "维修单编号", example = "1001")
|
||||
private Long repairId;
|
||||
|
||||
@Schema(description = "维修单设备编号", example = "2001")
|
||||
private Long repairDeviceId;
|
||||
|
||||
@Schema(description = "保养单编号", example = "3001")
|
||||
private Long maintenanceId;
|
||||
|
||||
@Schema(description = "备注", example = "备注信息")
|
||||
private String remark;
|
||||
}
|
||||
@ -1,21 +0,0 @@
|
||||
package cn.iocoder.yudao.module.erp.controller.admin.stock.vo.out;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Schema(description = "管理后台 - ERP 其它出库单提交审核 Request VO")
|
||||
@Data
|
||||
public class ErpStockOutSubmitReqVO {
|
||||
|
||||
@Schema(description = "出库编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "11756")
|
||||
@NotNull(message = "出库编号不能为空")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "审核人编号", example = "1888")
|
||||
private Long auditUserId;
|
||||
|
||||
@Schema(description = "提交备注", example = "请审核")
|
||||
private String remark;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue