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:
+16
-3
@@ -1,8 +1,7 @@
|
||||
package com.cf.imes.module.executor.controller.admin.order;
|
||||
|
||||
import com.cf.imes.module.executor.controller.admin.order.vo.order.OrderPageReqVO;
|
||||
import com.cf.imes.module.executor.controller.admin.order.vo.order.OrderRespVO;
|
||||
import com.cf.imes.module.executor.controller.admin.order.vo.order.OrderSaveReqVO;
|
||||
import com.cf.imes.module.executor.controller.admin.order.vo.order.*;
|
||||
import io.swagger.v3.oas.annotations.Parameters;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.util.ResourceUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -40,6 +39,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
|
||||
@@ -147,4 +148,16 @@ public class OrderController {
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping("/import")
|
||||
@Operation(summary = "导入生产单")
|
||||
@Parameters({
|
||||
@Parameter(name = "file", description = "Excel 文件", required = true),
|
||||
@Parameter(name = "updateSupport", description = "是否支持更新,默认为 false", example = "true")
|
||||
})
|
||||
@PreAuthorize("@ss.hasPermission('system:user:import')")
|
||||
public CommonResult<OrderImportRespVO> importExcel(@RequestParam("file") MultipartFile file,
|
||||
@RequestParam(value = "updateSupport", required = false, defaultValue = "false") Boolean updateSupport) throws Exception {
|
||||
List<OrderImportExcelVO> list = ExcelUtils.read(file, OrderImportExcelVO.class);
|
||||
return success(orderService.importOrderList(list, updateSupport));
|
||||
}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package com.cf.imes.module.executor.controller.admin.order.vo.order;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
/**
|
||||
* @projectName: cf_imes_server
|
||||
* @author: 晨丰科技
|
||||
* @date: 2024/3/6 10:01
|
||||
*/
|
||||
@Schema(description = "管理后台 - 生产单表 order_{N}新增/修改 Request VO")
|
||||
@Data
|
||||
public class OrderImportExcelVO {
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
package com.cf.imes.module.executor.controller.admin.order.vo.order;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @projectName: cf_imes_server
|
||||
* @author: 晨丰科技
|
||||
* @date: 2024/3/6 10:03
|
||||
*/
|
||||
@Schema(description = "管理后台 - 生产单导入 Response VO")
|
||||
@Data
|
||||
@Builder
|
||||
public class OrderImportRespVO {
|
||||
@Schema(description = "创建成功的生产单名数组", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private List<String> createUsernames;
|
||||
|
||||
@Schema(description = "更新成功的生产单名数组", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private List<String> updateUsernames;
|
||||
|
||||
@Schema(description = "导入失败的生产单集合,key 为生产单名,value 为失败原因", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Map<String, String> failureUsernames;
|
||||
}
|
||||
+2
@@ -1,6 +1,8 @@
|
||||
package com.cf.imes.module.executor.controller.admin.order.vo.order;
|
||||
|
||||
import lombok.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.cf.imes.framework.common.pojo.PageParam;
|
||||
|
||||
+2
@@ -2,6 +2,8 @@ package com.cf.imes.module.executor.controller.admin.order.vo.order;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
+2
@@ -2,6 +2,8 @@ package com.cf.imes.module.executor.controller.admin.order.vo.order;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ public class PlatePageReqVO extends PageParam {
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "商品 ID", example = "28756")
|
||||
private Long goodsId;
|
||||
private String goodsId;
|
||||
|
||||
@Schema(description = "宽度")
|
||||
private Double width;
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ import com.cf.imes.framework.mybatis.core.dataobject.BaseDO;
|
||||
*
|
||||
* @author 晨丰科技
|
||||
*/
|
||||
@TableName("order")
|
||||
@TableName("`order`")
|
||||
@KeySequence("order_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
|
||||
+5
-1
@@ -46,6 +46,10 @@ public class PlateDO extends BaseDO {
|
||||
* 板名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 自定义板编号,设计有板编号,则保留设计板编号;设计没有且在机台设置中设置了自定义板编号规则,则按规则自动生成
|
||||
*/
|
||||
private String plateNo;
|
||||
/**
|
||||
* 板类型,0 层板 1 立板 2 背板
|
||||
*/
|
||||
@@ -53,7 +57,7 @@ public class PlateDO extends BaseDO {
|
||||
/**
|
||||
* 商品 ID
|
||||
*/
|
||||
private Long goodsId;
|
||||
private String goodsId;
|
||||
/**
|
||||
* 宽度
|
||||
*/
|
||||
|
||||
+3
-2
@@ -8,7 +8,7 @@ import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.cf.imes.framework.common.pojo.PageResult;
|
||||
import com.cf.imes.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.cf.imes.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.cf.imes.module.executor.controller.admin.plan.vo.OrderPageReqVO;
|
||||
import com.cf.imes.module.executor.controller.admin.order.vo.order.OrderPageReqVO;
|
||||
import com.cf.imes.module.executor.controller.admin.plan.vo.OrderRespVO;
|
||||
import com.cf.imes.module.executor.dal.dataobject.order.OrderDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
@@ -22,7 +22,7 @@ import org.apache.ibatis.annotations.Param;
|
||||
@Mapper
|
||||
public interface OrderMapper extends BaseMapperX<OrderDO> {
|
||||
|
||||
default PageResult<OrderDO> selectPage(com.cf.imes.module.executor.controller.admin.order.vo.order.OrderPageReqVO reqVO) {
|
||||
default PageResult<OrderDO> selectPage(OrderPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<OrderDO>()
|
||||
.eqIfPresent(OrderDO::getParentNo, reqVO.getParentNo())
|
||||
.betweenIfPresent(OrderDO::getDeliveryDate, reqVO.getDeliveryDate())
|
||||
@@ -43,5 +43,6 @@ public interface OrderMapper extends BaseMapperX<OrderDO> {
|
||||
.orderByDesc(OrderDO::getId));
|
||||
}
|
||||
|
||||
|
||||
IPage<OrderRespVO> selectOrderPage(@Param("page") IPage page, @Param(Constants.WRAPPER) Wrapper<OrderDO> wrapper);
|
||||
}
|
||||
|
||||
+12
@@ -2,11 +2,15 @@ package com.cf.imes.module.executor.service.order;
|
||||
|
||||
import javax.validation.*;
|
||||
|
||||
import com.cf.imes.module.executor.controller.admin.order.vo.order.OrderImportExcelVO;
|
||||
import com.cf.imes.module.executor.controller.admin.order.vo.order.OrderImportRespVO;
|
||||
import com.cf.imes.module.executor.controller.admin.order.vo.order.OrderPageReqVO;
|
||||
import com.cf.imes.module.executor.controller.admin.order.vo.order.OrderSaveReqVO;
|
||||
import com.cf.imes.module.executor.dal.dataobject.order.OrderDO;
|
||||
import com.cf.imes.framework.common.pojo.PageResult;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 生产单表 order_{N} Service 接口
|
||||
*
|
||||
@@ -52,4 +56,12 @@ public interface OrderService {
|
||||
*/
|
||||
PageResult<OrderDO> getOrderPage(OrderPageReqVO pageReqVO);
|
||||
|
||||
/**
|
||||
* 批量导入用户
|
||||
*
|
||||
* @param importOrders 导入用户列表
|
||||
* @param isUpdateSupport 是否支持更新
|
||||
* @return 导入结果
|
||||
*/
|
||||
OrderImportRespVO importOrderList(List<OrderImportExcelVO> importOrders, Boolean isUpdateSupport);
|
||||
}
|
||||
+7
@@ -2,6 +2,8 @@ package com.cf.imes.module.executor.service.order;
|
||||
|
||||
import com.cf.imes.framework.common.enums.CommonStatusEnum;
|
||||
import com.cf.imes.framework.excel.core.util.ExcelUtils;
|
||||
import com.cf.imes.module.executor.controller.admin.order.vo.order.OrderImportExcelVO;
|
||||
import com.cf.imes.module.executor.controller.admin.order.vo.order.OrderImportRespVO;
|
||||
import com.cf.imes.module.executor.controller.admin.order.vo.order.OrderPageReqVO;
|
||||
import com.cf.imes.module.executor.controller.admin.order.vo.order.OrderSaveReqVO;
|
||||
import com.cf.imes.module.system.enums.common.SexEnum;
|
||||
@@ -86,4 +88,9 @@ public class OrderServiceImpl implements OrderService {
|
||||
return orderMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public OrderImportRespVO importOrderList(List<OrderImportExcelVO> importOrders, Boolean isUpdateSupport) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
+1
@@ -4,6 +4,7 @@ package com.cf.imes.module.executor.util;
|
||||
* @projectName: cf_imes_back
|
||||
* @author: 晨丰科技
|
||||
* @date: 2024/3/5 10:55
|
||||
* 生产单id创建
|
||||
*/
|
||||
public class IdGenerator {
|
||||
private static final long START_TIMESTAMP = 1613203200000L; // 设置起始时间戳为2021-02-13 00:00:00
|
||||
|
||||
+5
-4
@@ -9,6 +9,7 @@ import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
@@ -100,10 +101,10 @@ public class PlateController {
|
||||
public void importTemplate(HttpServletResponse response) throws IOException {
|
||||
// 手动创建导出 demo
|
||||
List<PlateImportExcelVO> list = Arrays.asList(
|
||||
PlateImportExcelVO.builder().goodsId(Long.parseLong("23112371")).goodsName("xixih").material("颗粒板").width(1212.3)
|
||||
.thickness(0.2).price(33333.2).brand("SexEnum.MALE.getSex()").spec("大厂").remark("测试").build(),
|
||||
PlateImportExcelVO.builder().goodsId(Long.parseLong("23112372")).goodsName("2L").material("yuanma@cf.com").width(21.6)
|
||||
.thickness(5.3).price(333.555).brand("kkkkkk").spec("大厂").remark("测试").build()
|
||||
PlateImportExcelVO.builder().goodsId("SP1123456").goodsName("xixih").material("颗粒板").width(BigDecimal.valueOf(1212.3)).height(BigDecimal.valueOf(12131.6))
|
||||
.thickness(BigDecimal.valueOf(0.2)).price(33333.2).brand("SexEnum.MALE.getSex()").spec("大厂").remark("测试").build(),
|
||||
PlateImportExcelVO.builder().goodsId("SP1123457").goodsName("2L").material("yuanma@cf.com").width(BigDecimal.valueOf(21.6)).height(BigDecimal.valueOf(123231.6))
|
||||
.thickness(BigDecimal.valueOf(5.3)).price(333.555).brand("kkkkkk").spec("大厂").remark("测试").build()
|
||||
);
|
||||
// 输出
|
||||
ExcelUtils.write(response, "板材导入模板.xls", "板材列表", PlateImportExcelVO.class, list);
|
||||
|
||||
+8
-3
@@ -4,12 +4,14 @@ import com.cf.imes.framework.excel.core.annotations.DictFormat;
|
||||
import com.cf.imes.framework.excel.core.convert.DictConvert;
|
||||
import com.cf.imes.module.system.enums.DictTypeConstants;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
@@ -23,7 +25,7 @@ import java.time.LocalDateTime;
|
||||
public class PlateImportExcelVO {
|
||||
|
||||
@ExcelProperty("客户的商品编号")
|
||||
private Long goodsId;
|
||||
private String goodsId;
|
||||
|
||||
@ExcelProperty("商品名称")
|
||||
private String goodsName;
|
||||
@@ -35,10 +37,13 @@ public class PlateImportExcelVO {
|
||||
private String color;
|
||||
|
||||
@ExcelProperty("宽度")
|
||||
private Double width;
|
||||
private BigDecimal width;
|
||||
|
||||
@ExcelProperty("高度")
|
||||
private BigDecimal height;
|
||||
|
||||
@ExcelProperty("厚度")
|
||||
private Double thickness;
|
||||
private BigDecimal thickness;
|
||||
|
||||
@ExcelProperty("价格")
|
||||
private Double price;
|
||||
|
||||
+10
-8
@@ -1,6 +1,8 @@
|
||||
package com.cf.imes.module.manage.controller.admin.plate.vo.plate;
|
||||
|
||||
import lombok.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.cf.imes.framework.common.pojo.PageParam;
|
||||
@@ -15,10 +17,10 @@ import static com.cf.imes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH
|
||||
@ToString(callSuper = true)
|
||||
public class PlatePageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "客户的商品编号", example = "9822")
|
||||
private Long goodsId;
|
||||
@Schema(description = "客户的商品编号", example = "1")
|
||||
private String goodsId;
|
||||
|
||||
@Schema(description = "商品名称", example = "李四")
|
||||
@Schema(description = "商品名称", example = "赵六")
|
||||
private String goodsName;
|
||||
|
||||
@Schema(description = "材质:颗粒板、欧松板、多层板、生态板、禾香板、密度板、实木、铝蜂窝板、铝塑板")
|
||||
@@ -28,15 +30,15 @@ public class PlatePageReqVO extends PageParam {
|
||||
private String color;
|
||||
|
||||
@Schema(description = "宽度")
|
||||
private Double width;
|
||||
private BigDecimal width;
|
||||
|
||||
@Schema(description = "高度")
|
||||
private Double height;
|
||||
private BigDecimal height;
|
||||
|
||||
@Schema(description = "厚度")
|
||||
private Double thickness;
|
||||
private BigDecimal thickness;
|
||||
|
||||
@Schema(description = "价格", example = "20204")
|
||||
@Schema(description = "价格", example = "3380")
|
||||
private Double price;
|
||||
|
||||
@Schema(description = "品牌")
|
||||
@@ -45,7 +47,7 @@ public class PlatePageReqVO extends PageParam {
|
||||
@Schema(description = "规格")
|
||||
private String spec;
|
||||
|
||||
@Schema(description = "备注", example = "你猜")
|
||||
@Schema(description = "备注", example = "随便")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
|
||||
+11
-9
@@ -2,6 +2,8 @@ package com.cf.imes.module.manage.controller.admin.plate.vo.plate;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
@@ -13,15 +15,15 @@ import com.alibaba.excel.annotation.*;
|
||||
@ExcelIgnoreUnannotated
|
||||
public class PlateRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "4399")
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@ExcelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "客户的商品编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "9822")
|
||||
@Schema(description = "客户的商品编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@ExcelProperty("客户的商品编号")
|
||||
private Long goodsId;
|
||||
private String goodsId;
|
||||
|
||||
@Schema(description = "商品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
|
||||
@Schema(description = "商品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
|
||||
@ExcelProperty("商品名称")
|
||||
private String goodsName;
|
||||
|
||||
@@ -35,17 +37,17 @@ public class PlateRespVO {
|
||||
|
||||
@Schema(description = "宽度", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("宽度")
|
||||
private Double width;
|
||||
private BigDecimal width;
|
||||
|
||||
@Schema(description = "高度", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("高度")
|
||||
private Double height;
|
||||
private BigDecimal height;
|
||||
|
||||
@Schema(description = "厚度", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("厚度")
|
||||
private Double thickness;
|
||||
private BigDecimal thickness;
|
||||
|
||||
@Schema(description = "价格", requiredMode = Schema.RequiredMode.REQUIRED, example = "20204")
|
||||
@Schema(description = "价格", requiredMode = Schema.RequiredMode.REQUIRED, example = "3380")
|
||||
@ExcelProperty("价格")
|
||||
private Double price;
|
||||
|
||||
@@ -57,7 +59,7 @@ public class PlateRespVO {
|
||||
@ExcelProperty("规格")
|
||||
private String spec;
|
||||
|
||||
@Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "你猜")
|
||||
@Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "随便")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
+11
-10
@@ -4,19 +4,20 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Schema(description = "管理后台 - 板材信息表 plate_{N}新增/修改 Request VO")
|
||||
@Data
|
||||
public class PlateSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "4399")
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "客户的商品编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "9822")
|
||||
@NotNull(message = "客户的商品编号不能为空")
|
||||
private Long goodsId;
|
||||
@Schema(description = "客户的商品编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotEmpty(message = "客户的商品编号不能为空")
|
||||
private String goodsId;
|
||||
|
||||
@Schema(description = "商品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
|
||||
@Schema(description = "商品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
|
||||
@NotEmpty(message = "商品名称不能为空")
|
||||
private String goodsName;
|
||||
|
||||
@@ -30,17 +31,17 @@ public class PlateSaveReqVO {
|
||||
|
||||
@Schema(description = "宽度", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "宽度不能为空")
|
||||
private Double width;
|
||||
private BigDecimal width;
|
||||
|
||||
@Schema(description = "高度", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "高度不能为空")
|
||||
private Double height;
|
||||
private BigDecimal height;
|
||||
|
||||
@Schema(description = "厚度", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "厚度不能为空")
|
||||
private Double thickness;
|
||||
private BigDecimal thickness;
|
||||
|
||||
@Schema(description = "价格", requiredMode = Schema.RequiredMode.REQUIRED, example = "20204")
|
||||
@Schema(description = "价格", requiredMode = Schema.RequiredMode.REQUIRED, example = "3380")
|
||||
@NotNull(message = "价格不能为空")
|
||||
private Double price;
|
||||
|
||||
@@ -52,7 +53,7 @@ public class PlateSaveReqVO {
|
||||
@NotEmpty(message = "规格不能为空")
|
||||
private String spec;
|
||||
|
||||
@Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "你猜")
|
||||
@Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "随便")
|
||||
@NotEmpty(message = "备注不能为空")
|
||||
private String remark;
|
||||
|
||||
|
||||
+13
-11
@@ -4,6 +4,8 @@ import lombok.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.cf.imes.framework.common.pojo.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.cf.imes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
@@ -14,19 +16,19 @@ import static com.cf.imes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH
|
||||
@ToString(callSuper = true)
|
||||
public class RemainPlatePageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "排单 ID", example = "9338")
|
||||
@Schema(description = "排单 ID", example = "16628")
|
||||
private Long planId;
|
||||
|
||||
@Schema(description = "初始排单 ID", example = "20444")
|
||||
@Schema(description = "初始排单 ID", example = "6628")
|
||||
private Long initPlanId;
|
||||
|
||||
@Schema(description = "余料板状态,0未使用,1使用中,2已使用", example = "2")
|
||||
@Schema(description = "余料板状态,0未使用,1使用中,2已使用", example = "1")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "商品 ID", example = "5748")
|
||||
private Long goodsId;
|
||||
@Schema(description = "商品 ID", example = "7425")
|
||||
private String goodsId;
|
||||
|
||||
@Schema(description = "商品名", example = "李四")
|
||||
@Schema(description = "商品名", example = "晨丰")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "材料")
|
||||
@@ -36,13 +38,13 @@ public class RemainPlatePageReqVO extends PageParam {
|
||||
private String color;
|
||||
|
||||
@Schema(description = "宽度")
|
||||
private Double width;
|
||||
private BigDecimal width;
|
||||
|
||||
@Schema(description = "长度")
|
||||
private Double length;
|
||||
private BigDecimal length;
|
||||
|
||||
@Schema(description = "厚度")
|
||||
private Double thickness;
|
||||
private BigDecimal thickness;
|
||||
|
||||
@Schema(description = "品牌")
|
||||
private String brand;
|
||||
@@ -53,10 +55,10 @@ public class RemainPlatePageReqVO extends PageParam {
|
||||
@Schema(description = "仓库名")
|
||||
private String store;
|
||||
|
||||
@Schema(description = "数量", example = "24524")
|
||||
@Schema(description = "数量", example = "18318")
|
||||
private Integer count;
|
||||
|
||||
@Schema(description = "备注", example = "你猜")
|
||||
@Schema(description = "备注", example = "随便")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "轮廊数据,Json 串")
|
||||
|
||||
+13
-12
@@ -3,6 +3,7 @@ package com.cf.imes.module.manage.controller.admin.plate.vo.remain;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@@ -11,27 +12,27 @@ import com.alibaba.excel.annotation.*;
|
||||
@ExcelIgnoreUnannotated
|
||||
public class RemainPlateRespVO {
|
||||
|
||||
@Schema(description = "余料板 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "349")
|
||||
@Schema(description = "余料板 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "16470")
|
||||
@ExcelProperty("余料板 ID")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "排单 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "9338")
|
||||
@Schema(description = "排单 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "16628")
|
||||
@ExcelProperty("排单 ID")
|
||||
private Long planId;
|
||||
|
||||
@Schema(description = "初始排单 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "20444")
|
||||
@Schema(description = "初始排单 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "6628")
|
||||
@ExcelProperty("初始排单 ID")
|
||||
private Long initPlanId;
|
||||
|
||||
@Schema(description = "余料板状态,0未使用,1使用中,2已使用", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@Schema(description = "余料板状态,0未使用,1使用中,2已使用", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@ExcelProperty("余料板状态,0未使用,1使用中,2已使用")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "商品 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "5748")
|
||||
@Schema(description = "商品 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "7425")
|
||||
@ExcelProperty("商品 ID")
|
||||
private Long goodsId;
|
||||
private String goodsId;
|
||||
|
||||
@Schema(description = "商品名", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
|
||||
@Schema(description = "商品名", requiredMode = Schema.RequiredMode.REQUIRED, example = "晨丰")
|
||||
@ExcelProperty("商品名")
|
||||
private String name;
|
||||
|
||||
@@ -45,15 +46,15 @@ public class RemainPlateRespVO {
|
||||
|
||||
@Schema(description = "宽度", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("宽度")
|
||||
private Double width;
|
||||
private BigDecimal width;
|
||||
|
||||
@Schema(description = "长度", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("长度")
|
||||
private Double length;
|
||||
private BigDecimal length;
|
||||
|
||||
@Schema(description = "厚度", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("厚度")
|
||||
private Double thickness;
|
||||
private BigDecimal thickness;
|
||||
|
||||
@Schema(description = "品牌", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("品牌")
|
||||
@@ -67,11 +68,11 @@ public class RemainPlateRespVO {
|
||||
@ExcelProperty("仓库名")
|
||||
private String store;
|
||||
|
||||
@Schema(description = "数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "24524")
|
||||
@Schema(description = "数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "18318")
|
||||
@ExcelProperty("数量")
|
||||
private Integer count;
|
||||
|
||||
@Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "你猜")
|
||||
@Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "随便")
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
+14
-13
@@ -4,31 +4,32 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Schema(description = "管理后台 - 生产单余料板表 order_remain_plate_{N}新增/修改 Request VO")
|
||||
@Data
|
||||
public class RemainPlateSaveReqVO {
|
||||
|
||||
@Schema(description = "余料板 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "349")
|
||||
@Schema(description = "余料板 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "16470")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "排单 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "9338")
|
||||
@Schema(description = "排单 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "16628")
|
||||
@NotNull(message = "排单 ID不能为空")
|
||||
private Long planId;
|
||||
|
||||
@Schema(description = "初始排单 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "20444")
|
||||
@Schema(description = "初始排单 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "6628")
|
||||
@NotNull(message = "初始排单 ID不能为空")
|
||||
private Long initPlanId;
|
||||
|
||||
@Schema(description = "余料板状态,0未使用,1使用中,2已使用", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@Schema(description = "余料板状态,0未使用,1使用中,2已使用", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "余料板状态,0未使用,1使用中,2已使用不能为空")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "商品 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "5748")
|
||||
@NotNull(message = "商品 ID不能为空")
|
||||
private Long goodsId;
|
||||
@Schema(description = "商品 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "7425")
|
||||
@NotEmpty(message = "商品 ID不能为空")
|
||||
private String goodsId;
|
||||
|
||||
@Schema(description = "商品名", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
|
||||
@Schema(description = "商品名", requiredMode = Schema.RequiredMode.REQUIRED, example = "晨丰")
|
||||
@NotEmpty(message = "商品名不能为空")
|
||||
private String name;
|
||||
|
||||
@@ -42,15 +43,15 @@ public class RemainPlateSaveReqVO {
|
||||
|
||||
@Schema(description = "宽度", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "宽度不能为空")
|
||||
private Double width;
|
||||
private BigDecimal width;
|
||||
|
||||
@Schema(description = "长度", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "长度不能为空")
|
||||
private Double length;
|
||||
private BigDecimal length;
|
||||
|
||||
@Schema(description = "厚度", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "厚度不能为空")
|
||||
private Double thickness;
|
||||
private BigDecimal thickness;
|
||||
|
||||
@Schema(description = "品牌", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "品牌不能为空")
|
||||
@@ -64,11 +65,11 @@ public class RemainPlateSaveReqVO {
|
||||
@NotEmpty(message = "仓库名不能为空")
|
||||
private String store;
|
||||
|
||||
@Schema(description = "数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "24524")
|
||||
@Schema(description = "数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "18318")
|
||||
@NotNull(message = "数量不能为空")
|
||||
private Integer count;
|
||||
|
||||
@Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "你猜")
|
||||
@Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "随便")
|
||||
@NotEmpty(message = "备注不能为空")
|
||||
private String remark;
|
||||
|
||||
|
||||
+7
-5
@@ -1,6 +1,8 @@
|
||||
package com.cf.imes.module.manage.dal.dataobject.plate;
|
||||
|
||||
import lombok.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
@@ -12,7 +14,7 @@ import com.cf.imes.framework.mybatis.core.dataobject.BaseDO;
|
||||
*
|
||||
* @author 晨丰科技
|
||||
*/
|
||||
@TableName("plate_n")
|
||||
@TableName("plate")
|
||||
@KeySequence("plate_n_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@@ -30,7 +32,7 @@ public class PlateDO extends BaseDO {
|
||||
/**
|
||||
* 客户的商品编号
|
||||
*/
|
||||
private Long goodsId;
|
||||
private String goodsId;
|
||||
/**
|
||||
* 商品名称
|
||||
*/
|
||||
@@ -46,15 +48,15 @@ public class PlateDO extends BaseDO {
|
||||
/**
|
||||
* 宽度
|
||||
*/
|
||||
private Double width;
|
||||
private BigDecimal width;
|
||||
/**
|
||||
* 高度
|
||||
*/
|
||||
private Double height;
|
||||
private BigDecimal height;
|
||||
/**
|
||||
* 厚度
|
||||
*/
|
||||
private Double thickness;
|
||||
private BigDecimal thickness;
|
||||
/**
|
||||
* 价格
|
||||
*/
|
||||
|
||||
+7
-5
@@ -4,12 +4,14 @@ import lombok.*;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.cf.imes.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 生产单余料板表 order_remain_plate_{N} DO
|
||||
*
|
||||
* @author 晨丰科技
|
||||
*/
|
||||
@TableName("order_remain_plate_n")
|
||||
@TableName("order_remain_plate")
|
||||
@KeySequence("order_remain_plate_n_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@@ -39,7 +41,7 @@ public class RemainPlateDO extends BaseDO {
|
||||
/**
|
||||
* 商品 ID
|
||||
*/
|
||||
private Long goodsId;
|
||||
private String goodsId;
|
||||
/**
|
||||
* 商品名
|
||||
*/
|
||||
@@ -55,15 +57,15 @@ public class RemainPlateDO extends BaseDO {
|
||||
/**
|
||||
* 宽度
|
||||
*/
|
||||
private Double width;
|
||||
private BigDecimal width;
|
||||
/**
|
||||
* 长度
|
||||
*/
|
||||
private Double length;
|
||||
private BigDecimal length;
|
||||
/**
|
||||
* 厚度
|
||||
*/
|
||||
private Double thickness;
|
||||
private BigDecimal thickness;
|
||||
/**
|
||||
* 品牌
|
||||
*/
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
@Mapper
|
||||
public interface PlateMapper extends BaseMapperX<PlateDO> {
|
||||
|
||||
default PlateDO selectByGoodID(Long goodId) {
|
||||
default PlateDO selectByGoodID(String goodId) {
|
||||
return selectOne(PlateDO::getGoodsId, goodId);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user