mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 12:52:07 +08:00
no message
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
@@ -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)
|
||||
|
||||
+4
@@ -46,6 +46,10 @@ public class PlateDO extends BaseDO {
|
||||
* 板名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 自定义板编号,设计有板编号,则保留设计板编号;设计没有且在机台设置中设置了自定义板编号规则,则按规则自动生成
|
||||
*/
|
||||
private String plateNo;
|
||||
/**
|
||||
* 板类型,0 层板 1 立板 2 背板
|
||||
*/
|
||||
|
||||
+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);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -44,7 +44,7 @@ public class ProcessController {
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "新建工序信息")
|
||||
@PreAuthorize("@ss.hasPermission('system:process:create')")
|
||||
public CommonResult<Long> createProcess(@Valid @RequestBody ProcessSaveReqVO createReqVO) {
|
||||
public CommonResult<Long> createProcess(@Valid @RequestBody ProcessUserSaveReqVO createReqVO) {
|
||||
return success(processService.createProcess(createReqVO));
|
||||
}
|
||||
|
||||
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
package com.cf.imes.module.system.controller.admin.process.vo.process;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Schema(description = "管理后台 - 工序信息 process新增/修改 Request VO")
|
||||
@Data
|
||||
@Valid
|
||||
public class ProcessUserSaveReqVO {
|
||||
@Schema(description = "工序 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "161")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "工序名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
|
||||
@NotEmpty(message = "工序名称不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "计件工资", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "计件工资不能为空")
|
||||
private Double pieceRate;
|
||||
|
||||
@Schema(description = "计件类型:1 数量 2 长度 3 平方 4 宽 5 高 6 体积 7 生产单金额百分比", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "计件类型:1 数量 2 长度 3 平方 4 宽 5 高 6 体积 7 生产单金额百分比不能为空")
|
||||
private Integer pieceType;
|
||||
|
||||
@Schema(description = "工序类型:0 全部加工 1 开料 2 部件加工 3 异形封边 4 分堆 5 打包 6 出库 7 组件加工 8 板材", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "工序类型:0 全部加工 1 开料 2 部件加工 3 异形封边 4 分堆 5 打包 6 出库 7 组件加工 8 板材不能为空")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "是否推送终端客户:0 否 1 是", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "是否推送终端客户:0 否 1 是不能为空")
|
||||
private Boolean isCustom;
|
||||
|
||||
@Schema(description = "是否推送经销商:0 否 1 是", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "是否推送经销商:0 否 1 是不能为空")
|
||||
private Boolean isDealer;
|
||||
|
||||
@Schema(description = "排序优先级", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "排序优先级不能为空")
|
||||
private Short sort;
|
||||
|
||||
@Schema(description = "小时产量", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "小时产量不能为空")
|
||||
private Double hourCapacity;
|
||||
|
||||
@Schema(description = "单位", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "单位不能为空")
|
||||
private String unit;
|
||||
|
||||
@Schema(description = "是否启用:0 否 1 是", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "是否启用:0 否 1 是不能为空")
|
||||
private Boolean isEnabled;
|
||||
|
||||
@Schema(description = "准备时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "准备时间不能为空")
|
||||
private Double prepareTime;
|
||||
|
||||
@Schema(description = "描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "你说的对")
|
||||
@NotEmpty(message = "描述不能为空")
|
||||
private String description;
|
||||
|
||||
@Schema(description = "用户ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "你说的对")
|
||||
@NotEmpty(message = "用户ID不能为空")
|
||||
private String Users;
|
||||
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
package com.cf.imes.module.system.controller.admin.process.vo.processUser;
|
||||
|
||||
import lombok.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.cf.imes.framework.common.pojo.PageParam;
|
||||
|
||||
@Schema(description = "管理后台 - 工序用户表 process_user分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class ProcessUserPageReqVO extends PageParam {
|
||||
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package com.cf.imes.module.system.controller.admin.process.vo.processUser;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 工序用户表 process_user Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class ProcessUserRespVO {
|
||||
|
||||
@Schema(description = "工序 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "22658")
|
||||
@ExcelProperty("工序 ID")
|
||||
private Long processId;
|
||||
|
||||
@Schema(description = "用户 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "11525")
|
||||
@ExcelProperty("用户 ID")
|
||||
private Long userId;
|
||||
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
package com.cf.imes.module.system.controller.admin.process.vo.processUser;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
@Schema(description = "管理后台 - 工序用户表 process_user新增/修改 Request VO")
|
||||
@Data
|
||||
public class ProcessUserSaveReqVO {
|
||||
|
||||
@Schema(description = "组织 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "24616")
|
||||
private Long organId;
|
||||
|
||||
@Schema(description = "工序 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "22658")
|
||||
private Long processId;
|
||||
|
||||
@Schema(description = "用户 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "11525")
|
||||
private Long userId;
|
||||
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
package com.cf.imes.module.system.dal.dataobject.process;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.cf.imes.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 工序用户表 process_user DO
|
||||
*
|
||||
* @author 晨丰科技
|
||||
*/
|
||||
@TableName("process_user")
|
||||
@KeySequence("process_user_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ProcessUserDO {
|
||||
|
||||
/**
|
||||
* 工序 ID
|
||||
*/
|
||||
// @TableId
|
||||
private Long processId;
|
||||
/**
|
||||
* 用户 ID
|
||||
*/
|
||||
// @TableId
|
||||
private Long userId;
|
||||
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package com.cf.imes.module.system.dal.mysql.process;
|
||||
|
||||
import com.cf.imes.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.cf.imes.module.system.dal.dataobject.process.ProcessUserDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 工序用户表 process_user Mapper
|
||||
*
|
||||
* @author 晨丰科技
|
||||
*/
|
||||
@Mapper
|
||||
public interface ProcessUserMapper extends BaseMapperX<ProcessUserDO> {
|
||||
|
||||
// default PageResult<ProcessUserDO> selectPage(ProcessUserPageReqVO reqVO) {
|
||||
// return selectPage(reqVO, new LambdaQueryWrapperX<ProcessUserDO>()
|
||||
// .orderByDesc(ProcessUserDO::getId));
|
||||
// }
|
||||
|
||||
}
|
||||
+2
-1
@@ -2,6 +2,7 @@ package com.cf.imes.module.system.service.process;
|
||||
|
||||
import com.cf.imes.module.system.controller.admin.process.vo.process.ProcessPageReqVO;
|
||||
import com.cf.imes.module.system.controller.admin.process.vo.process.ProcessSaveReqVO;
|
||||
import com.cf.imes.module.system.controller.admin.process.vo.process.ProcessUserSaveReqVO;
|
||||
import com.cf.imes.module.system.dal.dataobject.process.ProcessDO;
|
||||
import com.cf.imes.framework.common.pojo.PageResult;
|
||||
|
||||
@@ -20,7 +21,7 @@ public interface ProcessService {
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Long createProcess(@Valid ProcessSaveReqVO createReqVO);
|
||||
Long createProcess(@Valid ProcessUserSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新工序信息表 process
|
||||
|
||||
+19
-2
@@ -2,8 +2,13 @@ package com.cf.imes.module.system.service.process;
|
||||
|
||||
import com.cf.imes.module.system.controller.admin.process.vo.process.ProcessPageReqVO;
|
||||
import com.cf.imes.module.system.controller.admin.process.vo.process.ProcessSaveReqVO;
|
||||
import com.cf.imes.module.system.controller.admin.process.vo.process.ProcessUserSaveReqVO;
|
||||
import com.cf.imes.module.system.dal.dataobject.process.ProcessUserDO;
|
||||
import com.cf.imes.module.system.dal.mysql.process.ProcessUserMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import com.cf.imes.module.system.dal.dataobject.process.ProcessDO;
|
||||
@@ -26,15 +31,27 @@ import static com.cf.imes.module.system.enums.ErrorCodeConstants.*;
|
||||
@Validated
|
||||
public class ProcessServiceImpl implements ProcessService {
|
||||
|
||||
// private static final String PROCESS_NOT_EXISTS = "进程不存在";
|
||||
@Resource
|
||||
private ProcessMapper processMapper;
|
||||
|
||||
@Resource
|
||||
private ProcessUserMapper processUserMapper;
|
||||
|
||||
@Override
|
||||
public Long createProcess(ProcessSaveReqVO createReqVO) {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Long createProcess(ProcessUserSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
ProcessDO process = BeanUtils.toBean(createReqVO, ProcessDO.class);
|
||||
processMapper.insert(process);
|
||||
Long processID = process.getId();
|
||||
String[] usersID = createReqVO.getUsers().split(",");
|
||||
for (String user : usersID) {
|
||||
System.out.println(user);
|
||||
ProcessUserDO processUserDO = new ProcessUserDO();
|
||||
processUserDO.setProcessId(processID);
|
||||
processUserDO.setUserId(Long.parseLong(user));
|
||||
processUserMapper.insert(processUserDO);
|
||||
}
|
||||
// 返回
|
||||
return process.getId();
|
||||
}
|
||||
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.cf.imes.module.system.dal.mysql.processUser.ProcessUserMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.cf.com/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user