This commit is contained in:
yangshb
2024-03-05 11:39:57 +08:00
parent c9553fdd65
commit f6d1d354e6
1984 changed files with 175140 additions and 2 deletions
@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.cf.imes</groupId>
<artifactId>cf-module-prod-executor</artifactId>
<version>${revision}</version>
</parent>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>com.cf.imes</groupId>
<artifactId>cf-common</artifactId>
</dependency>
<!-- Web 相关 -->
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-ui</artifactId>
<scope>provided</scope>
</dependency>
<!-- 参数校验 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
<optional>true</optional>
</dependency>
<!-- RPC 远程调用相关 -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
<optional>true</optional>
</dependency>
</dependencies>
<artifactId>cf-module-prod-executor-api</artifactId>
<description>
executor 模块 API,暴露给其它模块调用
</description>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>
@@ -0,0 +1,4 @@
/**
* executor API 包,定义暴露给其它模块的 API
*/
package com.cf.imes.module.executor.api;
@@ -0,0 +1,23 @@
package com.cf.imes.module.executor.enums;
import com.cf.imes.framework.common.enums.RpcConstants;
/**
* API 相关的枚举
*
* @author 晨丰科技
*/
public class ApiConstants {
/**
* 服务名
*
* 注意,需要保证和 spring.application.name 保持一致
*/
public static final String NAME = "executor-server";
public static final String PREFIX = RpcConstants.RPC_API_PREFIX + "/executor";
public static final String VERSION = "1.0.0";
}
@@ -0,0 +1,19 @@
package com.cf.imes.module.executor.enums;
import com.cf.imes.framework.common.exception.ErrorCode;
/**
* @author there
* 生产执行服务错误码枚举 使用 1-003-000-000 段
*/
public interface ErrorCodeConstants {
// ========== 生产单开料排单
ErrorCode PLAN_NOT_EXISTS = new ErrorCode(1_001_107_000, "生产单开料排单不存在");
// ========== 生产单商品 TODO 补充编号 ==========
ErrorCode GOODS_NOT_EXISTS = new ErrorCode(1_001_108_000, "生产单商品不存在");
// ========== 生产单 TODO 补充编号 ==========
ErrorCode ORDER_NOT_EXISTS = new ErrorCode(1_001_109_000, "生产单不存在");
}
@@ -0,0 +1,152 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.cf.imes</groupId>
<artifactId>cf-module-prod-executor</artifactId>
<version>${revision}</version>
</parent>
<packaging>jar</packaging>
<artifactId>cf-module-prod-executor-biz</artifactId>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<!-- Spring Cloud 基础 -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bootstrap</artifactId>
</dependency>
<!-- 依赖服务 -->
<dependency>
<groupId>com.cf.imes</groupId>
<artifactId>cf-module-prod-executor-api</artifactId>
<version>${revision}</version>
</dependency>
<!-- 业务组件 -->
<dependency>
<groupId>com.cf.imes</groupId>
<artifactId>cf-spring-boot-starter-banner</artifactId>
</dependency>
<dependency>
<groupId>com.cf.imes</groupId>
<artifactId>cf-spring-boot-starter-biz-operatelog</artifactId>
</dependency>
<dependency>
<groupId>com.cf.imes</groupId>
<artifactId>cf-spring-boot-starter-biz-organ</artifactId>
</dependency>
<dependency>
<groupId>com.cf.imes</groupId>
<artifactId>cf-spring-boot-starter-biz-error-code</artifactId>
</dependency>
<!-- Web 相关 -->
<dependency>
<groupId>com.cf.imes</groupId>
<artifactId>cf-spring-boot-starter-security</artifactId>
</dependency>
<!-- DB 相关 -->
<!-- <dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>sharding-jdbc-spring-boot-starter</artifactId>
<version>4.1.0</version>
</dependency>
-->
<dependency>
<groupId>com.cf.imes</groupId>
<artifactId>cf-spring-boot-starter-mybatis</artifactId>
</dependency>
<dependency>
<groupId>com.cf.imes</groupId>
<artifactId>cf-spring-boot-starter-redis</artifactId>
</dependency>
<!-- RPC 远程调用相关 -->
<dependency>
<groupId>com.cf.imes</groupId>
<artifactId>cf-spring-boot-starter-rpc</artifactId>
</dependency>
<!-- Registry 注册中心相关 -->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<!-- Config 配置中心相关 -->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency>
<!-- Test 测试相关 -->
<dependency>
<groupId>com.cf.imes</groupId>
<artifactId>cf-spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<!-- 工具类相关 -->
<dependency>
<groupId>com.cf.imes</groupId>
<artifactId>cf-spring-boot-starter-excel</artifactId>
</dependency>
<dependency>
<groupId>cn.smallbun.screw</groupId>
<artifactId>screw-core</artifactId> <!-- 实现数据库文档 -->
</dependency>
<!-- 监控相关 -->
<dependency>
<groupId>com.cf.imes</groupId>
<artifactId>cf-spring-boot-starter-monitor</artifactId>
</dependency>
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-starter-server</artifactId> <!-- 实现 Spring Boot Admin Server 服务端 -->
</dependency>
<!-- 三方云服务相关 -->
<dependency>
<groupId>com.cf.imes</groupId>
<artifactId>cf-spring-boot-starter-file</artifactId>
</dependency>
</dependencies>
<build>
<!-- 设置构建的 jar 包名 -->
<finalName>${project.artifactId}</finalName>
<plugins>
<!-- 打包 -->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring.boot.version}</version>
<executions>
<execution>
<goals>
<goal>repackage</goal> <!-- 将引入的 jar 打入其中 -->
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
@@ -0,0 +1,14 @@
package com.cf.imes.module.executor;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
/**
* @author there
*/
@SpringBootApplication
public class ExecutorServerApplication {
public static void main(String[] args) {
SpringApplication.run(ExecutorServerApplication.class, args);
}
}
@@ -0,0 +1,50 @@
package com.cf.imes.module.executor.config;
import com.baomidou.dynamic.datasource.DynamicRoutingDataSource;
import com.baomidou.dynamic.datasource.creator.DataSourceProperty;
import com.baomidou.dynamic.datasource.creator.DefaultDataSourceCreator;
import com.cf.imes.framework.organ.core.context.OrganContextHolder;
import com.cf.imes.module.executor.dal.dataobject.register.RegisterDO;
import com.cf.imes.module.executor.dal.mysql.register.RegisterMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
import javax.sql.DataSource;
import java.util.List;
/**
* @author there
*/
@Slf4j
@Component
public class DataSourceInitializer {
@Autowired
private DefaultDataSourceCreator defaultDataSourceCreator;
@Autowired
private RegisterMapper registerMapper;
@Autowired
private DataSource dataSource;
@PostConstruct
public void init(){
DynamicRoutingDataSource dynamicRoutingDataSource=(DynamicRoutingDataSource)dataSource;
OrganContextHolder.setOrganId(0L);
List<RegisterDO> registerDOS=registerMapper.findAll();
OrganContextHolder.clear();
for(RegisterDO registerDO:registerDOS){
DataSourceProperty dataSourceProperty=new DataSourceProperty();
dataSourceProperty.setPoolName(registerDO.getCode());
dataSourceProperty.setUrl(registerDO.getDbUrl());
dataSourceProperty.setUsername(registerDO.getDbUsername());
dataSourceProperty.setPassword(registerDO.getDbPassword());
DataSource dataSource=defaultDataSourceCreator.createDataSource(dataSourceProperty);
dynamicRoutingDataSource.addDataSource(registerDO.getCode(),dataSource);
}
}
}
@@ -0,0 +1,95 @@
package com.cf.imes.module.executor.controller.admin.goods;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import javax.validation.constraints.*;
import javax.validation.*;
import javax.servlet.http.*;
import java.util.*;
import java.io.IOException;
import com.cf.imes.framework.common.pojo.PageParam;
import com.cf.imes.framework.common.pojo.PageResult;
import com.cf.imes.framework.common.pojo.CommonResult;
import com.cf.imes.framework.common.util.object.BeanUtils;
import static com.cf.imes.framework.common.pojo.CommonResult.success;
import com.cf.imes.framework.excel.core.util.ExcelUtils;
import com.cf.imes.framework.operatelog.core.annotations.OperateLog;
import static com.cf.imes.framework.operatelog.core.enums.OperateTypeEnum.*;
import com.cf.imes.module.executor.controller.admin.goods.vo.*;
import com.cf.imes.module.executor.dal.dataobject.goods.GoodsDO;
import com.cf.imes.module.executor.service.goods.GoodsService;
@Tag(name = "管理后台 - 生产单商品")
@RestController
@RequestMapping("/executor/goods")
@Validated
public class GoodsController {
@Resource
private GoodsService goodsService;
@PostMapping("/create")
@Operation(summary = "创建生产单商品")
@PreAuthorize("@ss.hasPermission('executor:goods:create')")
public CommonResult<Long> createGoods(@Valid @RequestBody GoodsSaveReqVO createReqVO) {
return success(goodsService.createGoods(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新生产单商品")
@PreAuthorize("@ss.hasPermission('executor:goods:update')")
public CommonResult<Boolean> updateGoods(@Valid @RequestBody GoodsSaveReqVO updateReqVO) {
goodsService.updateGoods(updateReqVO);
return success(true);
}
@DeleteMapping("/delete")
@Operation(summary = "删除生产单商品")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('executor:goods:delete')")
public CommonResult<Boolean> deleteGoods(@RequestParam("id") Long id) {
goodsService.deleteGoods(id);
return success(true);
}
@GetMapping("/get")
@Operation(summary = "获得生产单商品")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('executor:goods:query')")
public CommonResult<GoodsRespVO> getGoods(@RequestParam("id") Long id) {
GoodsDO goods = goodsService.getGoods(id);
return success(BeanUtils.toBean(goods, GoodsRespVO.class));
}
@GetMapping("/page")
@Operation(summary = "获得生产单商品分页")
@PreAuthorize("@ss.hasPermission('executor:goods:query')")
public CommonResult<PageResult<GoodsRespVO>> getGoodsPage(@Valid GoodsPageReqVO pageReqVO) {
PageResult<GoodsDO> pageResult = goodsService.getGoodsPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, GoodsRespVO.class));
}
@GetMapping("/export-excel")
@Operation(summary = "导出生产单商品 Excel")
@PreAuthorize("@ss.hasPermission('executor:goods:export')")
@OperateLog(type = EXPORT)
public void exportGoodsExcel(@Valid GoodsPageReqVO pageReqVO,
HttpServletResponse response) throws IOException {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<GoodsDO> list = goodsService.getGoodsPage(pageReqVO).getList();
// 导出 Excel
ExcelUtils.write(response, "生产单商品.xls", "数据", GoodsRespVO.class,
BeanUtils.toBean(list, GoodsRespVO.class));
}
}
@@ -0,0 +1,58 @@
package com.cf.imes.module.executor.controller.admin.goods.vo;
import lombok.*;
import java.util.*;
import io.swagger.v3.oas.annotations.media.Schema;
import com.cf.imes.framework.common.pojo.PageParam;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import static com.cf.imes.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 GoodsPageReqVO extends PageParam {
@Schema(description = "生产单号")
private Long orderNo;
@Schema(description = "商品 ID", example = "18975")
private Long goodsId;
@Schema(description = "商品 ID", example = "王五")
private String goodsName;
@Schema(description = "材质:颗粒板、欧松板、多层板、生态板、禾香板、密度板、实木、铝蜂窝板、铝塑板")
private String material;
@Schema(description = "颜色")
private String color;
@Schema(description = "宽度")
private Double width;
@Schema(description = "高度")
private Double height;
@Schema(description = "厚度")
private Double thickness;
@Schema(description = "价格", example = "21231")
private Double price;
@Schema(description = "品牌")
private String brand;
@Schema(description = "规格")
private String spec;
@Schema(description = "备注", example = "你猜")
private String remark;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
}
@@ -0,0 +1,72 @@
package com.cf.imes.module.executor.controller.admin.goods.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.util.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
@Schema(description = "管理后台 - 生产单商品 Response VO")
@Data
@ExcelIgnoreUnannotated
public class GoodsRespVO {
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "26190")
@ExcelProperty("主键")
private Long id;
@Schema(description = "生产单号", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("生产单号")
private Long orderNo;
@Schema(description = "商品 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "18975")
@ExcelProperty("商品 ID")
private Long goodsId;
@Schema(description = "商品 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
@ExcelProperty("商品名称")
private String goodsName;
@Schema(description = "材质:颗粒板、欧松板、多层板、生态板、禾香板、密度板、实木、铝蜂窝板、铝塑板", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("材质:颗粒板、欧松板、多层板、生态板、禾香板、密度板、实木、铝蜂窝板、铝塑板")
private String material;
@Schema(description = "颜色", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("颜色")
private String color;
@Schema(description = "宽度", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("宽度")
private Double width;
@Schema(description = "高度", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("高度")
private Double height;
@Schema(description = "厚度", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("厚度")
private Double thickness;
@Schema(description = "价格", requiredMode = Schema.RequiredMode.REQUIRED, example = "21231")
@ExcelProperty("价格")
private Double price;
@Schema(description = "品牌", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("品牌")
private String brand;
@Schema(description = "规格", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("规格")
private String spec;
@Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "你猜")
@ExcelProperty("备注")
private String remark;
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("创建时间")
private LocalDateTime createTime;
}
@@ -0,0 +1,63 @@
package com.cf.imes.module.executor.controller.admin.goods.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import javax.validation.constraints.*;
@Schema(description = "管理后台 - 生产单商品新增/修改 Request VO")
@Data
public class GoodsSaveReqVO {
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "26190")
private Long id;
@Schema(description = "生产单号", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "生产单号不能为空")
private Long orderNo;
@Schema(description = "商品 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "18975")
@NotNull(message = "商品 ID不能为空")
private Long goodsId;
@Schema(description = "商品 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
@NotEmpty(message = "商品名称不能为空")
private String goodsName;
@Schema(description = "材质:颗粒板、欧松板、多层板、生态板、禾香板、密度板、实木、铝蜂窝板、铝塑板", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "材质:颗粒板、欧松板、多层板、生态板、禾香板、密度板、实木、铝蜂窝板、铝塑板不能为空")
private String material;
@Schema(description = "颜色", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "颜色不能为空")
private String color;
@Schema(description = "宽度", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "宽度不能为空")
private Double width;
@Schema(description = "高度", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "高度不能为空")
private Double height;
@Schema(description = "厚度", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "厚度不能为空")
private Double thickness;
@Schema(description = "价格", requiredMode = Schema.RequiredMode.REQUIRED, example = "21231")
@NotNull(message = "价格不能为空")
private Double price;
@Schema(description = "品牌", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "品牌不能为空")
private String brand;
@Schema(description = "规格", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "规格不能为空")
private String spec;
@Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "你猜")
@NotEmpty(message = "备注不能为空")
private String remark;
}
@@ -0,0 +1,95 @@
package com.cf.imes.module.executor.controller.admin.module;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import javax.validation.constraints.*;
import javax.validation.*;
import javax.servlet.http.*;
import java.util.*;
import java.io.IOException;
import com.cf.imes.framework.common.pojo.PageParam;
import com.cf.imes.framework.common.pojo.PageResult;
import com.cf.imes.framework.common.pojo.CommonResult;
import com.cf.imes.framework.common.util.object.BeanUtils;
import static com.cf.imes.framework.common.pojo.CommonResult.success;
import com.cf.imes.framework.excel.core.util.ExcelUtils;
import com.cf.imes.framework.operatelog.core.annotations.OperateLog;
import static com.cf.imes.framework.operatelog.core.enums.OperateTypeEnum.*;
import com.cf.imes.module.executor.controller.admin.module.vo.*;
import com.cf.imes.module.executor.dal.dataobject.module.ModuleDO;
import com.cf.imes.module.executor.service.module.ModuleService;
@Tag(name = "管理后台 - 生产单模块")
@RestController
@RequestMapping("/executor/module")
@Validated
public class ModuleController {
@Resource
private ModuleService moduleService;
@PostMapping("/create")
@Operation(summary = "创建生产单模块")
@PreAuthorize("@ss.hasPermission('executor:module:create')")
public CommonResult<Long> createModule(@Valid @RequestBody ModuleSaveReqVO createReqVO) {
return success(moduleService.createModule(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新生产单模块")
@PreAuthorize("@ss.hasPermission('executor:module:update')")
public CommonResult<Boolean> updateModule(@Valid @RequestBody ModuleSaveReqVO updateReqVO) {
moduleService.updateModule(updateReqVO);
return success(true);
}
@DeleteMapping("/delete")
@Operation(summary = "删除生产单模块")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('executor:module:delete')")
public CommonResult<Boolean> deleteModule(@RequestParam("id") Long id) {
moduleService.deleteModule(id);
return success(true);
}
@GetMapping("/get")
@Operation(summary = "获得生产单模块")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('executor:module:query')")
public CommonResult<ModuleRespVO> getModule(@RequestParam("id") Long id) {
ModuleDO module = moduleService.getModule(id);
return success(BeanUtils.toBean(module, ModuleRespVO.class));
}
@GetMapping("/page")
@Operation(summary = "获得生产单模块分页")
@PreAuthorize("@ss.hasPermission('executor:module:query')")
public CommonResult<PageResult<ModuleRespVO>> getModulePage(@Valid ModulePageReqVO pageReqVO) {
PageResult<ModuleDO> pageResult = moduleService.getModulePage(pageReqVO);
return success(BeanUtils.toBean(pageResult, ModuleRespVO.class));
}
@GetMapping("/export-excel")
@Operation(summary = "导出生产单模块 Excel")
@PreAuthorize("@ss.hasPermission('executor:module:export')")
@OperateLog(type = EXPORT)
public void exportModuleExcel(@Valid ModulePageReqVO pageReqVO,
HttpServletResponse response) throws IOException {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<ModuleDO> list = moduleService.getModulePage(pageReqVO).getList();
// 导出 Excel
ExcelUtils.write(response, "生产单模块.xls", "数据", ModuleRespVO.class,
BeanUtils.toBean(list, ModuleRespVO.class));
}
}
@@ -0,0 +1,67 @@
package com.cf.imes.module.executor.controller.admin.module.vo;
import lombok.*;
import java.util.*;
import io.swagger.v3.oas.annotations.media.Schema;
import com.cf.imes.framework.common.pojo.PageParam;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import static com.cf.imes.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 ModulePageReqVO extends PageParam {
@Schema(description = "生产单号")
private Long orderNo;
@Schema(description = "模块名称", example = "张三")
private String name;
@Schema(description = "父节点 ID,模块间根据module_type构成树形结构", example = "11108")
private Long parentId;
@Schema(description = "模块组 ID", example = "19999")
private Long groupId;
@Schema(description = "报价项目 ID", example = "26198")
private Integer offerId;
@Schema(description = "模块类型,1 房间 2 柜体 3 加工组类型 4 加工组名", example = "1")
private Integer type;
@Schema(description = "模块宽度")
private Double width;
@Schema(description = "模块高度")
private Double height;
@Schema(description = "模块深度")
private Double depth;
@Schema(description = "模块复制数量")
private Short multiNum;
@Schema(description = "源模块 ID,模块是复制的,则为源模块ID,否则为0", example = "19669")
private Long sourceId;
@Schema(description = "板材数量")
private Short plateNum;
@Schema(description = "异型数量")
private Short unregularNum;
@Schema(description = "文件名", example = "赵六")
private String filename;
@Schema(description = "备注", example = "你猜")
private String remark;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
}
@@ -0,0 +1,84 @@
package com.cf.imes.module.executor.controller.admin.module.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.util.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
@Schema(description = "管理后台 - 生产单模块 Response VO")
@Data
@ExcelIgnoreUnannotated
public class ModuleRespVO {
@Schema(description = "模块 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "17730")
@ExcelProperty("模块 ID")
private Long id;
@Schema(description = "生产单号", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("生产单号")
private Long orderNo;
@Schema(description = "模块名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
@ExcelProperty("模块名称")
private String name;
@Schema(description = "父节点 ID,模块间根据module_type构成树形结构", requiredMode = Schema.RequiredMode.REQUIRED, example = "11108")
@ExcelProperty("父节点 ID,模块间根据module_type构成树形结构")
private Long parentId;
@Schema(description = "模块组 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "19999")
@ExcelProperty("模块组 ID")
private Long groupId;
@Schema(description = "报价项目 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "26198")
@ExcelProperty("报价项目 ID")
private Integer offerId;
@Schema(description = "模块类型,1 房间 2 柜体 3 加工组类型 4 加工组名", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@ExcelProperty("模块类型,1 房间 2 柜体 3 加工组类型 4 加工组名")
private Integer type;
@Schema(description = "模块宽度", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("模块宽度")
private Double width;
@Schema(description = "模块高度", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("模块高度")
private Double height;
@Schema(description = "模块深度", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("模块深度")
private Double depth;
@Schema(description = "模块复制数量", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("模块复制数量")
private Short multiNum;
@Schema(description = "源模块 ID,模块是复制的,则为源模块ID,否则为0", requiredMode = Schema.RequiredMode.REQUIRED, example = "19669")
@ExcelProperty("源模块 ID,模块是复制的,则为源模块ID,否则为0")
private Long sourceId;
@Schema(description = "板材数量", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("板材数量")
private Short plateNum;
@Schema(description = "异型数量", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("异型数量")
private Short unregularNum;
@Schema(description = "文件名", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
@ExcelProperty("文件名")
private String filename;
@Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "你猜")
@ExcelProperty("备注")
private String remark;
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("创建时间")
private LocalDateTime createTime;
}
@@ -0,0 +1,75 @@
package com.cf.imes.module.executor.controller.admin.module.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import javax.validation.constraints.*;
@Schema(description = "管理后台 - 生产单模块新增/修改 Request VO")
@Data
public class ModuleSaveReqVO {
@Schema(description = "模块 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "17730")
private Long id;
@Schema(description = "生产单号", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "生产单号不能为空")
private Long orderNo;
@Schema(description = "模块名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
@NotEmpty(message = "模块名称不能为空")
private String name;
@Schema(description = "父节点 ID,模块间根据module_type构成树形结构", requiredMode = Schema.RequiredMode.REQUIRED, example = "11108")
@NotNull(message = "父节点 ID,模块间根据module_type构成树形结构不能为空")
private Long parentId;
@Schema(description = "模块组 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "19999")
@NotNull(message = "模块组 ID不能为空")
private Long groupId;
@Schema(description = "报价项目 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "26198")
@NotNull(message = "报价项目 ID不能为空")
private Integer offerId;
@Schema(description = "模块类型,1 房间 2 柜体 3 加工组类型 4 加工组名", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "模块类型,1 房间 2 柜体 3 加工组类型 4 加工组名不能为空")
private Integer type;
@Schema(description = "模块宽度", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "模块宽度不能为空")
private Double width;
@Schema(description = "模块高度", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "模块高度不能为空")
private Double height;
@Schema(description = "模块深度", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "模块深度不能为空")
private Double depth;
@Schema(description = "模块复制数量", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "模块复制数量不能为空")
private Short multiNum;
@Schema(description = "源模块 ID,模块是复制的,则为源模块ID,否则为0", requiredMode = Schema.RequiredMode.REQUIRED, example = "19669")
@NotNull(message = "源模块 ID,模块是复制的,则为源模块ID,否则为0不能为空")
private Long sourceId;
@Schema(description = "板材数量", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "板材数量不能为空")
private Short plateNum;
@Schema(description = "异型数量", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "异型数量不能为空")
private Short unregularNum;
@Schema(description = "文件名", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
@NotEmpty(message = "文件名不能为空")
private String filename;
@Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "你猜")
@NotEmpty(message = "备注不能为空")
private String remark;
}
@@ -0,0 +1,95 @@
package com.cf.imes.module.executor.controller.admin.moduleitem;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import javax.validation.constraints.*;
import javax.validation.*;
import javax.servlet.http.*;
import java.util.*;
import java.io.IOException;
import com.cf.imes.framework.common.pojo.PageParam;
import com.cf.imes.framework.common.pojo.PageResult;
import com.cf.imes.framework.common.pojo.CommonResult;
import com.cf.imes.framework.common.util.object.BeanUtils;
import static com.cf.imes.framework.common.pojo.CommonResult.success;
import com.cf.imes.framework.excel.core.util.ExcelUtils;
import com.cf.imes.framework.operatelog.core.annotations.OperateLog;
import static com.cf.imes.framework.operatelog.core.enums.OperateTypeEnum.*;
import com.cf.imes.module.executor.controller.admin.moduleitem.vo.*;
import com.cf.imes.module.executor.dal.dataobject.moduleitem.ModuleItemDO;
import com.cf.imes.module.executor.service.moduleitem.ModuleItemService;
@Tag(name = "管理后台 - 生产单模块明细")
@RestController
@RequestMapping("/executor/module-item")
@Validated
public class ModuleItemController {
@Resource
private ModuleItemService moduleItemService;
@PostMapping("/create")
@Operation(summary = "创建生产单模块明细")
@PreAuthorize("@ss.hasPermission('executor:module-item:create')")
public CommonResult<Long> createModuleItem(@Valid @RequestBody ModuleItemSaveReqVO createReqVO) {
return success(moduleItemService.createModuleItem(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新生产单模块明细")
@PreAuthorize("@ss.hasPermission('executor:module-item:update')")
public CommonResult<Boolean> updateModuleItem(@Valid @RequestBody ModuleItemSaveReqVO updateReqVO) {
moduleItemService.updateModuleItem(updateReqVO);
return success(true);
}
@DeleteMapping("/delete")
@Operation(summary = "删除生产单模块明细")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('executor:module-item:delete')")
public CommonResult<Boolean> deleteModuleItem(@RequestParam("id") Long id) {
moduleItemService.deleteModuleItem(id);
return success(true);
}
@GetMapping("/get")
@Operation(summary = "获得生产单模块明细")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('executor:module-item:query')")
public CommonResult<ModuleItemRespVO> getModuleItem(@RequestParam("id") Long id) {
ModuleItemDO moduleItem = moduleItemService.getModuleItem(id);
return success(BeanUtils.toBean(moduleItem, ModuleItemRespVO.class));
}
@GetMapping("/page")
@Operation(summary = "获得生产单模块明细分页")
@PreAuthorize("@ss.hasPermission('executor:module-item:query')")
public CommonResult<PageResult<ModuleItemRespVO>> getModuleItemPage(@Valid ModuleItemPageReqVO pageReqVO) {
PageResult<ModuleItemDO> pageResult = moduleItemService.getModuleItemPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, ModuleItemRespVO.class));
}
@GetMapping("/export-excel")
@Operation(summary = "导出生产单模块明细 Excel")
@PreAuthorize("@ss.hasPermission('executor:module-item:export')")
@OperateLog(type = EXPORT)
public void exportModuleItemExcel(@Valid ModuleItemPageReqVO pageReqVO,
HttpServletResponse response) throws IOException {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<ModuleItemDO> list = moduleItemService.getModuleItemPage(pageReqVO).getList();
// 导出 Excel
ExcelUtils.write(response, "生产单模块明细.xls", "数据", ModuleItemRespVO.class,
BeanUtils.toBean(list, ModuleItemRespVO.class));
}
}
@@ -0,0 +1,32 @@
package com.cf.imes.module.executor.controller.admin.moduleitem.vo;
import lombok.*;
import java.util.*;
import io.swagger.v3.oas.annotations.media.Schema;
import com.cf.imes.framework.common.pojo.PageParam;
@Schema(description = "管理后台 - 生产单模块明细分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ModuleItemPageReqVO extends PageParam {
@Schema(description = "生产单号")
private Long orderNo;
@Schema(description = "房间 ID", example = "1469")
private Long roomId;
@Schema(description = "柜体 ID", example = "3460")
private Long bodyId;
@Schema(description = "模块类型 ID", example = "15993")
private Long typeId;
@Schema(description = "模块 ID", example = "13998")
private Long moduleId;
@Schema(description = "明细 ID", example = "11426")
private Long itemId;
}
@@ -0,0 +1,42 @@
package com.cf.imes.module.executor.controller.admin.moduleitem.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.util.*;
import com.alibaba.excel.annotation.*;
@Schema(description = "管理后台 - 生产单模块明细 Response VO")
@Data
@ExcelIgnoreUnannotated
public class ModuleItemRespVO {
@Schema(description = "记录 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "15563")
@ExcelProperty("记录 ID")
private Long id;
@Schema(description = "生产单号", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("生产单号")
private Long orderNo;
@Schema(description = "房间 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1469")
@ExcelProperty("房间 ID")
private Long roomId;
@Schema(description = "柜体 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "3460")
@ExcelProperty("柜体 ID")
private Long bodyId;
@Schema(description = "模块类型 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "15993")
@ExcelProperty("模块类型 ID")
private Long typeId;
@Schema(description = "模块 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "13998")
@ExcelProperty("模块 ID")
private Long moduleId;
@Schema(description = "明细 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "11426")
@ExcelProperty("明细 ID")
private Long itemId;
}
@@ -0,0 +1,39 @@
package com.cf.imes.module.executor.controller.admin.moduleitem.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import javax.validation.constraints.*;
@Schema(description = "管理后台 - 生产单模块明细新增/修改 Request VO")
@Data
public class ModuleItemSaveReqVO {
@Schema(description = "记录 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "15563")
private Long id;
@Schema(description = "生产单号", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "生产单号不能为空")
private Long orderNo;
@Schema(description = "房间 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1469")
@NotNull(message = "房间 ID不能为空")
private Long roomId;
@Schema(description = "柜体 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "3460")
@NotNull(message = "柜体 ID不能为空")
private Long bodyId;
@Schema(description = "模块类型 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "15993")
@NotNull(message = "模块类型 ID不能为空")
private Long typeId;
@Schema(description = "模块 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "13998")
@NotNull(message = "模块 ID不能为空")
private Long moduleId;
@Schema(description = "明细 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "11426")
@NotNull(message = "明细 ID不能为空")
private Long itemId;
}
@@ -0,0 +1,96 @@
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 org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import javax.validation.*;
import javax.servlet.http.*;
import java.util.*;
import java.io.IOException;
import com.cf.imes.framework.common.pojo.PageParam;
import com.cf.imes.framework.common.pojo.PageResult;
import com.cf.imes.framework.common.pojo.CommonResult;
import com.cf.imes.framework.common.util.object.BeanUtils;
import static com.cf.imes.framework.common.pojo.CommonResult.success;
import com.cf.imes.framework.excel.core.util.ExcelUtils;
import com.cf.imes.framework.operatelog.core.annotations.OperateLog;
import static com.cf.imes.framework.operatelog.core.enums.OperateTypeEnum.*;
import com.cf.imes.module.executor.dal.dataobject.order.OrderDO;
import com.cf.imes.module.executor.service.order.OrderService;
@Tag(name = "管理后台 - 生产单表 order_{N}")
@RestController
@RequestMapping("/executor/order")
@Validated
public class OrderController {
@Resource
private OrderService orderService;
@PostMapping("/create")
@Operation(summary = "创建生产单表 order_{N}")
@PreAuthorize("@ss.hasPermission('executor:order:create')")
public CommonResult<Long> createOrder(@Valid @RequestBody OrderSaveReqVO createReqVO) {
return success(orderService.createOrder(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新生产单表 order_{N}")
@PreAuthorize("@ss.hasPermission('executor:order:update')")
public CommonResult<Boolean> updateOrder(@Valid @RequestBody OrderSaveReqVO updateReqVO) {
orderService.updateOrder(updateReqVO);
return success(true);
}
@DeleteMapping("/delete")
@Operation(summary = "删除生产单表 order_{N}")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('executor:order:delete')")
public CommonResult<Boolean> deleteOrder(@RequestParam("id") Long id) {
orderService.deleteOrder(id);
return success(true);
}
@GetMapping("/get")
@Operation(summary = "获得生产单表 order_{N}")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('executor:order:query')")
public CommonResult<OrderRespVO> getOrder(@RequestParam("id") Long id) {
OrderDO order = orderService.getOrder(id);
return success(BeanUtils.toBean(order, OrderRespVO.class));
}
@GetMapping("/page")
@Operation(summary = "获得生产单表 order_{N}分页")
@PreAuthorize("@ss.hasPermission('executor:order:query')")
public CommonResult<PageResult<OrderRespVO>> getOrderPage(@Valid OrderPageReqVO pageReqVO) {
PageResult<OrderDO> pageResult = orderService.getOrderPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, OrderRespVO.class));
}
@GetMapping("/export-excel")
@Operation(summary = "导出生产单表 order_{N} Excel")
@PreAuthorize("@ss.hasPermission('executor:order:export')")
@OperateLog(type = EXPORT)
public void exportOrderExcel(@Valid OrderPageReqVO pageReqVO,
HttpServletResponse response) throws IOException {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<OrderDO> list = orderService.getOrderPage(pageReqVO).getList();
// 导出 Excel
ExcelUtils.write(response, "生产单表 order_{N}.xls", "数据", OrderRespVO.class,
BeanUtils.toBean(list, OrderRespVO.class));
}
}
@@ -0,0 +1,96 @@
package com.cf.imes.module.executor.controller.admin.order;
import com.cf.imes.module.executor.controller.admin.order.vo.item.OrderItemPageReqVO;
import com.cf.imes.module.executor.controller.admin.order.vo.item.OrderItemRespVO;
import com.cf.imes.module.executor.controller.admin.order.vo.item.OrderItemSaveReqVO;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import javax.validation.*;
import javax.servlet.http.*;
import java.util.*;
import java.io.IOException;
import com.cf.imes.framework.common.pojo.PageParam;
import com.cf.imes.framework.common.pojo.PageResult;
import com.cf.imes.framework.common.pojo.CommonResult;
import com.cf.imes.framework.common.util.object.BeanUtils;
import static com.cf.imes.framework.common.pojo.CommonResult.success;
import com.cf.imes.framework.excel.core.util.ExcelUtils;
import com.cf.imes.framework.operatelog.core.annotations.OperateLog;
import static com.cf.imes.framework.operatelog.core.enums.OperateTypeEnum.*;
import com.cf.imes.module.executor.dal.dataobject.order.OrderItemDO;
import com.cf.imes.module.executor.service.order.OrderItemService;
@Tag(name = "管理后台 - 生产单明细表 order_item_{N}")
@RestController
@RequestMapping("/executor/order-item")
@Validated
public class OrderItemController {
@Resource
private OrderItemService orderItemService;
@PostMapping("/create")
@Operation(summary = "创建生产单明细表 order_item_{N}")
@PreAuthorize("@ss.hasPermission('executor:order-item:create')")
public CommonResult<Long> createOrderItem(@Valid @RequestBody OrderItemSaveReqVO createReqVO) {
return success(orderItemService.createOrderItem(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新生产单明细表 order_item_{N}")
@PreAuthorize("@ss.hasPermission('executor:order-item:update')")
public CommonResult<Boolean> updateOrderItem(@Valid @RequestBody OrderItemSaveReqVO updateReqVO) {
orderItemService.updateOrderItem(updateReqVO);
return success(true);
}
@DeleteMapping("/delete")
@Operation(summary = "删除生产单明细表 order_item_{N}")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('executor:order-item:delete')")
public CommonResult<Boolean> deleteOrderItem(@RequestParam("id") Long id) {
orderItemService.deleteOrderItem(id);
return success(true);
}
@GetMapping("/get")
@Operation(summary = "获得生产单明细表 order_item_{N}")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('executor:order-item:query')")
public CommonResult<OrderItemRespVO> getOrderItem(@RequestParam("id") Long id) {
OrderItemDO orderItem = orderItemService.getOrderItem(id);
return success(BeanUtils.toBean(orderItem, OrderItemRespVO.class));
}
@GetMapping("/page")
@Operation(summary = "获得生产单明细表 order_item_{N}分页")
@PreAuthorize("@ss.hasPermission('executor:order-item:query')")
public CommonResult<PageResult<OrderItemRespVO>> getOrderItemPage(@Valid OrderItemPageReqVO pageReqVO) {
PageResult<OrderItemDO> pageResult = orderItemService.getOrderItemPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, OrderItemRespVO.class));
}
@GetMapping("/export-excel")
@Operation(summary = "导出生产单明细表 order_item_{N} Excel")
@PreAuthorize("@ss.hasPermission('executor:order-item:export')")
@OperateLog(type = EXPORT)
public void exportOrderItemExcel(@Valid OrderItemPageReqVO pageReqVO,
HttpServletResponse response) throws IOException {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<OrderItemDO> list = orderItemService.getOrderItemPage(pageReqVO).getList();
// 导出 Excel
ExcelUtils.write(response, "生产单明细表 order_item_{N}.xls", "数据", OrderItemRespVO.class,
BeanUtils.toBean(list, OrderItemRespVO.class));
}
}
@@ -0,0 +1,96 @@
package com.cf.imes.module.executor.controller.admin.order;
import com.cf.imes.module.executor.controller.admin.order.vo.plate.PlatePageReqVO;
import com.cf.imes.module.executor.controller.admin.order.vo.plate.PlateRespVO;
import com.cf.imes.module.executor.controller.admin.order.vo.plate.PlateSaveReqVO;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import javax.validation.*;
import javax.servlet.http.*;
import java.util.*;
import java.io.IOException;
import com.cf.imes.framework.common.pojo.PageParam;
import com.cf.imes.framework.common.pojo.PageResult;
import com.cf.imes.framework.common.pojo.CommonResult;
import com.cf.imes.framework.common.util.object.BeanUtils;
import static com.cf.imes.framework.common.pojo.CommonResult.success;
import com.cf.imes.framework.excel.core.util.ExcelUtils;
import com.cf.imes.framework.operatelog.core.annotations.OperateLog;
import static com.cf.imes.framework.operatelog.core.enums.OperateTypeEnum.*;
import com.cf.imes.module.executor.dal.dataobject.order.PlateDO;
import com.cf.imes.module.executor.service.order.PlateService;
@Tag(name = "管理后台 - 生产单板件")
@RestController
@RequestMapping("/executor/plate")
@Validated
public class PlateController {
@Resource
private PlateService plateService;
@PostMapping("/create")
@Operation(summary = "创建生产单板件")
@PreAuthorize("@ss.hasPermission('executor:plate:create')")
public CommonResult<Long> createPlate(@Valid @RequestBody PlateSaveReqVO createReqVO) {
return success(plateService.createPlate(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新生产单板件")
@PreAuthorize("@ss.hasPermission('executor:plate:update')")
public CommonResult<Boolean> updatePlate(@Valid @RequestBody PlateSaveReqVO updateReqVO) {
plateService.updatePlate(updateReqVO);
return success(true);
}
@DeleteMapping("/delete")
@Operation(summary = "删除生产单板件")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('executor:plate:delete')")
public CommonResult<Boolean> deletePlate(@RequestParam("id") Long id) {
plateService.deletePlate(id);
return success(true);
}
@GetMapping("/get")
@Operation(summary = "获得生产单板件")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('executor:plate:query')")
public CommonResult<PlateRespVO> getPlate(@RequestParam("id") Long id) {
PlateDO plate = plateService.getPlate(id);
return success(BeanUtils.toBean(plate, PlateRespVO.class));
}
@GetMapping("/page")
@Operation(summary = "获得生产单板件分页")
@PreAuthorize("@ss.hasPermission('executor:plate:query')")
public CommonResult<PageResult<PlateRespVO>> getPlatePage(@Valid PlatePageReqVO pageReqVO) {
PageResult<PlateDO> pageResult = plateService.getPlatePage(pageReqVO);
return success(BeanUtils.toBean(pageResult, PlateRespVO.class));
}
@GetMapping("/export-excel")
@Operation(summary = "导出生产单板件 Excel")
@PreAuthorize("@ss.hasPermission('executor:plate:export')")
@OperateLog(type = EXPORT)
public void exportPlateExcel(@Valid PlatePageReqVO pageReqVO,
HttpServletResponse response) throws IOException {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<PlateDO> list = plateService.getPlatePage(pageReqVO).getList();
// 导出 Excel
ExcelUtils.write(response, "生产单板件.xls", "数据", PlateRespVO.class,
BeanUtils.toBean(list, PlateRespVO.class));
}
}
@@ -0,0 +1,38 @@
package com.cf.imes.module.executor.controller.admin.order.vo.item;
import lombok.*;
import java.util.*;
import io.swagger.v3.oas.annotations.media.Schema;
import com.cf.imes.framework.common.pojo.PageParam;
@Schema(description = "管理后台 - 生产单明细表 order_item_{N}分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class OrderItemPageReqVO extends PageParam {
@Schema(description = "生产单号", example = "9670")
private Long orderId;
@Schema(description = "明细类型,1 板材 2 五金/配件 3 其他 4 报价配件", example = "1")
private Integer type;
@Schema(description = "房间 ID", example = "18039")
private Long roomId;
@Schema(description = "柜体 ID", example = "19484")
private Long bodyId;
@Schema(description = "数据 ID", example = "22988")
private Long dataId;
@Schema(description = "排单 ID", example = "7880")
private Long planId;
@Schema(description = "包裹 ID", example = "18267")
private Long packageId;
@Schema(description = "部件数量")
private Double num;
}
@@ -0,0 +1,50 @@
package com.cf.imes.module.executor.controller.admin.order.vo.item;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.util.*;
import com.alibaba.excel.annotation.*;
@Schema(description = "管理后台 - 生产单明细表 order_item_{N} Response VO")
@Data
@ExcelIgnoreUnannotated
public class OrderItemRespVO {
@Schema(description = "明细编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "19495")
@ExcelProperty("明细编号")
private Long id;
@Schema(description = "生产单号", requiredMode = Schema.RequiredMode.REQUIRED, example = "9670")
@ExcelProperty("生产单号")
private Long orderId;
@Schema(description = "明细类型,1 板材 2 五金/配件 3 其他 4 报价配件", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@ExcelProperty("明细类型,1 板材 2 五金/配件 3 其他 4 报价配件")
private Integer type;
@Schema(description = "房间 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "18039")
@ExcelProperty("房间 ID")
private Long roomId;
@Schema(description = "柜体 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "19484")
@ExcelProperty("柜体 ID")
private Long bodyId;
@Schema(description = "数据 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "22988")
@ExcelProperty("数据 ID")
private Long dataId;
@Schema(description = "排单 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "7880")
@ExcelProperty("排单 ID")
private Long planId;
@Schema(description = "包裹 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "18267")
@ExcelProperty("包裹 ID")
private Long packageId;
@Schema(description = "部件数量", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("部件数量")
private Double num;
}
@@ -0,0 +1,47 @@
package com.cf.imes.module.executor.controller.admin.order.vo.item;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import javax.validation.constraints.*;
@Schema(description = "管理后台 - 生产单明细表 order_item_{N}新增/修改 Request VO")
@Data
public class OrderItemSaveReqVO {
@Schema(description = "明细编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "19495")
private Long id;
@Schema(description = "生产单号", requiredMode = Schema.RequiredMode.REQUIRED, example = "9670")
@NotNull(message = "生产单号不能为空")
private Long orderId;
@Schema(description = "明细类型,1 板材 2 五金/配件 3 其他 4 报价配件", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "明细类型,1 板材 2 五金/配件 3 其他 4 报价配件不能为空")
private Integer type;
@Schema(description = "房间 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "18039")
@NotNull(message = "房间 ID不能为空")
private Long roomId;
@Schema(description = "柜体 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "19484")
@NotNull(message = "柜体 ID不能为空")
private Long bodyId;
@Schema(description = "数据 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "22988")
@NotNull(message = "数据 ID不能为空")
private Long dataId;
@Schema(description = "排单 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "7880")
@NotNull(message = "排单 ID不能为空")
private Long planId;
@Schema(description = "包裹 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "18267")
@NotNull(message = "包裹 ID不能为空")
private Long packageId;
@Schema(description = "部件数量", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "部件数量不能为空")
private Double num;
}
@@ -0,0 +1,68 @@
package com.cf.imes.module.executor.controller.admin.order.vo.order;
import lombok.*;
import java.util.*;
import io.swagger.v3.oas.annotations.media.Schema;
import com.cf.imes.framework.common.pojo.PageParam;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import static com.cf.imes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = "管理后台 - 生产单表 order_{N}分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class OrderPageReqVO extends PageParam {
@Schema(description = "父单号")
private Long parentNo;
@Schema(description = "交付日期")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] deliveryDate;
@Schema(description = "生产单类型,1主单 2子单", example = "1")
private Boolean type;
@Schema(description = "生产单排序号")
private Integer sort;
@Schema(description = "CAD数据类型,1CAD 2WebCAD 3Excel", example = "1")
private Boolean dataType;
@Schema(description = "订单状态,0未排单1已排单2生产中3加工完成4打包完成5入库完成6出库完成", example = "1")
private Boolean status;
@Schema(description = "自定义单号")
private String customOrderNo;
@Schema(description = "客户")
private String customer;
@Schema(description = "客户地址")
private String address;
@Schema(description = "客户电话")
private String phoneNumber;
@Schema(description = "经销商")
private String dealer;
@Schema(description = "经销商电话")
private String dealerPhoneNumber;
@Schema(description = "业务员")
private String salesman;
@Schema(description = "拆单员")
private String splitter;
@Schema(description = "备注", example = "你猜")
private String remark;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
}
@@ -0,0 +1,84 @@
package com.cf.imes.module.executor.controller.admin.order.vo.order;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.util.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
@Schema(description = "管理后台 - 生产单表 order_{N} Response VO")
@Data
@ExcelIgnoreUnannotated
public class OrderRespVO {
@Schema(description = "生产单号,主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "15091")
@ExcelProperty("生产单号,主键")
private Long id;
@Schema(description = "父单号", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("父单号")
private Long parentNo;
@Schema(description = "交付日期", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("交付日期")
private LocalDateTime deliveryDate;
@Schema(description = "生产单类型,1主单 2子单", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@ExcelProperty("生产单类型,1主单 2子单")
private Boolean type;
@Schema(description = "生产单排序号", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("生产单排序号")
private Integer sort;
@Schema(description = "CAD数据类型,1CAD 2WebCAD 3Excel", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@ExcelProperty("CAD数据类型,1CAD 2WebCAD 3Excel")
private Boolean dataType;
@Schema(description = "订单状态,0未排单1已排单2生产中3加工完成4打包完成5入库完成6出库完成", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@ExcelProperty("订单状态,0未排单1已排单2生产中3加工完成4打包完成5入库完成6出库完成")
private Boolean status;
@Schema(description = "自定义单号", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("自定义单号")
private String customOrderNo;
@Schema(description = "客户", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("客户")
private String customer;
@Schema(description = "客户地址", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("客户地址")
private String address;
@Schema(description = "客户电话", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("客户电话")
private String phoneNumber;
@Schema(description = "经销商", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("经销商")
private String dealer;
@Schema(description = "经销商电话", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("经销商电话")
private String dealerPhoneNumber;
@Schema(description = "业务员", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("业务员")
private String salesman;
@Schema(description = "拆单员", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("拆单员")
private String splitter;
@Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "你猜")
@ExcelProperty("备注")
private String remark;
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("创建时间")
private LocalDateTime createTime;
}
@@ -0,0 +1,77 @@
package com.cf.imes.module.executor.controller.admin.order.vo.order;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import javax.validation.constraints.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
@Schema(description = "管理后台 - 生产单表 order_{N}新增/修改 Request VO")
@Data
public class OrderSaveReqVO {
@Schema(description = "生产单号,主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "15091")
private Long id;
@Schema(description = "父单号", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "父单号不能为空")
private Long parentNo;
@Schema(description = "交付日期", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "交付日期不能为空")
private LocalDateTime deliveryDate;
@Schema(description = "生产单类型,1主单 2子单", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "生产单类型,1主单 2子单不能为空")
private Boolean type;
@Schema(description = "生产单排序号", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "生产单排序号不能为空")
private Integer sort;
@Schema(description = "CAD数据类型,1CAD 2WebCAD 3Excel", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "CAD数据类型,1CAD 2WebCAD 3Excel不能为空")
private Boolean dataType;
@Schema(description = "订单状态,0未排单1已排单2生产中3加工完成4打包完成5入库完成6出库完成", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "订单状态,0未排单1已排单2生产中3加工完成4打包完成5入库完成6出库完成不能为空")
private Boolean status;
@Schema(description = "自定义单号", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "自定义单号不能为空")
private String customOrderNo;
@Schema(description = "客户", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "客户不能为空")
private String customer;
@Schema(description = "客户地址", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "客户地址不能为空")
private String address;
@Schema(description = "客户电话", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "客户电话不能为空")
private String phoneNumber;
@Schema(description = "经销商", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "经销商不能为空")
private String dealer;
@Schema(description = "经销商电话", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "经销商电话不能为空")
private String dealerPhoneNumber;
@Schema(description = "业务员", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "业务员不能为空")
private String salesman;
@Schema(description = "拆单员", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "拆单员不能为空")
private String splitter;
@Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "你猜")
@NotEmpty(message = "备注不能为空")
private String remark;
}
@@ -0,0 +1,119 @@
package com.cf.imes.module.executor.controller.admin.order.vo.plate;
import lombok.*;
import java.util.*;
import io.swagger.v3.oas.annotations.media.Schema;
import com.cf.imes.framework.common.pojo.PageParam;
import java.math.BigDecimal;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import static com.cf.imes.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 PlatePageReqVO extends PageParam {
@Schema(description = "生产单号", example = "934")
private Long orderId;
@Schema(description = "板名称", example = "赵六")
private String name;
@Schema(description = "板类型,0 层板 1 立板 2 背板", example = "1")
private Integer type;
@Schema(description = "商品 ID", example = "24680")
private Long goodsId;
@Schema(description = "宽度")
private BigDecimal width;
@Schema(description = "高度")
private BigDecimal height;
@Schema(description = "厚度")
private BigDecimal thickness;
@Schema(description = "拆单宽度")
private BigDecimal splitWidth;
@Schema(description = "拆单高度")
private BigDecimal splitHeight;
@Schema(description = "拆单厚度")
private BigDecimal splitThickness;
@Schema(description = "左封边厚度")
private BigDecimal sealLeft;
@Schema(description = "右封边厚度")
private BigDecimal sealRight;
@Schema(description = "上封边厚度")
private BigDecimal sealUp;
@Schema(description = "下封边厚度")
private BigDecimal sealDown;
@Schema(description = "面积")
private BigDecimal area;
@Schema(description = "纹路类型,0 正纹 1 可翻转 2 反纹")
private Integer texture;
@Schema(description = "孔面类型,0 正面 1 反面 2 侧面")
private Integer holeFace;
@Schema(description = "排孔类型,0 正纹 1 反面 2 随意面")
private Integer holeArrange;
@Schema(description = "异型孔数量", example = "27841")
private Short unregularPointCount;
@Schema(description = "正面孔数量", example = "16040")
private Short frontHoleCount;
@Schema(description = "背面孔数量", example = "5101")
private Short backHoleCount;
@Schema(description = "侧面孔数量", example = "1790")
private Short sideHoleCount;
@Schema(description = "正面造型量", example = "4076")
private Short frontModelCount;
@Schema(description = "背面造型量", example = "30341")
private Short backModelCount;
@Schema(description = "是否门板")
private Boolean isDoor;
@Schema(description = "开门类型,0 无 1 左 2 右 3 上 4 下", example = "2")
private Boolean openDoorType;
@Schema(description = "异型偏移 x")
private Double offsetX;
@Schema(description = "异型偏移 y")
private Double offsetY;
@Schema(description = "是否孤形对角")
private Boolean isArcAcross;
@Schema(description = "模块类型 ID", example = "21588")
private Long moduleTypeId;
@Schema(description = "排单过滤类型,1 有挖穿造型 2 有挖穿孔 4 有二维刀路 8 可叠", example = "2")
private Boolean filterType;
@Schema(description = "备注", example = "你说的对")
private String remark;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
}
@@ -0,0 +1,153 @@
package com.cf.imes.module.executor.controller.admin.order.vo.plate;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.util.*;
import java.math.BigDecimal;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
@Schema(description = "管理后台 - 生产单板件 Response VO")
@Data
@ExcelIgnoreUnannotated
public class PlateRespVO {
@Schema(description = "板件 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1847")
@ExcelProperty("板件 ID")
private Long id;
@Schema(description = "生产单号", requiredMode = Schema.RequiredMode.REQUIRED, example = "934")
@ExcelProperty("生产单号")
private Long orderId;
@Schema(description = "板名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
@ExcelProperty("板名称")
private String name;
@Schema(description = "板类型,0 层板 1 立板 2 背板", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@ExcelProperty("板类型,0 层板 1 立板 2 背板")
private Integer type;
@Schema(description = "商品 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "24680")
@ExcelProperty("商品 ID")
private Long goodsId;
@Schema(description = "宽度", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("宽度")
private BigDecimal width;
@Schema(description = "高度", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("高度")
private BigDecimal height;
@Schema(description = "厚度", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("厚度")
private BigDecimal thickness;
@Schema(description = "拆单宽度", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("拆单宽度")
private BigDecimal splitWidth;
@Schema(description = "拆单高度", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("拆单高度")
private BigDecimal splitHeight;
@Schema(description = "拆单厚度", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("拆单厚度")
private BigDecimal splitThickness;
@Schema(description = "左封边厚度", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("左封边厚度")
private BigDecimal sealLeft;
@Schema(description = "右封边厚度", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("右封边厚度")
private BigDecimal sealRight;
@Schema(description = "上封边厚度", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("上封边厚度")
private BigDecimal sealUp;
@Schema(description = "下封边厚度", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("下封边厚度")
private BigDecimal sealDown;
@Schema(description = "面积", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("面积")
private BigDecimal area;
@Schema(description = "纹路类型,0 正纹 1 可翻转 2 反纹", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("纹路类型,0 正纹 1 可翻转 2 反纹")
private Integer texture;
@Schema(description = "孔面类型,0 正面 1 反面 2 侧面", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("孔面类型,0 正面 1 反面 2 侧面")
private Integer holeFace;
@Schema(description = "排孔类型,0 正纹 1 反面 2 随意面", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("排孔类型,0 正纹 1 反面 2 随意面")
private Integer holeArrange;
@Schema(description = "异型孔数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "27841")
@ExcelProperty("异型孔数量")
private Short unregularPointCount;
@Schema(description = "正面孔数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "16040")
@ExcelProperty("正面孔数量")
private Short frontHoleCount;
@Schema(description = "背面孔数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "5101")
@ExcelProperty("背面孔数量")
private Short backHoleCount;
@Schema(description = "侧面孔数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1790")
@ExcelProperty("侧面孔数量")
private Short sideHoleCount;
@Schema(description = "正面造型量", requiredMode = Schema.RequiredMode.REQUIRED, example = "4076")
@ExcelProperty("正面造型量")
private Short frontModelCount;
@Schema(description = "背面造型量", requiredMode = Schema.RequiredMode.REQUIRED, example = "30341")
@ExcelProperty("背面造型量")
private Short backModelCount;
@Schema(description = "是否门板", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("是否门板")
private Boolean isDoor;
@Schema(description = "开门类型,0 无 1 左 2 右 3 上 4 下", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
@ExcelProperty("开门类型,0 无 1 左 2 右 3 上 4 下")
private Boolean openDoorType;
@Schema(description = "异型偏移 x", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("异型偏移 x")
private Double offsetX;
@Schema(description = "异型偏移 y", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("异型偏移 y")
private Double offsetY;
@Schema(description = "是否孤形对角", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("是否孤形对角")
private Boolean isArcAcross;
@Schema(description = "模块类型 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "21588")
@ExcelProperty("模块类型 ID")
private Long moduleTypeId;
@Schema(description = "排单过滤类型,1 有挖穿造型 2 有挖穿孔 4 有二维刀路 8 可叠", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
@ExcelProperty("排单过滤类型,1 有挖穿造型 2 有挖穿孔 4 有二维刀路 8 可叠")
private Boolean filterType;
@Schema(description = "备注", example = "你说的对")
@ExcelProperty("备注")
private String remark;
@Schema(description = "创建时间")
@ExcelProperty("创建时间")
private LocalDateTime createTime;
}
@@ -0,0 +1,143 @@
package com.cf.imes.module.executor.controller.admin.order.vo.plate;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import javax.validation.constraints.*;
import java.math.BigDecimal;
@Schema(description = "管理后台 - 生产单板件新增/修改 Request VO")
@Data
public class PlateSaveReqVO {
@Schema(description = "板件 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1847")
private Long id;
@Schema(description = "生产单号", requiredMode = Schema.RequiredMode.REQUIRED, example = "934")
@NotNull(message = "生产单号不能为空")
private Long orderId;
@Schema(description = "板名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
@NotEmpty(message = "板名称不能为空")
private String name;
@Schema(description = "板类型,0 层板 1 立板 2 背板", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "板类型,0 层板 1 立板 2 背板不能为空")
private Integer type;
@Schema(description = "商品 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "24680")
@NotNull(message = "商品 ID不能为空")
private Long goodsId;
@Schema(description = "宽度", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "宽度不能为空")
private BigDecimal width;
@Schema(description = "高度", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "高度不能为空")
private BigDecimal height;
@Schema(description = "厚度", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "厚度不能为空")
private BigDecimal thickness;
@Schema(description = "拆单宽度", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "拆单宽度不能为空")
private BigDecimal splitWidth;
@Schema(description = "拆单高度", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "拆单高度不能为空")
private BigDecimal splitHeight;
@Schema(description = "拆单厚度", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "拆单厚度不能为空")
private BigDecimal splitThickness;
@Schema(description = "左封边厚度", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "左封边厚度不能为空")
private BigDecimal sealLeft;
@Schema(description = "右封边厚度", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "右封边厚度不能为空")
private BigDecimal sealRight;
@Schema(description = "上封边厚度", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "上封边厚度不能为空")
private BigDecimal sealUp;
@Schema(description = "下封边厚度", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "下封边厚度不能为空")
private BigDecimal sealDown;
@Schema(description = "面积", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "面积不能为空")
private BigDecimal area;
@Schema(description = "纹路类型,0 正纹 1 可翻转 2 反纹", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "纹路类型,0 正纹 1 可翻转 2 反纹不能为空")
private Integer texture;
@Schema(description = "孔面类型,0 正面 1 反面 2 侧面", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "孔面类型,0 正面 1 反面 2 侧面不能为空")
private Integer holeFace;
@Schema(description = "排孔类型,0 正纹 1 反面 2 随意面", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "排孔类型,0 正纹 1 反面 2 随意面不能为空")
private Integer holeArrange;
@Schema(description = "异型孔数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "27841")
@NotNull(message = "异型孔数量不能为空")
private Short unregularPointCount;
@Schema(description = "正面孔数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "16040")
@NotNull(message = "正面孔数量不能为空")
private Short frontHoleCount;
@Schema(description = "背面孔数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "5101")
@NotNull(message = "背面孔数量不能为空")
private Short backHoleCount;
@Schema(description = "侧面孔数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1790")
@NotNull(message = "侧面孔数量不能为空")
private Short sideHoleCount;
@Schema(description = "正面造型量", requiredMode = Schema.RequiredMode.REQUIRED, example = "4076")
@NotNull(message = "正面造型量不能为空")
private Short frontModelCount;
@Schema(description = "背面造型量", requiredMode = Schema.RequiredMode.REQUIRED, example = "30341")
@NotNull(message = "背面造型量不能为空")
private Short backModelCount;
@Schema(description = "是否门板", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "是否门板不能为空")
private Boolean isDoor;
@Schema(description = "开门类型,0 无 1 左 2 右 3 上 4 下", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
@NotNull(message = "开门类型,0 无 1 左 2 右 3 上 4 下不能为空")
private Boolean openDoorType;
@Schema(description = "异型偏移 x", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "异型偏移 x不能为空")
private Double offsetX;
@Schema(description = "异型偏移 y", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "异型偏移 y不能为空")
private Double offsetY;
@Schema(description = "是否孤形对角", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "是否孤形对角不能为空")
private Boolean isArcAcross;
@Schema(description = "模块类型 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "21588")
@NotNull(message = "模块类型 ID不能为空")
private Long moduleTypeId;
@Schema(description = "排单过滤类型,1 有挖穿造型 2 有挖穿孔 4 有二维刀路 8 可叠", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
@NotNull(message = "排单过滤类型,1 有挖穿造型 2 有挖穿孔 4 有二维刀路 8 可叠不能为空")
private Boolean filterType;
@Schema(description = "备注", example = "你说的对")
private String remark;
}
@@ -0,0 +1,95 @@
package com.cf.imes.module.executor.controller.admin.orderModuleExtra;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import javax.validation.constraints.*;
import javax.validation.*;
import javax.servlet.http.*;
import java.util.*;
import java.io.IOException;
import com.cf.imes.framework.common.pojo.PageParam;
import com.cf.imes.framework.common.pojo.PageResult;
import com.cf.imes.framework.common.pojo.CommonResult;
import com.cf.imes.framework.common.util.object.BeanUtils;
import static com.cf.imes.framework.common.pojo.CommonResult.success;
import com.cf.imes.framework.excel.core.util.ExcelUtils;
import com.cf.imes.framework.operatelog.core.annotations.OperateLog;
import static com.cf.imes.framework.operatelog.core.enums.OperateTypeEnum.*;
import com.cf.imes.module.executor.controller.admin.orderModuleExtra.vo.*;
import com.cf.imes.module.executor.dal.dataobject.orderModuleExtra.OrderModuleExtraDO;
import com.cf.imes.module.executor.service.orderModuleExtra.OrderModuleExtraService;
@Tag(name = "管理后台 - 生产单模块扩充属性表 order_module_extra_N")
@RestController
@RequestMapping("/executor/order-module-extra")
@Validated
public class OrderModuleExtraController {
@Resource
private OrderModuleExtraService orderModuleExtraService;
@PostMapping("/create")
@Operation(summary = "创建生产单模块扩充属性表 order_module_extra_N")
@PreAuthorize("@ss.hasPermission('executor:order-module-extra:create')")
public CommonResult<Long> createOrderModuleExtra(@Valid @RequestBody OrderModuleExtraSaveReqVO createReqVO) {
return success(orderModuleExtraService.createOrderModuleExtra(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新生产单模块扩充属性表 order_module_extra_N")
@PreAuthorize("@ss.hasPermission('executor:order-module-extra:update')")
public CommonResult<Boolean> updateOrderModuleExtra(@Valid @RequestBody OrderModuleExtraSaveReqVO updateReqVO) {
orderModuleExtraService.updateOrderModuleExtra(updateReqVO);
return success(true);
}
@DeleteMapping("/delete")
@Operation(summary = "删除生产单模块扩充属性表 order_module_extra_N")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('executor:order-module-extra:delete')")
public CommonResult<Boolean> deleteOrderModuleExtra(@RequestParam("id") Long id) {
orderModuleExtraService.deleteOrderModuleExtra(id);
return success(true);
}
@GetMapping("/get")
@Operation(summary = "获得生产单模块扩充属性表 order_module_extra_N")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('executor:order-module-extra:query')")
public CommonResult<OrderModuleExtraRespVO> getOrderModuleExtra(@RequestParam("id") Long id) {
OrderModuleExtraDO orderModuleExtra = orderModuleExtraService.getOrderModuleExtra(id);
return success(BeanUtils.toBean(orderModuleExtra, OrderModuleExtraRespVO.class));
}
@GetMapping("/page")
@Operation(summary = "获得生产单模块扩充属性表 order_module_extra_N分页")
@PreAuthorize("@ss.hasPermission('executor:order-module-extra:query')")
public CommonResult<PageResult<OrderModuleExtraRespVO>> getOrderModuleExtraPage(@Valid OrderModuleExtraPageReqVO pageReqVO) {
PageResult<OrderModuleExtraDO> pageResult = orderModuleExtraService.getOrderModuleExtraPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, OrderModuleExtraRespVO.class));
}
@GetMapping("/export-excel")
@Operation(summary = "导出生产单模块扩充属性表 order_module_extra_N Excel")
@PreAuthorize("@ss.hasPermission('executor:order-module-extra:export')")
@OperateLog(type = EXPORT)
public void exportOrderModuleExtraExcel(@Valid OrderModuleExtraPageReqVO pageReqVO,
HttpServletResponse response) throws IOException {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<OrderModuleExtraDO> list = orderModuleExtraService.getOrderModuleExtraPage(pageReqVO).getList();
// 导出 Excel
ExcelUtils.write(response, "生产单模块扩充属性表 order_module_extra_N.xls", "数据", OrderModuleExtraRespVO.class,
BeanUtils.toBean(list, OrderModuleExtraRespVO.class));
}
}
@@ -0,0 +1,29 @@
package com.cf.imes.module.executor.controller.admin.orderModuleExtra.vo;
import lombok.*;
import java.util.*;
import io.swagger.v3.oas.annotations.media.Schema;
import com.cf.imes.framework.common.pojo.PageParam;
@Schema(description = "管理后台 - 生产单模块扩充属性表 order_module_extra_N分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class OrderModuleExtraPageReqVO extends PageParam {
@Schema(description = "生产单号")
private Long orderNo;
@Schema(description = "房间 ID", example = "273")
private Long roomId;
@Schema(description = "柜体 ID", example = "1826")
private Long bodyId;
@Schema(description = "属性类型:1 板材铰链备注, 2 五金分类, 3 五金尺寸, 4 板材特殊备注, 5 排钻规格, 6 门板组件铰链备注, 7 板材排钻备注, 8 板材额外信息备注, 9 板材自定义编号, 10 门板拉手备注, 11 门板组件拉手备注, 12 五金特殊备注", example = "1")
private Integer type;
@Schema(description = "属性数据")
private String extraData;
}
@@ -0,0 +1,38 @@
package com.cf.imes.module.executor.controller.admin.orderModuleExtra.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.util.*;
import com.alibaba.excel.annotation.*;
@Schema(description = "管理后台 - 生产单模块扩充属性表 order_module_extra_N Response VO")
@Data
@ExcelIgnoreUnannotated
public class OrderModuleExtraRespVO {
@Schema(description = "属性 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "17407")
@ExcelProperty("属性 ID")
private Long id;
@Schema(description = "生产单号", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("生产单号")
private Long orderNo;
@Schema(description = "房间 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "273")
@ExcelProperty("房间 ID")
private Long roomId;
@Schema(description = "柜体 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1826")
@ExcelProperty("柜体 ID")
private Long bodyId;
@Schema(description = "属性类型:1 板材铰链备注, 2 五金分类, 3 五金尺寸, 4 板材特殊备注, 5 排钻规格, 6 门板组件铰链备注, 7 板材排钻备注, 8 板材额外信息备注, 9 板材自定义编号, 10 门板拉手备注, 11 门板组件拉手备注, 12 五金特殊备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@ExcelProperty("属性类型:1 板材铰链备注, 2 五金分类, 3 五金尺寸, 4 板材特殊备注, 5 排钻规格, 6 门板组件铰链备注, 7 板材排钻备注, 8 板材额外信息备注, 9 板材自定义编号, 10 门板拉手备注, 11 门板组件拉手备注, 12 五金特殊备注")
private Integer type;
@Schema(description = "属性数据", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("属性数据")
private String extraData;
}
@@ -0,0 +1,35 @@
package com.cf.imes.module.executor.controller.admin.orderModuleExtra.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import javax.validation.constraints.*;
@Schema(description = "管理后台 - 生产单模块扩充属性表 order_module_extra_N新增/修改 Request VO")
@Data
public class OrderModuleExtraSaveReqVO {
@Schema(description = "属性 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "17407")
private Long id;
@Schema(description = "生产单号", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "生产单号不能为空")
private Long orderNo;
@Schema(description = "房间 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "273")
@NotNull(message = "房间 ID不能为空")
private Long roomId;
@Schema(description = "柜体 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1826")
@NotNull(message = "柜体 ID不能为空")
private Long bodyId;
@Schema(description = "属性类型:1 板材铰链备注, 2 五金分类, 3 五金尺寸, 4 板材特殊备注, 5 排钻规格, 6 门板组件铰链备注, 7 板材排钻备注, 8 板材额外信息备注, 9 板材自定义编号, 10 门板拉手备注, 11 门板组件拉手备注, 12 五金特殊备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "属性类型:1 板材铰链备注, 2 五金分类, 3 五金尺寸, 4 板材特殊备注, 5 排钻规格, 6 门板组件铰链备注, 7 板材排钻备注, 8 板材额外信息备注, 9 板材自定义编号, 10 门板拉手备注, 11 门板组件拉手备注, 12 五金特殊备注不能为空")
private Integer type;
@Schema(description = "属性数据", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "属性数据不能为空")
private String extraData;
}
@@ -0,0 +1,95 @@
package com.cf.imes.module.executor.controller.admin.orderParts;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import javax.validation.constraints.*;
import javax.validation.*;
import javax.servlet.http.*;
import java.util.*;
import java.io.IOException;
import com.cf.imes.framework.common.pojo.PageParam;
import com.cf.imes.framework.common.pojo.PageResult;
import com.cf.imes.framework.common.pojo.CommonResult;
import com.cf.imes.framework.common.util.object.BeanUtils;
import static com.cf.imes.framework.common.pojo.CommonResult.success;
import com.cf.imes.framework.excel.core.util.ExcelUtils;
import com.cf.imes.framework.operatelog.core.annotations.OperateLog;
import static com.cf.imes.framework.operatelog.core.enums.OperateTypeEnum.*;
import com.cf.imes.module.executor.controller.admin.orderParts.vo.*;
import com.cf.imes.module.executor.dal.dataobject.orderParts.OrderPartsDO;
import com.cf.imes.module.executor.service.orderParts.OrderPartsService;
@Tag(name = "管理后台 - 生产单配件表 order_parts_{N}")
@RestController
@RequestMapping("/executor/order-parts")
@Validated
public class OrderPartsController {
@Resource
private OrderPartsService orderPartsService;
@PostMapping("/create")
@Operation(summary = "创建生产单配件表 order_parts_{N}")
@PreAuthorize("@ss.hasPermission('executor:order-parts:create')")
public CommonResult<Long> createOrderParts(@Valid @RequestBody OrderPartsSaveReqVO createReqVO) {
return success(orderPartsService.createOrderParts(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新生产单配件表 order_parts_{N}")
@PreAuthorize("@ss.hasPermission('executor:order-parts:update')")
public CommonResult<Boolean> updateOrderParts(@Valid @RequestBody OrderPartsSaveReqVO updateReqVO) {
orderPartsService.updateOrderParts(updateReqVO);
return success(true);
}
@DeleteMapping("/delete")
@Operation(summary = "删除生产单配件表 order_parts_{N}")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('executor:order-parts:delete')")
public CommonResult<Boolean> deleteOrderParts(@RequestParam("id") Long id) {
orderPartsService.deleteOrderParts(id);
return success(true);
}
@GetMapping("/get")
@Operation(summary = "获得生产单配件表 order_parts_{N}")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('executor:order-parts:query')")
public CommonResult<OrderPartsRespVO> getOrderParts(@RequestParam("id") Long id) {
OrderPartsDO orderParts = orderPartsService.getOrderParts(id);
return success(BeanUtils.toBean(orderParts, OrderPartsRespVO.class));
}
@GetMapping("/page")
@Operation(summary = "获得生产单配件表 order_parts_{N}分页")
@PreAuthorize("@ss.hasPermission('executor:order-parts:query')")
public CommonResult<PageResult<OrderPartsRespVO>> getOrderPartsPage(@Valid OrderPartsPageReqVO pageReqVO) {
PageResult<OrderPartsDO> pageResult = orderPartsService.getOrderPartsPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, OrderPartsRespVO.class));
}
@GetMapping("/export-excel")
@Operation(summary = "导出生产单配件表 order_parts_{N} Excel")
@PreAuthorize("@ss.hasPermission('executor:order-parts:export')")
@OperateLog(type = EXPORT)
public void exportOrderPartsExcel(@Valid OrderPartsPageReqVO pageReqVO,
HttpServletResponse response) throws IOException {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<OrderPartsDO> list = orderPartsService.getOrderPartsPage(pageReqVO).getList();
// 导出 Excel
ExcelUtils.write(response, "生产单配件表 order_parts_{N}.xls", "数据", OrderPartsRespVO.class,
BeanUtils.toBean(list, OrderPartsRespVO.class));
}
}
@@ -0,0 +1,61 @@
package com.cf.imes.module.executor.controller.admin.orderParts.vo;
import lombok.*;
import java.util.*;
import io.swagger.v3.oas.annotations.media.Schema;
import com.cf.imes.framework.common.pojo.PageParam;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import static com.cf.imes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = "管理后台 - 生产单配件表 order_parts_{N}分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class OrderPartsPageReqVO extends PageParam {
@Schema(description = "生产单号")
private Long orderNo;
@Schema(description = "商品ID", example = "1195")
private Long goodsId;
@Schema(description = "配件名称", example = "晨丰")
private String name;
@Schema(description = "材质")
private String material;
@Schema(description = "配件类型", example = "2")
private String type;
@Schema(description = "型号")
private String model;
@Schema(description = "规格")
private String spec;
@Schema(description = "品牌")
private String brand;
@Schema(description = "厂家")
private String factory;
@Schema(description = "单位")
private String unit;
@Schema(description = "价格", example = "29507")
private Double price;
@Schema(description = "是否复合部件:0 否 1 是")
private Boolean isComposite;
@Schema(description = "备注", example = "你猜")
private String remark;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
}
@@ -0,0 +1,76 @@
package com.cf.imes.module.executor.controller.admin.orderParts.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.util.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
@Schema(description = "管理后台 - 生产单配件表 order_parts_{N} Response VO")
@Data
@ExcelIgnoreUnannotated
public class OrderPartsRespVO {
@Schema(description = "配件 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "29347")
@ExcelProperty("配件 ID")
private Long id;
@Schema(description = "生产单号", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("生产单号")
private Long orderNo;
@Schema(description = "商品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1195")
@ExcelProperty("商品ID")
private Long goodsId;
@Schema(description = "配件名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "晨丰")
@ExcelProperty("配件名称")
private String name;
@Schema(description = "材质", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("材质")
private String material;
@Schema(description = "配件类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
@ExcelProperty("配件类型")
private String type;
@Schema(description = "型号", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("型号")
private String model;
@Schema(description = "规格", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("规格")
private String spec;
@Schema(description = "品牌", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("品牌")
private String brand;
@Schema(description = "厂家", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("厂家")
private String factory;
@Schema(description = "单位", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("单位")
private String unit;
@Schema(description = "价格", requiredMode = Schema.RequiredMode.REQUIRED, example = "29507")
@ExcelProperty("价格")
private Double price;
@Schema(description = "是否复合部件:0 否 1 是", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("是否复合部件:0 否 1 是")
private Boolean isComposite;
@Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "你猜")
@ExcelProperty("备注")
private String remark;
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("创建时间")
private LocalDateTime createTime;
}
@@ -0,0 +1,67 @@
package com.cf.imes.module.executor.controller.admin.orderParts.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import javax.validation.constraints.*;
@Schema(description = "管理后台 - 生产单配件表 order_parts_{N}新增/修改 Request VO")
@Data
public class OrderPartsSaveReqVO {
@Schema(description = "配件 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "29347")
private Long id;
@Schema(description = "生产单号", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "生产单号不能为空")
private Long orderNo;
@Schema(description = "商品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1195")
@NotNull(message = "商品ID不能为空")
private Long goodsId;
@Schema(description = "配件名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "晨丰")
@NotEmpty(message = "配件名称不能为空")
private String name;
@Schema(description = "材质", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "材质不能为空")
private String material;
@Schema(description = "配件类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
@NotEmpty(message = "配件类型不能为空")
private String type;
@Schema(description = "型号", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "型号不能为空")
private String model;
@Schema(description = "规格", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "规格不能为空")
private String spec;
@Schema(description = "品牌", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "品牌不能为空")
private String brand;
@Schema(description = "厂家", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "厂家不能为空")
private String factory;
@Schema(description = "单位", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "单位不能为空")
private String unit;
@Schema(description = "价格", requiredMode = Schema.RequiredMode.REQUIRED, example = "29507")
@NotNull(message = "价格不能为空")
private Double price;
@Schema(description = "是否复合部件:0 否 1 是", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "是否复合部件:0 否 1 是不能为空")
private Boolean isComposite;
@Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "你猜")
@NotEmpty(message = "备注不能为空")
private String remark;
}
@@ -0,0 +1 @@
package com.cf.imes.module.executor.controller.admin;
@@ -0,0 +1,102 @@
package com.cf.imes.module.executor.controller.admin.plan;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import javax.validation.constraints.*;
import javax.validation.*;
import javax.servlet.http.*;
import java.util.*;
import java.io.IOException;
import com.cf.imes.framework.common.pojo.PageParam;
import com.cf.imes.framework.common.pojo.PageResult;
import com.cf.imes.framework.common.pojo.CommonResult;
import com.cf.imes.framework.common.util.object.BeanUtils;
import static com.cf.imes.framework.common.pojo.CommonResult.success;
import com.cf.imes.framework.excel.core.util.ExcelUtils;
import com.cf.imes.framework.operatelog.core.annotations.OperateLog;
import static com.cf.imes.framework.operatelog.core.enums.OperateTypeEnum.*;
import com.cf.imes.module.executor.controller.admin.plan.vo.*;
import com.cf.imes.module.executor.dal.dataobject.plan.PlanDO;
import com.cf.imes.module.executor.service.plan.PlanService;
@Tag(name = "管理后台 - 生产单开料排单")
@RestController
@RequestMapping("/executor/plan")
@Validated
public class PlanController {
@Resource
private PlanService planService;
@PostMapping("/create")
@Operation(summary = "创建生产单开料排单")
@PreAuthorize("@ss.hasPermission('executor:plan:create')")
public CommonResult<Long> createPlan(@Valid @RequestBody PlanSaveReqVO createReqVO) {
return success(planService.createPlan(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新生产单开料排单")
@PreAuthorize("@ss.hasPermission('executor:plan:update')")
public CommonResult<Boolean> updatePlan(@Valid @RequestBody PlanSaveReqVO updateReqVO) {
planService.updatePlan(updateReqVO);
return success(true);
}
@DeleteMapping("/delete")
@Operation(summary = "删除生产单开料排单")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('executor:plan:delete')")
public CommonResult<Boolean> deletePlan(@RequestParam("id") Long id) {
planService.deletePlan(id);
return success(true);
}
@GetMapping("/get")
@Operation(summary = "获得生产单开料排单")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('executor:plan:query')")
public CommonResult<PlanRespVO> getPlan(@RequestParam("id") Long id) {
PlanRespVO plan = planService.getPlan(id);
return success(BeanUtils.toBean(plan, PlanRespVO.class));
}
@GetMapping("/page")
@Operation(summary = "获得生产单开料排单分页")
@PreAuthorize("@ss.hasPermission('executor:plan:query')")
public CommonResult<PageResult<PlanRespVO>> getPlanPage(@Valid PlanPageReqVO pageReqVO) {
PageResult<PlanRespVO> pageResult = planService.getPlanPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, PlanRespVO.class));
}
@GetMapping("getOrderPageByPlanId")
@Operation(summary = "获取生产单分页")
@PreAuthorize("@ss.hasPermission('executor:plan:query')")
public CommonResult<PageResult<OrderRespVO>> getOrderPage(@Valid OrderPageReqVO pageReqVO) {
return success(planService.getOrderPage(pageReqVO));
}
@GetMapping("/export-excel")
@Operation(summary = "导出生产单开料排单 Excel")
@PreAuthorize("@ss.hasPermission('executor:plan:export')")
@OperateLog(type = EXPORT)
public void exportPlanExcel(@Valid PlanPageReqVO pageReqVO,
HttpServletResponse response) throws IOException {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<PlanRespVO> list = planService.getPlanPage(pageReqVO).getList();
// 导出 Excel
ExcelUtils.write(response, "生产单开料排单.xls", "数据", PlanRespVO.class,
BeanUtils.toBean(list, PlanRespVO.class));
}
}
@@ -0,0 +1,81 @@
package com.cf.imes.module.executor.controller.admin.plan.vo;
import com.cf.imes.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import static com.cf.imes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
/**
* @author there
*/
@NoArgsConstructor
@Data
public class OrderPageReqVO extends PageParam {
@Schema(description = "生产单id")
private Long orderId;
@Schema(description = "商品id")
private Long goodsId;
@Schema(description = "自定义id")
private String defaultId;
@Schema(description = "客户")
private String consignee;
@Schema(description = "地址")
private String consigneeAddress;
@Schema(description = "状态列表")
private List<Integer> stateList;
@Schema(description = "形状搜索条件")
private CheckDicBean checkDic;
@Schema(description = "开始时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private Date beginDate;
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private Date endDate;
@Schema(description = "长范围")
private LongRangBean longRang;
@Schema(description = "宽范围")
private WidthRangBean widthRang;
@NoArgsConstructor
@Data
public static class CheckDicBean {
@Schema(description = "矩形")
private boolean rectangle;
@Schema(description = "异形")
private boolean specialShaped;
@Schema(description = "造型")
private boolean sculpt;
@Schema(description = "有挖穿造型")
private boolean holeThrough;
@Schema(description = "有挖穿孔")
private boolean burrow;
@Schema(description = "有二维纹路")
private boolean twoDimensionalToolPath;
}
@NoArgsConstructor
@Data
public static class LongRangBean {
@Schema(description = "生产单id")
private BigDecimal min;
@Schema(description = "生产单id")
private BigDecimal max;
}
@NoArgsConstructor
@Data
public static class WidthRangBean {
@Schema(description = "生产单id")
private BigDecimal min;
@Schema(description = "生产单id")
private BigDecimal max;
}
}
@@ -0,0 +1,40 @@
package com.cf.imes.module.executor.controller.admin.plan.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.math.BigDecimal;
import java.util.Date;
import static com.cf.imes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
import static com.cf.imes.framework.common.util.date.DateUtils.TIME_ZONE_DEFAULT;
/**
* @author there
* 排单页面生产单VO
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class OrderRespVO {
@Schema(description = "生产单id")
private Long orderId;
@Schema(description = "自定义单号")
private String defineId;
@Schema(description = "客户")
private String customer;
@Schema(description = "地址")
private String address;
@Schema(description = "交付日期")
@JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND, timezone = TIME_ZONE_DEFAULT)
private Date deliveryDate;
@Schema(description = "片数")
private Integer num;
@Schema(description = "平方")
private BigDecimal area;
}
@@ -0,0 +1,58 @@
package com.cf.imes.module.executor.controller.admin.plan.vo;
import lombok.*;
import java.util.*;
import io.swagger.v3.oas.annotations.media.Schema;
import com.cf.imes.framework.common.pojo.PageParam;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import static com.cf.imes.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 PlanPageReqVO extends PageParam {
@Schema(description = "排单号")
private String planNo;
@Schema(description = "排序优先级")
private Integer sort;
@Schema(description = "排单类型:1 混单排单,2 生产单排单", example = "2")
private Integer type;
@Schema(description = "排单状态:0 新单,1 板材已申请,2 开料中,3 已开料", example = "1")
private Integer status;
@Schema(description = "是否支付:0 否,1 是")
private Boolean isPay;
@Schema(description = "机台 ID", example = "16707")
private Long machineId;
@Schema(description = "计划时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] planTime;
@Schema(description = "生产单号")
private String orderNos;
@Schema(description = "备注", example = "你说的对")
private String remark;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
@Schema(description = "生产操作人")
private String operator;
@Schema(description = "生产时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] produceTime;
}
@@ -0,0 +1,71 @@
package com.cf.imes.module.executor.controller.admin.plan.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.util.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
@Schema(description = "管理后台 - 生产单开料排单 Response VO")
@Data
@ExcelIgnoreUnannotated
public class PlanRespVO {
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "12776")
@ExcelProperty("ID")
private Long id;
@Schema(description = "排单号", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("排单号")
private String planNo;
@Schema(description = "排序优先级", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("排序优先级")
private Integer sort;
@Schema(description = "排单类型:1 混单排单,2 生产单排单", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
@ExcelProperty("排单类型:1 混单排单,2 生产单排单")
private Integer type;
@Schema(description = "排单状态:0 新单,1 板材已申请,2 开料中,3 已开料", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@ExcelProperty("排单状态:0 新单,1 板材已申请,2 开料中,3 已开料")
private Integer status;
@Schema(description = "是否支付:0 否,1 是", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("是否支付:0 否,1 是")
private Boolean isPay;
@Schema(description = "机台 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "16707")
@ExcelProperty("机台 ID")
private Long machineId;
@Schema(description = "计划时间", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("计划时间")
private LocalDateTime planTime;
@Schema(description = "生产单号", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("生产单号")
private String orderNos;
@Schema(description = "板材信息列表", requiredMode = Schema.RequiredMode.REQUIRED)
private List<PlateInfoVO> plateInfoList;
@Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "你说的对")
@ExcelProperty("备注")
private String remark;
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("创建时间")
private LocalDateTime createTime;
@Schema(description = "生产操作人", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("生产操作人")
private String operator;
@Schema(description = "生产时间", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("生产时间")
private LocalDateTime produceTime;
}
@@ -0,0 +1,61 @@
package com.cf.imes.module.executor.controller.admin.plan.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import javax.validation.constraints.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
@Schema(description = "管理后台 - 生产单开料排单新增/修改 Request VO")
@Data
public class PlanSaveReqVO {
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "12776")
private Long id;
@Schema(description = "排单号", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "排单号不能为空")
private String planNo;
@Schema(description = "排序优先级", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "排序优先级不能为空")
private Integer sort;
@Schema(description = "排单类型:1 混单排单,2 生产单排单", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
@NotNull(message = "排单类型:1 混单排单,2 生产单排单不能为空")
private Integer type;
@Schema(description = "排单状态:0 新单,1 板材已申请,2 开料中,3 已开料", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "排单状态:0 新单,1 板材已申请,2 开料中,3 已开料不能为空")
private Integer status;
@Schema(description = "是否支付:0 否,1 是", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "是否支付:0 否,1 是不能为空")
private Boolean isPay;
@Schema(description = "机台 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "16707")
@NotNull(message = "机台 ID不能为空")
private Long machineId;
@Schema(description = "计划时间", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "计划时间不能为空")
private LocalDateTime planTime;
@Schema(description = "生产单id列表", requiredMode = Schema.RequiredMode.REQUIRED)
private List<Long> orderIds;
@Schema(description = "板件id列表")
private List<Long> plateIds;
@Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "你说的对")
private String remark;
@Schema(description = "生产操作人", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "生产操作人不能为空")
private String operator;
@Schema(description = "生产时间", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "生产时间不能为空")
private LocalDateTime produceTime;
}
@@ -0,0 +1,39 @@
package com.cf.imes.module.executor.controller.admin.plan.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
/**
* @author there
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class PlateInfoVO {
@Schema(description = "材质:颗粒板、欧松板、多层板、生态板、禾香板、密度板、实木、铝蜂窝板、铝塑板", requiredMode = Schema.RequiredMode.REQUIRED)
private String material;
@Schema(description = "宽度", requiredMode = Schema.RequiredMode.REQUIRED)
private Double width;
@Schema(description = "高度", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "高度不能为空")
private Double height;
@Schema(description = "厚度", requiredMode = Schema.RequiredMode.REQUIRED)
private Double thickness;
@Schema(description = "面积")
private Double area;
@Schema(description = "数量")
private Integer count;
}
@@ -0,0 +1,95 @@
package com.cf.imes.module.executor.controller.admin.plate;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import javax.validation.constraints.*;
import javax.validation.*;
import javax.servlet.http.*;
import java.util.*;
import java.io.IOException;
import com.cf.imes.framework.common.pojo.PageParam;
import com.cf.imes.framework.common.pojo.PageResult;
import com.cf.imes.framework.common.pojo.CommonResult;
import com.cf.imes.framework.common.util.object.BeanUtils;
import static com.cf.imes.framework.common.pojo.CommonResult.success;
import com.cf.imes.framework.excel.core.util.ExcelUtils;
import com.cf.imes.framework.operatelog.core.annotations.OperateLog;
import static com.cf.imes.framework.operatelog.core.enums.OperateTypeEnum.*;
import com.cf.imes.module.executor.controller.admin.plate.vo.*;
import com.cf.imes.module.executor.dal.dataobject.plate.PlateDO;
import com.cf.imes.module.executor.service.plate.PlateService;
@Tag(name = "管理后台 - 生产单板件")
@RestController
@RequestMapping("/executor/plate")
@Validated
public class PlateController {
@Resource
private PlateService plateService;
@PostMapping("/create")
@Operation(summary = "创建生产单板件")
@PreAuthorize("@ss.hasPermission('executor:plate:create')")
public CommonResult<Long> createPlate(@Valid @RequestBody PlateSaveReqVO createReqVO) {
return success(plateService.createPlate(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新生产单板件")
@PreAuthorize("@ss.hasPermission('executor:plate:update')")
public CommonResult<Boolean> updatePlate(@Valid @RequestBody PlateSaveReqVO updateReqVO) {
plateService.updatePlate(updateReqVO);
return success(true);
}
@DeleteMapping("/delete")
@Operation(summary = "删除生产单板件")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('executor:plate:delete')")
public CommonResult<Boolean> deletePlate(@RequestParam("id") Long id) {
plateService.deletePlate(id);
return success(true);
}
@GetMapping("/get")
@Operation(summary = "获得生产单板件")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('executor:plate:query')")
public CommonResult<PlateRespVO> getPlate(@RequestParam("id") Long id) {
PlateDO plate = plateService.getPlate(id);
return success(BeanUtils.toBean(plate, PlateRespVO.class));
}
@GetMapping("/page")
@Operation(summary = "获得生产单板件分页")
@PreAuthorize("@ss.hasPermission('executor:plate:query')")
public CommonResult<PageResult<PlateRespVO>> getPlatePage(@Valid PlatePageReqVO pageReqVO) {
PageResult<PlateDO> pageResult = plateService.getPlatePage(pageReqVO);
return success(BeanUtils.toBean(pageResult, PlateRespVO.class));
}
@GetMapping("/export-excel")
@Operation(summary = "导出生产单板件 Excel")
@PreAuthorize("@ss.hasPermission('executor:plate:export')")
@OperateLog(type = EXPORT)
public void exportPlateExcel(@Valid PlatePageReqVO pageReqVO,
HttpServletResponse response) throws IOException {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<PlateDO> list = plateService.getPlatePage(pageReqVO).getList();
// 导出 Excel
ExcelUtils.write(response, "生产单板件.xls", "数据", PlateRespVO.class,
BeanUtils.toBean(list, PlateRespVO.class));
}
}
@@ -0,0 +1,118 @@
package com.cf.imes.module.executor.controller.admin.plate.vo;
import lombok.*;
import java.util.*;
import io.swagger.v3.oas.annotations.media.Schema;
import com.cf.imes.framework.common.pojo.PageParam;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import static com.cf.imes.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 PlatePageReqVO extends PageParam {
@Schema(description = "生产单号", example = "17851")
private Long orderId;
@Schema(description = "板名称", example = "李四")
private String name;
@Schema(description = "板类型,0 层板 1 立板 2 背板", example = "2")
private Integer type;
@Schema(description = "商品 ID", example = "28756")
private Long goodsId;
@Schema(description = "宽度")
private Double width;
@Schema(description = "高度")
private Double height;
@Schema(description = "厚度")
private Double thickness;
@Schema(description = "拆单宽度")
private Double splitWidth;
@Schema(description = "拆单高度")
private Double splitHeight;
@Schema(description = "拆单厚度")
private Double splitThickness;
@Schema(description = "左封边厚度")
private Double sealLeft;
@Schema(description = "右封边厚度")
private Double sealRight;
@Schema(description = "上封边厚度")
private Double sealUp;
@Schema(description = "下封边厚度")
private Double sealDown;
@Schema(description = "面积")
private Double area;
@Schema(description = "纹路类型,0 正纹 1 可翻转 2 反纹")
private Integer texture;
@Schema(description = "孔面类型,0 正面 1 反面 2 侧面")
private Integer holeFace;
@Schema(description = "排孔类型,0 正纹 1 反面 2 随意面")
private Integer holeArrange;
@Schema(description = "异型孔数量", example = "32490")
private Short unregularPointCount;
@Schema(description = "正面孔数量", example = "4077")
private Short frontHoleCount;
@Schema(description = "背面孔数量", example = "2405")
private Short backHoleCount;
@Schema(description = "侧面孔数量", example = "1493")
private Short sideHoleCount;
@Schema(description = "正面造型量", example = "23489")
private Short frontModelCount;
@Schema(description = "背面造型量", example = "5176")
private Short backModelCount;
@Schema(description = "是否门板")
private Boolean isDoor;
@Schema(description = "开门类型,0 无 1 左 2 右 3 上 4 下", example = "2")
private Boolean openDoorType;
@Schema(description = "异型偏移 x")
private Double offsetX;
@Schema(description = "异型偏移 y")
private Double offsetY;
@Schema(description = "是否孤形对角")
private Boolean isArcAcross;
@Schema(description = "模块类型 ID", example = "15992")
private Long moduleTypeId;
@Schema(description = "排单过滤类型,1 有挖穿造型 2 有挖穿孔 4 有二维刀路 8 可叠", example = "1")
private Boolean filterType;
@Schema(description = "备注", example = "你说的对")
private String remark;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
}
@@ -0,0 +1,152 @@
package com.cf.imes.module.executor.controller.admin.plate.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.util.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
@Schema(description = "管理后台 - 生产单板件 Response VO")
@Data
@ExcelIgnoreUnannotated
public class PlateRespVO {
@Schema(description = "板件 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "5782")
@ExcelProperty("板件 ID")
private Long id;
@Schema(description = "生产单号", requiredMode = Schema.RequiredMode.REQUIRED, example = "17851")
@ExcelProperty("生产单号")
private Long orderId;
@Schema(description = "板名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
@ExcelProperty("板名称")
private String name;
@Schema(description = "板类型,0 层板 1 立板 2 背板", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
@ExcelProperty("板类型,0 层板 1 立板 2 背板")
private Integer type;
@Schema(description = "商品 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "28756")
@ExcelProperty("商品 ID")
private Long goodsId;
@Schema(description = "宽度", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("宽度")
private Double width;
@Schema(description = "高度", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("高度")
private Double height;
@Schema(description = "厚度", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("厚度")
private Double thickness;
@Schema(description = "拆单宽度", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("拆单宽度")
private Double splitWidth;
@Schema(description = "拆单高度", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("拆单高度")
private Double splitHeight;
@Schema(description = "拆单厚度", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("拆单厚度")
private Double splitThickness;
@Schema(description = "左封边厚度", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("左封边厚度")
private Double sealLeft;
@Schema(description = "右封边厚度", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("右封边厚度")
private Double sealRight;
@Schema(description = "上封边厚度", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("上封边厚度")
private Double sealUp;
@Schema(description = "下封边厚度", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("下封边厚度")
private Double sealDown;
@Schema(description = "面积", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("面积")
private Double area;
@Schema(description = "纹路类型,0 正纹 1 可翻转 2 反纹", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("纹路类型,0 正纹 1 可翻转 2 反纹")
private Integer texture;
@Schema(description = "孔面类型,0 正面 1 反面 2 侧面", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("孔面类型,0 正面 1 反面 2 侧面")
private Integer holeFace;
@Schema(description = "排孔类型,0 正纹 1 反面 2 随意面", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("排孔类型,0 正纹 1 反面 2 随意面")
private Integer holeArrange;
@Schema(description = "异型孔数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "32490")
@ExcelProperty("异型孔数量")
private Short unregularPointCount;
@Schema(description = "正面孔数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "4077")
@ExcelProperty("正面孔数量")
private Short frontHoleCount;
@Schema(description = "背面孔数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "2405")
@ExcelProperty("背面孔数量")
private Short backHoleCount;
@Schema(description = "侧面孔数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1493")
@ExcelProperty("侧面孔数量")
private Short sideHoleCount;
@Schema(description = "正面造型量", requiredMode = Schema.RequiredMode.REQUIRED, example = "23489")
@ExcelProperty("正面造型量")
private Short frontModelCount;
@Schema(description = "背面造型量", requiredMode = Schema.RequiredMode.REQUIRED, example = "5176")
@ExcelProperty("背面造型量")
private Short backModelCount;
@Schema(description = "是否门板", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("是否门板")
private Boolean isDoor;
@Schema(description = "开门类型,0 无 1 左 2 右 3 上 4 下", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
@ExcelProperty("开门类型,0 无 1 左 2 右 3 上 4 下")
private Boolean openDoorType;
@Schema(description = "异型偏移 x", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("异型偏移 x")
private Double offsetX;
@Schema(description = "异型偏移 y", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("异型偏移 y")
private Double offsetY;
@Schema(description = "是否孤形对角", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("是否孤形对角")
private Boolean isArcAcross;
@Schema(description = "模块类型 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "15992")
@ExcelProperty("模块类型 ID")
private Long moduleTypeId;
@Schema(description = "排单过滤类型,1 有挖穿造型 2 有挖穿孔 4 有二维刀路 8 可叠", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@ExcelProperty("排单过滤类型,1 有挖穿造型 2 有挖穿孔 4 有二维刀路 8 可叠")
private Boolean filterType;
@Schema(description = "备注", example = "你说的对")
@ExcelProperty("备注")
private String remark;
@Schema(description = "创建时间")
@ExcelProperty("创建时间")
private LocalDateTime createTime;
}
@@ -0,0 +1,142 @@
package com.cf.imes.module.executor.controller.admin.plate.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import javax.validation.constraints.*;
@Schema(description = "管理后台 - 生产单板件新增/修改 Request VO")
@Data
public class PlateSaveReqVO {
@Schema(description = "板件 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "5782")
private Long id;
@Schema(description = "生产单号", requiredMode = Schema.RequiredMode.REQUIRED, example = "17851")
@NotNull(message = "生产单号不能为空")
private Long orderId;
@Schema(description = "板名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
@NotEmpty(message = "板名称不能为空")
private String name;
@Schema(description = "板类型,0 层板 1 立板 2 背板", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
@NotNull(message = "板类型,0 层板 1 立板 2 背板不能为空")
private Integer type;
@Schema(description = "商品 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "28756")
@NotNull(message = "商品 ID不能为空")
private Long goodsId;
@Schema(description = "宽度", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "宽度不能为空")
private Double width;
@Schema(description = "高度", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "高度不能为空")
private Double height;
@Schema(description = "厚度", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "厚度不能为空")
private Double thickness;
@Schema(description = "拆单宽度", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "拆单宽度不能为空")
private Double splitWidth;
@Schema(description = "拆单高度", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "拆单高度不能为空")
private Double splitHeight;
@Schema(description = "拆单厚度", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "拆单厚度不能为空")
private Double splitThickness;
@Schema(description = "左封边厚度", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "左封边厚度不能为空")
private Double sealLeft;
@Schema(description = "右封边厚度", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "右封边厚度不能为空")
private Double sealRight;
@Schema(description = "上封边厚度", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "上封边厚度不能为空")
private Double sealUp;
@Schema(description = "下封边厚度", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "下封边厚度不能为空")
private Double sealDown;
@Schema(description = "面积", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "面积不能为空")
private Double area;
@Schema(description = "纹路类型,0 正纹 1 可翻转 2 反纹", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "纹路类型,0 正纹 1 可翻转 2 反纹不能为空")
private Integer texture;
@Schema(description = "孔面类型,0 正面 1 反面 2 侧面", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "孔面类型,0 正面 1 反面 2 侧面不能为空")
private Integer holeFace;
@Schema(description = "排孔类型,0 正纹 1 反面 2 随意面", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "排孔类型,0 正纹 1 反面 2 随意面不能为空")
private Integer holeArrange;
@Schema(description = "异型孔数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "32490")
@NotNull(message = "异型孔数量不能为空")
private Short unregularPointCount;
@Schema(description = "正面孔数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "4077")
@NotNull(message = "正面孔数量不能为空")
private Short frontHoleCount;
@Schema(description = "背面孔数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "2405")
@NotNull(message = "背面孔数量不能为空")
private Short backHoleCount;
@Schema(description = "侧面孔数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1493")
@NotNull(message = "侧面孔数量不能为空")
private Short sideHoleCount;
@Schema(description = "正面造型量", requiredMode = Schema.RequiredMode.REQUIRED, example = "23489")
@NotNull(message = "正面造型量不能为空")
private Short frontModelCount;
@Schema(description = "背面造型量", requiredMode = Schema.RequiredMode.REQUIRED, example = "5176")
@NotNull(message = "背面造型量不能为空")
private Short backModelCount;
@Schema(description = "是否门板", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "是否门板不能为空")
private Boolean isDoor;
@Schema(description = "开门类型,0 无 1 左 2 右 3 上 4 下", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
@NotNull(message = "开门类型,0 无 1 左 2 右 3 上 4 下不能为空")
private Boolean openDoorType;
@Schema(description = "异型偏移 x", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "异型偏移 x不能为空")
private Double offsetX;
@Schema(description = "异型偏移 y", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "异型偏移 y不能为空")
private Double offsetY;
@Schema(description = "是否孤形对角", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "是否孤形对角不能为空")
private Boolean isArcAcross;
@Schema(description = "模块类型 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "15992")
@NotNull(message = "模块类型 ID不能为空")
private Long moduleTypeId;
@Schema(description = "排单过滤类型,1 有挖穿造型 2 有挖穿孔 4 有二维刀路 8 可叠", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "排单过滤类型,1 有挖穿造型 2 有挖穿孔 4 有二维刀路 8 可叠不能为空")
private Boolean filterType;
@Schema(description = "备注", example = "你说的对")
private String remark;
}
@@ -0,0 +1 @@
package com.cf.imes.module.executor.controller;
@@ -0,0 +1,79 @@
package com.cf.imes.module.executor.dal.dataobject.goods;
import lombok.*;
import java.util.*;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.*;
import com.cf.imes.framework.mybatis.core.dataobject.BaseDO;
/**
* 生产单商品 DO
*
* @author 晨丰科技
*/
@TableName("order_goods")
@KeySequence("order_goods_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class GoodsDO extends BaseDO {
/**
* 主键
*/
@TableId
private Long id;
/**
* 生产单号
*/
private Long orderNo;
/**
* 商品 ID
*/
private Long goodsId;
/**
* 商品名称
*/
private String goodsName;
/**
* 材质:颗粒板、欧松板、多层板、生态板、禾香板、密度板、实木、铝蜂窝板、铝塑板
*/
private String material;
/**
* 颜色
*/
private String color;
/**
* 宽度
*/
private Double width;
/**
* 高度
*/
private Double height;
/**
* 厚度
*/
private Double thickness;
/**
* 价格
*/
private Double price;
/**
* 品牌
*/
private String brand;
/**
* 规格
*/
private String spec;
/**
* 备注
*/
private String remark;
}
@@ -0,0 +1,91 @@
package com.cf.imes.module.executor.dal.dataobject.module;
import lombok.*;
import java.util.*;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.*;
import com.cf.imes.framework.mybatis.core.dataobject.BaseDO;
/**
* 生产单模块 DO
*
* @author 晨丰科技
*/
@TableName("order_module_n")
@KeySequence("order_module_n_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ModuleDO extends BaseDO {
/**
* 模块 ID
*/
@TableId
private Long id;
/**
* 生产单号
*/
private Long orderNo;
/**
* 模块名称
*/
private String name;
/**
* 父节点 ID,模块间根据module_type构成树形结构
*/
private Long parentId;
/**
* 模块组 ID
*/
private Long groupId;
/**
* 报价项目 ID
*/
private Integer offerId;
/**
* 模块类型,1 房间 2 柜体 3 加工组类型 4 加工组名
*/
private Integer type;
/**
* 模块宽度
*/
private Double width;
/**
* 模块高度
*/
private Double height;
/**
* 模块深度
*/
private Double depth;
/**
* 模块复制数量
*/
private Short multiNum;
/**
* 源模块 ID,模块是复制的,则为源模块ID,否则为0
*/
private Long sourceId;
/**
* 板材数量
*/
private Short plateNum;
/**
* 异型数量
*/
private Short unregularNum;
/**
* 文件名
*/
private String filename;
/**
* 备注
*/
private String remark;
}
@@ -0,0 +1,53 @@
package com.cf.imes.module.executor.dal.dataobject.moduleitem;
import lombok.*;
import java.util.*;
import com.baomidou.mybatisplus.annotation.*;
import com.cf.imes.framework.mybatis.core.dataobject.BaseDO;
/**
* 生产单模块明细 DO
*
* @author 晨丰科技
*/
@TableName("order_module_item_n")
@KeySequence("order_module_item_n_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ModuleItemDO extends BaseDO {
/**
* 记录 ID
*/
@TableId
private Long id;
/**
* 生产单号
*/
private Long orderNo;
/**
* 房间 ID
*/
private Long roomId;
/**
* 柜体 ID
*/
private Long bodyId;
/**
* 模块类型 ID
*/
private Long typeId;
/**
* 模块 ID
*/
private Long moduleId;
/**
* 明细 ID
*/
private Long itemId;
}
@@ -0,0 +1,93 @@
package com.cf.imes.module.executor.dal.dataobject.order;
import com.cf.imes.framework.organ.core.db.OrganBaseDO;
import lombok.*;
import java.util.*;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.*;
import com.cf.imes.framework.mybatis.core.dataobject.BaseDO;
/**
* 生产单表 order_{N} DO
*
* @author 晨丰科技
*/
@TableName("order")
@KeySequence("order_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class OrderDO extends OrganBaseDO {
/**
* 生产单号,主键
*/
@TableId
private Long id;
/**
* 父单号
*/
private Long parentNo;
/**
* 交付日期
*/
private LocalDateTime deliveryDate;
/**
* 生产单类型,1主单 2子单
*/
private Boolean type;
/**
* 生产单排序号
*/
private Integer sort;
/**
* CAD数据类型,1CAD 2WebCAD 3Excel
*/
private Boolean dataType;
/**
* 订单状态,0未排单1已排单2生产中3加工完成4打包完成5入库完成6出库完成
*/
private Boolean status;
/**
* 自定义单号
*/
private String customOrderNo;
/**
* 客户
*/
private String customer;
/**
* 客户地址
*/
private String address;
/**
* 客户电话
*/
private String phoneNumber;
/**
* 经销商
*/
private String dealer;
/**
* 经销商电话
*/
private String dealerPhoneNumber;
/**
* 业务员
*/
private String salesman;
/**
* 拆单员
*/
private String splitter;
/**
* 备注
*/
private String remark;
}
@@ -0,0 +1,61 @@
package com.cf.imes.module.executor.dal.dataobject.order;
import lombok.*;
import java.util.*;
import com.baomidou.mybatisplus.annotation.*;
import com.cf.imes.framework.mybatis.core.dataobject.BaseDO;
/**
* 生产单明细表 order_item_{N} DO
*
* @author 晨丰科技
*/
@TableName("order_item")
@KeySequence("order_item_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class OrderItemDO extends BaseDO {
/**
* 明细编号
*/
@TableId
private Long id;
/**
* 生产单号
*/
private Long orderId;
/**
* 明细类型,1 板材 2 五金/配件 3 其他 4 报价配件
*/
private Integer type;
/**
* 房间 ID
*/
private Long roomId;
/**
* 柜体 ID
*/
private Long bodyId;
/**
* 数据 ID
*/
private Long dataId;
/**
* 排单 ID
*/
private Long planId;
/**
* 包裹 ID
*/
private Long packageId;
/**
* 部件数量
*/
private Double num;
}
@@ -0,0 +1,170 @@
package com.cf.imes.module.executor.dal.dataobject.order;
import lombok.*;
import java.util.*;
import java.math.BigDecimal;
import java.math.BigDecimal;
import java.math.BigDecimal;
import java.math.BigDecimal;
import java.math.BigDecimal;
import java.math.BigDecimal;
import java.math.BigDecimal;
import java.math.BigDecimal;
import java.math.BigDecimal;
import java.math.BigDecimal;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.*;
import com.cf.imes.framework.mybatis.core.dataobject.BaseDO;
/**
* 生产单板件 DO
*
* @author 晨丰科技
*/
@TableName("order_plate")
@KeySequence("order_plate_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class PlateDO extends BaseDO {
/**
* 板件 ID
*/
@TableId
private Long id;
/**
* 生产单号
*/
private Long orderId;
/**
* 板名称
*/
private String name;
/**
* 板类型,0 层板 1 立板 2 背板
*/
private Integer type;
/**
* 商品 ID
*/
private Long goodsId;
/**
* 宽度
*/
private BigDecimal width;
/**
* 高度
*/
private BigDecimal height;
/**
* 厚度
*/
private BigDecimal thickness;
/**
* 拆单宽度
*/
private BigDecimal splitWidth;
/**
* 拆单高度
*/
private BigDecimal splitHeight;
/**
* 拆单厚度
*/
private BigDecimal splitThickness;
/**
* 左封边厚度
*/
private BigDecimal sealLeft;
/**
* 右封边厚度
*/
private BigDecimal sealRight;
/**
* 上封边厚度
*/
private BigDecimal sealUp;
/**
* 下封边厚度
*/
private BigDecimal sealDown;
/**
* 面积
*/
private BigDecimal area;
/**
* 纹路类型,0 正纹 1 可翻转 2 反纹
*/
private Integer texture;
/**
* 孔面类型,0 正面 1 反面 2 侧面
*/
private Integer holeFace;
/**
* 排孔类型,0 正纹 1 反面 2 随意面
*/
private Integer holeArrange;
/**
* 异型孔数量
*/
private Short unregularPointCount;
/**
* 正面孔数量
*/
private Short frontHoleCount;
/**
* 背面孔数量
*/
private Short backHoleCount;
/**
* 侧面孔数量
*/
private Short sideHoleCount;
/**
* 正面造型量
*/
private Short frontModelCount;
/**
* 背面造型量
*/
private Short backModelCount;
/**
* 是否门板
*/
private Boolean isDoor;
/**
* 开门类型,0 无 1 左 2 右 3 上 4 下
*/
private Boolean openDoorType;
/**
* 异型偏移 x
*/
private Double offsetX;
/**
* 异型偏移 y
*/
private Double offsetY;
/**
* 是否孤形对角
*/
private Boolean isArcAcross;
/**
* 模块类型 ID
*/
private Long moduleTypeId;
/**
* 排单过滤类型,1 有挖穿造型 2 有挖穿孔 4 有二维刀路 8 可叠
*/
private Boolean filterType;
/**
* 备注
*/
private String remark;
}
@@ -0,0 +1,64 @@
package com.cf.imes.module.executor.dal.dataobject.orderItem;
import lombok.*;
import java.util.*;
import com.baomidou.mybatisplus.annotation.*;
import com.cf.imes.framework.mybatis.core.dataobject.BaseDO;
/**
* 生产单明细表 order_item DO
*
* @author 晨丰科技
*/
@TableName("order_item")
@KeySequence("order_item_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
@Data
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class OrderItemDO {
/**
* 明细编号
*/
@TableId
private Long id;
/**
* 生产单号
*/
private Long orderId;
/**
* 明细类型,1 板材 2 五金/配件 3 其他 4 报价配件
*/
private Integer type;
/**
* 房间 ID
*/
private Long roomId;
/**
* 柜体 ID
*/
private Long bodyId;
/**
* 数据 ID
*/
private Long dataId;
/**
* 排单 ID
*/
private Long planId;
/**
* 包裹 ID
*/
private Long packageId;
/**
* 部件数量
*/
private Double num;
/**
* 组织id
*/
private Long organId;
}
@@ -0,0 +1,49 @@
package com.cf.imes.module.executor.dal.dataobject.orderModuleExtra;
import lombok.*;
import java.util.*;
import com.baomidou.mybatisplus.annotation.*;
import com.cf.imes.framework.mybatis.core.dataobject.BaseDO;
/**
* 生产单模块扩充属性表 order_module_extra_N DO
*
* @author 晨丰科技
*/
@TableName("order_module_extra_n")
@KeySequence("order_module_extra_n_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class OrderModuleExtraDO extends BaseDO {
/**
* 属性 ID
*/
@TableId
private Long id;
/**
* 生产单号
*/
private Long orderNo;
/**
* 房间 ID
*/
private Long roomId;
/**
* 柜体 ID
*/
private Long bodyId;
/**
* 属性类型:1 板材铰链备注, 2 五金分类, 3 五金尺寸, 4 板材特殊备注, 5 排钻规格, 6 门板组件铰链备注, 7 板材排钻备注, 8 板材额外信息备注, 9 板材自定义编号, 10 门板拉手备注, 11 门板组件拉手备注, 12 五金特殊备注
*/
private Integer type;
/**
* 属性数据
*/
private String extraData;
}
@@ -0,0 +1,83 @@
package com.cf.imes.module.executor.dal.dataobject.orderParts;
import lombok.*;
import java.util.*;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.*;
import com.cf.imes.framework.mybatis.core.dataobject.BaseDO;
/**
* 生产单配件表 order_parts_{N} DO
*
* @author 晨丰科技
*/
@TableName("order_parts_n")
@KeySequence("order_parts_n_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class OrderPartsDO extends BaseDO {
/**
* 配件 ID
*/
@TableId
private Long id;
/**
* 生产单号
*/
private Long orderNo;
/**
* 商品ID
*/
private Long goodsId;
/**
* 配件名称
*/
private String name;
/**
* 材质
*/
private String material;
/**
* 配件类型
*/
private String type;
/**
* 型号
*/
private String model;
/**
* 规格
*/
private String spec;
/**
* 品牌
*/
private String brand;
/**
* 厂家
*/
private String factory;
/**
* 单位
*/
private String unit;
/**
* 价格
*/
private Double price;
/**
* 是否复合部件:0 否 1 是
*/
private Boolean isComposite;
/**
* 备注
*/
private String remark;
}
@@ -0,0 +1 @@
package com.cf.imes.module.executor.dal.dataobject;
@@ -0,0 +1,78 @@
package com.cf.imes.module.executor.dal.dataobject.plan;
import lombok.*;
import java.util.*;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.*;
import com.cf.imes.framework.mybatis.core.dataobject.BaseDO;
/**
* 生产单开料排单 DO
*
* @author 晨丰科技
*/
@TableName("order_plan")
@KeySequence("order_plan_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class PlanDO extends BaseDO {
/**
* ID
*/
@TableId
private Long id;
/**
* 排单号
*/
private String planNo;
/**
* 排序优先级
*/
private Integer sort;
/**
* 排单类型:1 混单排单,2 生产单排单
*/
private Integer type;
/**
* 排单状态:0 新单,1 板材已申请,2 开料中,3 已开料
*/
private Integer status;
/**
* 是否支付:0 否,1 是
*/
private Boolean isPay;
/**
* 机台 ID
*/
private Long machineId;
/**
* 计划时间
*/
private LocalDateTime planTime;
/**
* 生产单号
*/
private String orderNos;
/**
* 备注
*/
private String remark;
/**
* 生产操作人
*/
private String operator;
/**
* 生产时间
*/
private LocalDateTime produceTime;
}
@@ -0,0 +1,40 @@
package com.cf.imes.module.executor.dal.dataobject.planitem;
import lombok.*;
import java.util.*;
import com.baomidou.mybatisplus.annotation.*;
import com.cf.imes.framework.mybatis.core.dataobject.BaseDO;
/**
* 生产单开料排单明细 DO
*
* @author 晨丰科技
*/
@TableName("order_plan_item")
@KeySequence("order_plan_item_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
@Data
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class PlanItemDO {
/**
* 主键
*/
@TableId
private Long id;
/**
* 明细 ID
*/
private Long itemId;
/**
* 排单 ID
*/
private Long planId;
/**
* 组织id
*/
private Long organId;
}
@@ -0,0 +1,40 @@
package com.cf.imes.module.executor.dal.dataobject.planorder;
import lombok.*;
import java.util.*;
import com.baomidou.mybatisplus.annotation.*;
import com.cf.imes.framework.mybatis.core.dataobject.BaseDO;
/**
* 排单生产单关联 DO
*
* @author 晨丰科技
*/
@TableName("prod_plan_order")
@KeySequence("prod_plan_order_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
@Data
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class PlanOrderDO {
/**
* 主键
*/
@TableId
private Long id;
/**
* 排单id
*/
private Long planId;
/**
* 生产单id
*/
private Long orderId;
/**
* 组织id
*/
private Long organId;
}
@@ -0,0 +1,170 @@
package com.cf.imes.module.executor.dal.dataobject.plate;
import lombok.*;
import java.util.*;
import java.math.BigDecimal;
import java.math.BigDecimal;
import java.math.BigDecimal;
import java.math.BigDecimal;
import java.math.BigDecimal;
import java.math.BigDecimal;
import java.math.BigDecimal;
import java.math.BigDecimal;
import java.math.BigDecimal;
import java.math.BigDecimal;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.*;
import com.cf.imes.framework.mybatis.core.dataobject.BaseDO;
/**
* 生产单板件 DO
*
* @author 晨丰科技
*/
@TableName("order_plate")
@KeySequence("order_plate_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class PlateDO extends BaseDO {
/**
* 板件 ID
*/
@TableId
private Long id;
/**
* 生产单号
*/
private Long orderId;
/**
* 板名称
*/
private String name;
/**
* 板类型,0 层板 1 立板 2 背板
*/
private Integer type;
/**
* 商品 ID
*/
private Long goodsId;
/**
* 宽度
*/
private BigDecimal width;
/**
* 高度
*/
private BigDecimal height;
/**
* 厚度
*/
private BigDecimal thickness;
/**
* 拆单宽度
*/
private BigDecimal splitWidth;
/**
* 拆单高度
*/
private BigDecimal splitHeight;
/**
* 拆单厚度
*/
private BigDecimal splitThickness;
/**
* 左封边厚度
*/
private BigDecimal sealLeft;
/**
* 右封边厚度
*/
private BigDecimal sealRight;
/**
* 上封边厚度
*/
private BigDecimal sealUp;
/**
* 下封边厚度
*/
private BigDecimal sealDown;
/**
* 面积
*/
private BigDecimal area;
/**
* 纹路类型,0 正纹 1 可翻转 2 反纹
*/
private Integer texture;
/**
* 孔面类型,0 正面 1 反面 2 侧面
*/
private Integer holeFace;
/**
* 排孔类型,0 正纹 1 反面 2 随意面
*/
private Integer holeArrange;
/**
* 异型孔数量
*/
private Short unregularPointCount;
/**
* 正面孔数量
*/
private Short frontHoleCount;
/**
* 背面孔数量
*/
private Short backHoleCount;
/**
* 侧面孔数量
*/
private Short sideHoleCount;
/**
* 正面造型量
*/
private Short frontModelCount;
/**
* 背面造型量
*/
private Short backModelCount;
/**
* 是否门板
*/
private Boolean isDoor;
/**
* 开门类型,0 无 1 左 2 右 3 上 4 下
*/
private Boolean openDoorType;
/**
* 异型偏移 x
*/
private Double offsetX;
/**
* 异型偏移 y
*/
private Double offsetY;
/**
* 是否孤形对角
*/
private Boolean isArcAcross;
/**
* 模块类型 ID
*/
private Long moduleTypeId;
/**
* 排单过滤类型,1 有挖穿造型 2 有挖穿孔 4 有二维刀路 8 可叠
*/
private Boolean filterType;
/**
* 备注
*/
private String remark;
}
@@ -0,0 +1,22 @@
{
"OrderNo": 4545,
"defaultId": "",
"Consignee": "",
"ConsigneeAddress": "",
"StateList": [
4
],
"PageIndex": 1,
"PageSize": 10,
"CheckDic": {
"specialShaped" : true,
"sculpt": true,
"holeThrough": true,
"burrow": true,
"twoDimensionalToolPath": true,
"longRang": {"min": 1.01, "max": 1.5},
"widthRang": {"min": 1.01, "max": 1.5}
},
"beginDate": "2024-02-04",
"endDate": "2024-03-04"
}
@@ -0,0 +1,23 @@
package com.cf.imes.module.executor.dal.dataobject.register;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
/**
* @author there
*/
@Data
@TableName("system_db_register")
public class RegisterDO {
@TableId
private Integer id;
private String code;
private String dbUrl;
private String dbUsername;
private String dbPassword;
}
@@ -0,0 +1 @@
package com.cf.imes.module.executor.dal.dataobject.register;
@@ -0,0 +1,38 @@
package com.cf.imes.module.executor.dal.mysql.goods;
import java.util.*;
import com.cf.imes.framework.common.pojo.PageResult;
import com.cf.imes.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.cf.imes.framework.mybatis.core.mapper.BaseMapperX;
import com.cf.imes.module.executor.dal.dataobject.goods.GoodsDO;
import org.apache.ibatis.annotations.Mapper;
import com.cf.imes.module.executor.controller.admin.goods.vo.*;
/**
* 生产单商品 Mapper
*
* @author 晨丰科技
*/
@Mapper
public interface GoodsMapper extends BaseMapperX<GoodsDO> {
default PageResult<GoodsDO> selectPage(GoodsPageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<GoodsDO>()
.eqIfPresent(GoodsDO::getOrderNo, reqVO.getOrderNo())
.eqIfPresent(GoodsDO::getGoodsId, reqVO.getGoodsId())
.likeIfPresent(GoodsDO::getGoodsName, reqVO.getGoodsName())
.eqIfPresent(GoodsDO::getMaterial, reqVO.getMaterial())
.eqIfPresent(GoodsDO::getColor, reqVO.getColor())
.eqIfPresent(GoodsDO::getWidth, reqVO.getWidth())
.eqIfPresent(GoodsDO::getHeight, reqVO.getHeight())
.eqIfPresent(GoodsDO::getThickness, reqVO.getThickness())
.eqIfPresent(GoodsDO::getPrice, reqVO.getPrice())
.eqIfPresent(GoodsDO::getBrand, reqVO.getBrand())
.eqIfPresent(GoodsDO::getSpec, reqVO.getSpec())
.eqIfPresent(GoodsDO::getRemark, reqVO.getRemark())
.betweenIfPresent(GoodsDO::getCreateTime, reqVO.getCreateTime())
.orderByDesc(GoodsDO::getId));
}
}
@@ -0,0 +1,41 @@
package com.cf.imes.module.executor.dal.mysql.module;
import java.util.*;
import com.cf.imes.framework.common.pojo.PageResult;
import com.cf.imes.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.cf.imes.framework.mybatis.core.mapper.BaseMapperX;
import com.cf.imes.module.executor.dal.dataobject.module.ModuleDO;
import org.apache.ibatis.annotations.Mapper;
import com.cf.imes.module.executor.controller.admin.module.vo.*;
/**
* 生产单模块 Mapper
*
* @author 晨丰科技
*/
@Mapper
public interface ModuleMapper extends BaseMapperX<ModuleDO> {
default PageResult<ModuleDO> selectPage(ModulePageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<ModuleDO>()
.eqIfPresent(ModuleDO::getOrderNo, reqVO.getOrderNo())
.likeIfPresent(ModuleDO::getName, reqVO.getName())
.eqIfPresent(ModuleDO::getParentId, reqVO.getParentId())
.eqIfPresent(ModuleDO::getGroupId, reqVO.getGroupId())
.eqIfPresent(ModuleDO::getOfferId, reqVO.getOfferId())
.eqIfPresent(ModuleDO::getType, reqVO.getType())
.eqIfPresent(ModuleDO::getWidth, reqVO.getWidth())
.eqIfPresent(ModuleDO::getHeight, reqVO.getHeight())
.eqIfPresent(ModuleDO::getDepth, reqVO.getDepth())
.eqIfPresent(ModuleDO::getMultiNum, reqVO.getMultiNum())
.eqIfPresent(ModuleDO::getSourceId, reqVO.getSourceId())
.eqIfPresent(ModuleDO::getPlateNum, reqVO.getPlateNum())
.eqIfPresent(ModuleDO::getUnregularNum, reqVO.getUnregularNum())
.likeIfPresent(ModuleDO::getFilename, reqVO.getFilename())
.eqIfPresent(ModuleDO::getRemark, reqVO.getRemark())
.betweenIfPresent(ModuleDO::getCreateTime, reqVO.getCreateTime())
.orderByDesc(ModuleDO::getId));
}
}
@@ -0,0 +1,31 @@
package com.cf.imes.module.executor.dal.mysql.moduleitem;
import java.util.*;
import com.cf.imes.framework.common.pojo.PageResult;
import com.cf.imes.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.cf.imes.framework.mybatis.core.mapper.BaseMapperX;
import com.cf.imes.module.executor.dal.dataobject.moduleitem.ModuleItemDO;
import org.apache.ibatis.annotations.Mapper;
import com.cf.imes.module.executor.controller.admin.moduleitem.vo.*;
/**
* 生产单模块明细 Mapper
*
* @author 晨丰科技
*/
@Mapper
public interface ModuleItemMapper extends BaseMapperX<ModuleItemDO> {
default PageResult<ModuleItemDO> selectPage(ModuleItemPageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<ModuleItemDO>()
.eqIfPresent(ModuleItemDO::getOrderNo, reqVO.getOrderNo())
.eqIfPresent(ModuleItemDO::getRoomId, reqVO.getRoomId())
.eqIfPresent(ModuleItemDO::getBodyId, reqVO.getBodyId())
.eqIfPresent(ModuleItemDO::getTypeId, reqVO.getTypeId())
.eqIfPresent(ModuleItemDO::getModuleId, reqVO.getModuleId())
.eqIfPresent(ModuleItemDO::getItemId, reqVO.getItemId())
.orderByDesc(ModuleItemDO::getId));
}
}
@@ -0,0 +1,31 @@
package com.cf.imes.module.executor.dal.mysql.order;
import com.cf.imes.framework.common.pojo.PageResult;
import com.cf.imes.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.cf.imes.framework.mybatis.core.mapper.BaseMapperX;
import com.cf.imes.module.executor.controller.admin.order.vo.item.OrderItemPageReqVO;
import com.cf.imes.module.executor.dal.dataobject.order.OrderItemDO;
import org.apache.ibatis.annotations.Mapper;
/**
* 生产单明细表 order_item_{N} Mapper
*
* @author 晨丰科技
*/
@Mapper
public interface OrderItemMapper extends BaseMapperX<OrderItemDO> {
default PageResult<OrderItemDO> selectPage(OrderItemPageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<OrderItemDO>()
.eqIfPresent(OrderItemDO::getOrderId, reqVO.getOrderId())
.eqIfPresent(OrderItemDO::getType, reqVO.getType())
.eqIfPresent(OrderItemDO::getRoomId, reqVO.getRoomId())
.eqIfPresent(OrderItemDO::getBodyId, reqVO.getBodyId())
.eqIfPresent(OrderItemDO::getDataId, reqVO.getDataId())
.eqIfPresent(OrderItemDO::getPlanId, reqVO.getPlanId())
.eqIfPresent(OrderItemDO::getPackageId, reqVO.getPackageId())
.eqIfPresent(OrderItemDO::getNum, reqVO.getNum())
.orderByDesc(OrderItemDO::getId));
}
}
@@ -0,0 +1,19 @@
package com.cf.imes.module.executor.dal.mysql.order;
import java.util.*;
import com.cf.imes.framework.common.pojo.PageResult;
import com.cf.imes.framework.mybatis.core.mapper.BaseMapperX;
import com.cf.imes.module.executor.dal.dataobject.order.OrderDO;
import org.apache.ibatis.annotations.Mapper;
/**
* 生产单表 order_{N} Mapper
*
* @author 晨丰科技
*/
@Mapper
public interface OrderMapper extends BaseMapperX<OrderDO> {
}
@@ -0,0 +1,56 @@
package com.cf.imes.module.executor.dal.mysql.order;
import com.cf.imes.framework.common.pojo.PageResult;
import com.cf.imes.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.cf.imes.framework.mybatis.core.mapper.BaseMapperX;
import com.cf.imes.module.executor.controller.admin.order.vo.plate.PlatePageReqVO;
import com.cf.imes.module.executor.dal.dataobject.order.PlateDO;
import org.apache.ibatis.annotations.Mapper;
/**
* 生产单板件 Mapper
*
* @author 晨丰科技
*/
@Mapper
public interface PlateMapper extends BaseMapperX<PlateDO> {
default PageResult<PlateDO> selectPage(PlatePageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<PlateDO>()
.eqIfPresent(PlateDO::getOrderId, reqVO.getOrderId())
.likeIfPresent(PlateDO::getName, reqVO.getName())
.eqIfPresent(PlateDO::getType, reqVO.getType())
.eqIfPresent(PlateDO::getGoodsId, reqVO.getGoodsId())
.eqIfPresent(PlateDO::getWidth, reqVO.getWidth())
.eqIfPresent(PlateDO::getHeight, reqVO.getHeight())
.eqIfPresent(PlateDO::getThickness, reqVO.getThickness())
.eqIfPresent(PlateDO::getSplitWidth, reqVO.getSplitWidth())
.eqIfPresent(PlateDO::getSplitHeight, reqVO.getSplitHeight())
.eqIfPresent(PlateDO::getSplitThickness, reqVO.getSplitThickness())
.eqIfPresent(PlateDO::getSealLeft, reqVO.getSealLeft())
.eqIfPresent(PlateDO::getSealRight, reqVO.getSealRight())
.eqIfPresent(PlateDO::getSealUp, reqVO.getSealUp())
.eqIfPresent(PlateDO::getSealDown, reqVO.getSealDown())
.eqIfPresent(PlateDO::getArea, reqVO.getArea())
.eqIfPresent(PlateDO::getTexture, reqVO.getTexture())
.eqIfPresent(PlateDO::getHoleFace, reqVO.getHoleFace())
.eqIfPresent(PlateDO::getHoleArrange, reqVO.getHoleArrange())
.eqIfPresent(PlateDO::getUnregularPointCount, reqVO.getUnregularPointCount())
.eqIfPresent(PlateDO::getFrontHoleCount, reqVO.getFrontHoleCount())
.eqIfPresent(PlateDO::getBackHoleCount, reqVO.getBackHoleCount())
.eqIfPresent(PlateDO::getSideHoleCount, reqVO.getSideHoleCount())
.eqIfPresent(PlateDO::getFrontModelCount, reqVO.getFrontModelCount())
.eqIfPresent(PlateDO::getBackModelCount, reqVO.getBackModelCount())
.eqIfPresent(PlateDO::getIsDoor, reqVO.getIsDoor())
.eqIfPresent(PlateDO::getOpenDoorType, reqVO.getOpenDoorType())
.eqIfPresent(PlateDO::getOffsetX, reqVO.getOffsetX())
.eqIfPresent(PlateDO::getOffsetY, reqVO.getOffsetY())
.eqIfPresent(PlateDO::getIsArcAcross, reqVO.getIsArcAcross())
.eqIfPresent(PlateDO::getModuleTypeId, reqVO.getModuleTypeId())
.eqIfPresent(PlateDO::getFilterType, reqVO.getFilterType())
.eqIfPresent(PlateDO::getRemark, reqVO.getRemark())
.betweenIfPresent(PlateDO::getCreateTime, reqVO.getCreateTime())
.orderByDesc(PlateDO::getId));
}
}
@@ -0,0 +1,20 @@
package com.cf.imes.module.executor.dal.mysql.orderItem;
import java.util.*;
import com.cf.imes.framework.common.pojo.PageResult;
import com.cf.imes.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.cf.imes.framework.mybatis.core.mapper.BaseMapperX;
import com.cf.imes.module.executor.dal.dataobject.orderItem.OrderItemDO;
import org.apache.ibatis.annotations.Mapper;
/**
* 生产单明细表 order_item Mapper
*
* @author 晨丰科技
*/
@Mapper
public interface OrderItemMapper extends BaseMapperX<OrderItemDO> {
}
@@ -0,0 +1,30 @@
package com.cf.imes.module.executor.dal.mysql.orderModuleExtra;
import java.util.*;
import com.cf.imes.framework.common.pojo.PageResult;
import com.cf.imes.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.cf.imes.framework.mybatis.core.mapper.BaseMapperX;
import com.cf.imes.module.executor.dal.dataobject.orderModuleExtra.OrderModuleExtraDO;
import org.apache.ibatis.annotations.Mapper;
import com.cf.imes.module.executor.controller.admin.orderModuleExtra.vo.*;
/**
* 生产单模块扩充属性表 order_module_extra_N Mapper
*
* @author 晨丰科技
*/
@Mapper
public interface OrderModuleExtraMapper extends BaseMapperX<OrderModuleExtraDO> {
default PageResult<OrderModuleExtraDO> selectPage(OrderModuleExtraPageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<OrderModuleExtraDO>()
.eqIfPresent(OrderModuleExtraDO::getOrderNo, reqVO.getOrderNo())
.eqIfPresent(OrderModuleExtraDO::getRoomId, reqVO.getRoomId())
.eqIfPresent(OrderModuleExtraDO::getBodyId, reqVO.getBodyId())
.eqIfPresent(OrderModuleExtraDO::getType, reqVO.getType())
.eqIfPresent(OrderModuleExtraDO::getExtraData, reqVO.getExtraData())
.orderByDesc(OrderModuleExtraDO::getId));
}
}
@@ -0,0 +1,39 @@
package com.cf.imes.module.executor.dal.mysql.orderParts;
import java.util.*;
import com.cf.imes.framework.common.pojo.PageResult;
import com.cf.imes.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.cf.imes.framework.mybatis.core.mapper.BaseMapperX;
import com.cf.imes.module.executor.dal.dataobject.orderParts.OrderPartsDO;
import org.apache.ibatis.annotations.Mapper;
import com.cf.imes.module.executor.controller.admin.orderParts.vo.*;
/**
* 生产单配件表 order_parts_{N} Mapper
*
* @author 晨丰科技
*/
@Mapper
public interface OrderPartsMapper extends BaseMapperX<OrderPartsDO> {
default PageResult<OrderPartsDO> selectPage(OrderPartsPageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<OrderPartsDO>()
.eqIfPresent(OrderPartsDO::getOrderNo, reqVO.getOrderNo())
.eqIfPresent(OrderPartsDO::getGoodsId, reqVO.getGoodsId())
.likeIfPresent(OrderPartsDO::getName, reqVO.getName())
.eqIfPresent(OrderPartsDO::getMaterial, reqVO.getMaterial())
.eqIfPresent(OrderPartsDO::getType, reqVO.getType())
.eqIfPresent(OrderPartsDO::getModel, reqVO.getModel())
.eqIfPresent(OrderPartsDO::getSpec, reqVO.getSpec())
.eqIfPresent(OrderPartsDO::getBrand, reqVO.getBrand())
.eqIfPresent(OrderPartsDO::getFactory, reqVO.getFactory())
.eqIfPresent(OrderPartsDO::getUnit, reqVO.getUnit())
.eqIfPresent(OrderPartsDO::getPrice, reqVO.getPrice())
.eqIfPresent(OrderPartsDO::getIsComposite, reqVO.getIsComposite())
.eqIfPresent(OrderPartsDO::getRemark, reqVO.getRemark())
.betweenIfPresent(OrderPartsDO::getCreateTime, reqVO.getCreateTime())
.orderByDesc(OrderPartsDO::getId));
}
}
@@ -0,0 +1 @@
package com.cf.imes.module.executor.dal.mysql;
@@ -0,0 +1,37 @@
package com.cf.imes.module.executor.dal.mysql.plan;
import java.util.*;
import com.cf.imes.framework.common.pojo.PageResult;
import com.cf.imes.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.cf.imes.framework.mybatis.core.mapper.BaseMapperX;
import com.cf.imes.module.executor.dal.dataobject.plan.PlanDO;
import org.apache.ibatis.annotations.Mapper;
import com.cf.imes.module.executor.controller.admin.plan.vo.*;
/**
* 生产单开料排单 Mapper
*
* @author 晨丰科技
*/
@Mapper
public interface PlanMapper extends BaseMapperX<PlanDO> {
default PageResult<PlanDO> selectPage(PlanPageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<PlanDO>()
.eqIfPresent(PlanDO::getPlanNo, reqVO.getPlanNo())
.eqIfPresent(PlanDO::getSort, reqVO.getSort())
.eqIfPresent(PlanDO::getType, reqVO.getType())
.eqIfPresent(PlanDO::getStatus, reqVO.getStatus())
.eqIfPresent(PlanDO::getIsPay, reqVO.getIsPay())
.eqIfPresent(PlanDO::getMachineId, reqVO.getMachineId())
.betweenIfPresent(PlanDO::getPlanTime, reqVO.getPlanTime())
.eqIfPresent(PlanDO::getOrderNos, reqVO.getOrderNos())
.eqIfPresent(PlanDO::getRemark, reqVO.getRemark())
.betweenIfPresent(PlanDO::getCreateTime, reqVO.getCreateTime())
.eqIfPresent(PlanDO::getOperator, reqVO.getOperator())
.betweenIfPresent(PlanDO::getProduceTime, reqVO.getProduceTime())
.orderByDesc(PlanDO::getId));
}
}
@@ -0,0 +1,20 @@
package com.cf.imes.module.executor.dal.mysql.planitem;
import java.util.*;
import com.cf.imes.framework.common.pojo.PageResult;
import com.cf.imes.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.cf.imes.framework.mybatis.core.mapper.BaseMapperX;
import com.cf.imes.module.executor.dal.dataobject.planitem.PlanItemDO;
import org.apache.ibatis.annotations.Mapper;
/**
* 生产单开料排单明细 Mapper
*
* @author 晨丰科技
*/
@Mapper
public interface PlanItemMapper extends BaseMapperX<PlanItemDO> {
}
@@ -0,0 +1,20 @@
package com.cf.imes.module.executor.dal.mysql.planorder;
import java.util.*;
import com.cf.imes.framework.common.pojo.PageResult;
import com.cf.imes.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.cf.imes.framework.mybatis.core.mapper.BaseMapperX;
import com.cf.imes.module.executor.dal.dataobject.planorder.PlanOrderDO;
import org.apache.ibatis.annotations.Mapper;
/**
* 排单生产单关联 Mapper
*
* @author 晨丰科技
*/
@Mapper
public interface PlanOrderMapper extends BaseMapperX<PlanOrderDO> {
}
@@ -0,0 +1,58 @@
package com.cf.imes.module.executor.dal.mysql.plate;
import java.util.*;
import com.cf.imes.framework.common.pojo.PageResult;
import com.cf.imes.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.cf.imes.framework.mybatis.core.mapper.BaseMapperX;
import com.cf.imes.module.executor.dal.dataobject.plate.PlateDO;
import org.apache.ibatis.annotations.Mapper;
import com.cf.imes.module.executor.controller.admin.plate.vo.*;
/**
* 生产单板件 Mapper
*
* @author 晨丰科技
*/
@Mapper
public interface PlateMapper extends BaseMapperX<PlateDO> {
default PageResult<PlateDO> selectPage(PlatePageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<PlateDO>()
.eqIfPresent(PlateDO::getOrderId, reqVO.getOrderId())
.likeIfPresent(PlateDO::getName, reqVO.getName())
.eqIfPresent(PlateDO::getType, reqVO.getType())
.eqIfPresent(PlateDO::getGoodsId, reqVO.getGoodsId())
.eqIfPresent(PlateDO::getWidth, reqVO.getWidth())
.eqIfPresent(PlateDO::getHeight, reqVO.getHeight())
.eqIfPresent(PlateDO::getThickness, reqVO.getThickness())
.eqIfPresent(PlateDO::getSplitWidth, reqVO.getSplitWidth())
.eqIfPresent(PlateDO::getSplitHeight, reqVO.getSplitHeight())
.eqIfPresent(PlateDO::getSplitThickness, reqVO.getSplitThickness())
.eqIfPresent(PlateDO::getSealLeft, reqVO.getSealLeft())
.eqIfPresent(PlateDO::getSealRight, reqVO.getSealRight())
.eqIfPresent(PlateDO::getSealUp, reqVO.getSealUp())
.eqIfPresent(PlateDO::getSealDown, reqVO.getSealDown())
.eqIfPresent(PlateDO::getArea, reqVO.getArea())
.eqIfPresent(PlateDO::getTexture, reqVO.getTexture())
.eqIfPresent(PlateDO::getHoleFace, reqVO.getHoleFace())
.eqIfPresent(PlateDO::getHoleArrange, reqVO.getHoleArrange())
.eqIfPresent(PlateDO::getUnregularPointCount, reqVO.getUnregularPointCount())
.eqIfPresent(PlateDO::getFrontHoleCount, reqVO.getFrontHoleCount())
.eqIfPresent(PlateDO::getBackHoleCount, reqVO.getBackHoleCount())
.eqIfPresent(PlateDO::getSideHoleCount, reqVO.getSideHoleCount())
.eqIfPresent(PlateDO::getFrontModelCount, reqVO.getFrontModelCount())
.eqIfPresent(PlateDO::getBackModelCount, reqVO.getBackModelCount())
.eqIfPresent(PlateDO::getIsDoor, reqVO.getIsDoor())
.eqIfPresent(PlateDO::getOpenDoorType, reqVO.getOpenDoorType())
.eqIfPresent(PlateDO::getOffsetX, reqVO.getOffsetX())
.eqIfPresent(PlateDO::getOffsetY, reqVO.getOffsetY())
.eqIfPresent(PlateDO::getIsArcAcross, reqVO.getIsArcAcross())
.eqIfPresent(PlateDO::getModuleTypeId, reqVO.getModuleTypeId())
.eqIfPresent(PlateDO::getFilterType, reqVO.getFilterType())
.eqIfPresent(PlateDO::getRemark, reqVO.getRemark())
.betweenIfPresent(PlateDO::getCreateTime, reqVO.getCreateTime())
.orderByDesc(PlateDO::getId));
}
}
@@ -0,0 +1,18 @@
package com.cf.imes.module.executor.dal.mysql.register;
import com.cf.imes.framework.mybatis.core.mapper.BaseMapperX;
import com.cf.imes.module.executor.dal.dataobject.register.RegisterDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/**
* @author there
*/
@Mapper
public interface RegisterMapper extends BaseMapperX<RegisterDO> {
@Select("select * from system_db_register")
List<RegisterDO> findAll();
}
@@ -0,0 +1,13 @@
package com.cf.imes.module.executor.framework.rpc.config;
import com.cf.imes.module.system.api.user.AdminUserApi;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Configuration;
/**
* @author there
*/
@Configuration(proxyBeanMethods = false)
@EnableFeignClients(clients = AdminUserApi.class)
public class RpcConfiguration {
}
@@ -0,0 +1,4 @@
/**
* 占位
*/
package com.cf.imes.module.executor.framework.rpc;
@@ -0,0 +1,42 @@
package com.cf.imes.module.executor.framework.security.config;
import com.cf.imes.framework.security.config.AuthorizeRequestsCustomizer;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configurers.ExpressionUrlAuthorizationConfigurer;
/**
* Infra 模块的 Security 配置
* @author there
*/
@Configuration(proxyBeanMethods = false, value = "executorSecurityConfiguration")
public class SecurityConfiguration {
@Value("${spring.boot.admin.context-path:''}")
private String adminSeverContextPath;
@Bean("executorAuthorizeRequestsCustomizer")
public AuthorizeRequestsCustomizer authorizeRequestsCustomizer() {
return new AuthorizeRequestsCustomizer() {
@Override
public void customize(ExpressionUrlAuthorizationConfigurer<HttpSecurity>.ExpressionInterceptUrlRegistry registry) {
// Swagger 接口文档
registry.antMatchers("/v3/api-docs/**").permitAll() // 元数据
.antMatchers("/swagger-ui.html").permitAll(); // Swagger UI
// Spring Boot Actuator 的安全配置
registry.antMatchers("/actuator").anonymous()
.antMatchers("/actuator/**").anonymous();
// Druid 监控
registry.antMatchers("/druid/**").anonymous();
// RPC 服务的安全配置
registry.antMatchers("/rpc-api/executor/**").permitAll();
}
};
}
}
@@ -0,0 +1,4 @@
/**
* 占位
*/
package com.cf.imes.module.executor.framework.security.core;
@@ -0,0 +1,55 @@
package com.cf.imes.module.executor.service.goods;
import java.util.*;
import javax.validation.*;
import com.cf.imes.module.executor.controller.admin.goods.vo.*;
import com.cf.imes.module.executor.dal.dataobject.goods.GoodsDO;
import com.cf.imes.framework.common.pojo.PageResult;
import com.cf.imes.framework.common.pojo.PageParam;
/**
* 生产单商品 Service 接口
*
* @author 晨丰科技
*/
public interface GoodsService {
/**
* 创建生产单商品
*
* @param createReqVO 创建信息
* @return 编号
*/
Long createGoods(@Valid GoodsSaveReqVO createReqVO);
/**
* 更新生产单商品
*
* @param updateReqVO 更新信息
*/
void updateGoods(@Valid GoodsSaveReqVO updateReqVO);
/**
* 删除生产单商品
*
* @param id 编号
*/
void deleteGoods(Long id);
/**
* 获得生产单商品
*
* @param id 编号
* @return 生产单商品
*/
GoodsDO getGoods(Long id);
/**
* 获得生产单商品分页
*
* @param pageReqVO 分页查询
* @return 生产单商品分页
*/
PageResult<GoodsDO> getGoodsPage(GoodsPageReqVO pageReqVO);
}
@@ -0,0 +1,74 @@
package com.cf.imes.module.executor.service.goods;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.transaction.annotation.Transactional;
import java.util.*;
import com.cf.imes.module.executor.controller.admin.goods.vo.*;
import com.cf.imes.module.executor.dal.dataobject.goods.GoodsDO;
import com.cf.imes.framework.common.pojo.PageResult;
import com.cf.imes.framework.common.pojo.PageParam;
import com.cf.imes.framework.common.util.object.BeanUtils;
import com.cf.imes.module.executor.dal.mysql.goods.GoodsMapper;
import static com.cf.imes.framework.common.exception.util.ServiceExceptionUtil.exception;
import static com.cf.imes.module.executor.enums.ErrorCodeConstants.*;
/**
* 生产单商品 Service 实现类
*
* @author 晨丰科技
*/
@Service
@Validated
public class GoodsServiceImpl implements GoodsService {
@Resource
private GoodsMapper goodsMapper;
@Override
public Long createGoods(GoodsSaveReqVO createReqVO) {
// 插入
GoodsDO goods = BeanUtils.toBean(createReqVO, GoodsDO.class);
goodsMapper.insert(goods);
// 返回
return goods.getId();
}
@Override
public void updateGoods(GoodsSaveReqVO updateReqVO) {
// 校验存在
validateGoodsExists(updateReqVO.getId());
// 更新
GoodsDO updateObj = BeanUtils.toBean(updateReqVO, GoodsDO.class);
goodsMapper.updateById(updateObj);
}
@Override
public void deleteGoods(Long id) {
// 校验存在
validateGoodsExists(id);
// 删除
goodsMapper.deleteById(id);
}
private void validateGoodsExists(Long id) {
if (goodsMapper.selectById(id) == null) {
throw exception(GOODS_NOT_EXISTS);
}
}
@Override
public GoodsDO getGoods(Long id) {
return goodsMapper.selectById(id);
}
@Override
public PageResult<GoodsDO> getGoodsPage(GoodsPageReqVO pageReqVO) {
return goodsMapper.selectPage(pageReqVO);
}
}
@@ -0,0 +1,55 @@
package com.cf.imes.module.executor.service.module;
import java.util.*;
import javax.validation.*;
import com.cf.imes.module.executor.controller.admin.module.vo.*;
import com.cf.imes.module.executor.dal.dataobject.module.ModuleDO;
import com.cf.imes.framework.common.pojo.PageResult;
import com.cf.imes.framework.common.pojo.PageParam;
/**
* 生产单模块 Service 接口
*
* @author 晨丰科技
*/
public interface ModuleService {
/**
* 创建生产单模块
*
* @param createReqVO 创建信息
* @return 编号
*/
Long createModule(@Valid ModuleSaveReqVO createReqVO);
/**
* 更新生产单模块
*
* @param updateReqVO 更新信息
*/
void updateModule(@Valid ModuleSaveReqVO updateReqVO);
/**
* 删除生产单模块
*
* @param id 编号
*/
void deleteModule(Long id);
/**
* 获得生产单模块
*
* @param id 编号
* @return 生产单模块
*/
ModuleDO getModule(Long id);
/**
* 获得生产单模块分页
*
* @param pageReqVO 分页查询
* @return 生产单模块分页
*/
PageResult<ModuleDO> getModulePage(ModulePageReqVO pageReqVO);
}
@@ -0,0 +1,74 @@
package com.cf.imes.module.executor.service.module;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.transaction.annotation.Transactional;
import java.util.*;
import com.cf.imes.module.executor.controller.admin.module.vo.*;
import com.cf.imes.module.executor.dal.dataobject.module.ModuleDO;
import com.cf.imes.framework.common.pojo.PageResult;
import com.cf.imes.framework.common.pojo.PageParam;
import com.cf.imes.framework.common.util.object.BeanUtils;
import com.cf.imes.module.executor.dal.mysql.module.ModuleMapper;
import static com.cf.imes.framework.common.exception.util.ServiceExceptionUtil.exception;
import static com.cf.imes.module.executor.enums.ErrorCodeConstants.*;
/**
* 生产单模块 Service 实现类
*
* @author 晨丰科技
*/
@Service
@Validated
public class ModuleServiceImpl implements ModuleService {
@Resource
private ModuleMapper moduleMapper;
@Override
public Long createModule(ModuleSaveReqVO createReqVO) {
// 插入
ModuleDO module = BeanUtils.toBean(createReqVO, ModuleDO.class);
moduleMapper.insert(module);
// 返回
return module.getId();
}
@Override
public void updateModule(ModuleSaveReqVO updateReqVO) {
// 校验存在
validateModuleExists(updateReqVO.getId());
// 更新
ModuleDO updateObj = BeanUtils.toBean(updateReqVO, ModuleDO.class);
moduleMapper.updateById(updateObj);
}
@Override
public void deleteModule(Long id) {
// 校验存在
validateModuleExists(id);
// 删除
moduleMapper.deleteById(id);
}
private void validateModuleExists(Long id) {
if (moduleMapper.selectById(id) == null) {
throw exception(MODULE_NOT_EXISTS);
}
}
@Override
public ModuleDO getModule(Long id) {
return moduleMapper.selectById(id);
}
@Override
public PageResult<ModuleDO> getModulePage(ModulePageReqVO pageReqVO) {
return moduleMapper.selectPage(pageReqVO);
}
}
@@ -0,0 +1,55 @@
package com.cf.imes.module.executor.service.moduleitem;
import java.util.*;
import javax.validation.*;
import com.cf.imes.module.executor.controller.admin.moduleitem.vo.*;
import com.cf.imes.module.executor.dal.dataobject.moduleitem.ModuleItemDO;
import com.cf.imes.framework.common.pojo.PageResult;
import com.cf.imes.framework.common.pojo.PageParam;
/**
* 生产单模块明细 Service 接口
*
* @author 晨丰科技
*/
public interface ModuleItemService {
/**
* 创建生产单模块明细
*
* @param createReqVO 创建信息
* @return 编号
*/
Long createModuleItem(@Valid ModuleItemSaveReqVO createReqVO);
/**
* 更新生产单模块明细
*
* @param updateReqVO 更新信息
*/
void updateModuleItem(@Valid ModuleItemSaveReqVO updateReqVO);
/**
* 删除生产单模块明细
*
* @param id 编号
*/
void deleteModuleItem(Long id);
/**
* 获得生产单模块明细
*
* @param id 编号
* @return 生产单模块明细
*/
ModuleItemDO getModuleItem(Long id);
/**
* 获得生产单模块明细分页
*
* @param pageReqVO 分页查询
* @return 生产单模块明细分页
*/
PageResult<ModuleItemDO> getModuleItemPage(ModuleItemPageReqVO pageReqVO);
}
@@ -0,0 +1,74 @@
package com.cf.imes.module.executor.service.moduleitem;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.transaction.annotation.Transactional;
import java.util.*;
import com.cf.imes.module.executor.controller.admin.moduleitem.vo.*;
import com.cf.imes.module.executor.dal.dataobject.moduleitem.ModuleItemDO;
import com.cf.imes.framework.common.pojo.PageResult;
import com.cf.imes.framework.common.pojo.PageParam;
import com.cf.imes.framework.common.util.object.BeanUtils;
import com.cf.imes.module.executor.dal.mysql.moduleitem.ModuleItemMapper;
import static com.cf.imes.framework.common.exception.util.ServiceExceptionUtil.exception;
import static com.cf.imes.module.executor.enums.ErrorCodeConstants.*;
/**
* 生产单模块明细 Service 实现类
*
* @author 晨丰科技
*/
@Service
@Validated
public class ModuleItemServiceImpl implements ModuleItemService {
@Resource
private ModuleItemMapper moduleItemMapper;
@Override
public Long createModuleItem(ModuleItemSaveReqVO createReqVO) {
// 插入
ModuleItemDO moduleItem = BeanUtils.toBean(createReqVO, ModuleItemDO.class);
moduleItemMapper.insert(moduleItem);
// 返回
return moduleItem.getId();
}
@Override
public void updateModuleItem(ModuleItemSaveReqVO updateReqVO) {
// 校验存在
validateModuleItemExists(updateReqVO.getId());
// 更新
ModuleItemDO updateObj = BeanUtils.toBean(updateReqVO, ModuleItemDO.class);
moduleItemMapper.updateById(updateObj);
}
@Override
public void deleteModuleItem(Long id) {
// 校验存在
validateModuleItemExists(id);
// 删除
moduleItemMapper.deleteById(id);
}
private void validateModuleItemExists(Long id) {
if (moduleItemMapper.selectById(id) == null) {
throw exception(MODULE_ITEM_NOT_EXISTS);
}
}
@Override
public ModuleItemDO getModuleItem(Long id) {
return moduleItemMapper.selectById(id);
}
@Override
public PageResult<ModuleItemDO> getModuleItemPage(ModuleItemPageReqVO pageReqVO) {
return moduleItemMapper.selectPage(pageReqVO);
}
}
@@ -0,0 +1,55 @@
package com.cf.imes.module.executor.service.order;
import javax.validation.*;
import com.cf.imes.module.executor.controller.admin.order.vo.item.OrderItemPageReqVO;
import com.cf.imes.module.executor.controller.admin.order.vo.item.OrderItemSaveReqVO;
import com.cf.imes.module.executor.dal.dataobject.order.OrderItemDO;
import com.cf.imes.framework.common.pojo.PageResult;
/**
* 生产单明细表 order_item_{N} Service 接口
*
* @author 晨丰科技
*/
public interface OrderItemService {
/**
* 创建生产单明细表 order_item_{N}
*
* @param createReqVO 创建信息
* @return 编号
*/
Long createOrderItem(@Valid OrderItemSaveReqVO createReqVO);
/**
* 更新生产单明细表 order_item_{N}
*
* @param updateReqVO 更新信息
*/
void updateOrderItem(@Valid OrderItemSaveReqVO updateReqVO);
/**
* 删除生产单明细表 order_item_{N}
*
* @param id 编号
*/
void deleteOrderItem(Long id);
/**
* 获得生产单明细表 order_item_{N}
*
* @param id 编号
* @return 生产单明细表 order_item_{N}
*/
OrderItemDO getOrderItem(Long id);
/**
* 获得生产单明细表 order_item_{N}分页
*
* @param pageReqVO 分页查询
* @return 生产单明细表 order_item_{N}分页
*/
PageResult<OrderItemDO> getOrderItemPage(OrderItemPageReqVO pageReqVO);
}
@@ -0,0 +1,71 @@
package com.cf.imes.module.executor.service.order;
import com.cf.imes.module.executor.controller.admin.order.vo.item.OrderItemPageReqVO;
import com.cf.imes.module.executor.controller.admin.order.vo.item.OrderItemSaveReqVO;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import com.cf.imes.module.executor.dal.dataobject.order.OrderItemDO;
import com.cf.imes.framework.common.pojo.PageResult;
import com.cf.imes.framework.common.util.object.BeanUtils;
import com.cf.imes.module.executor.dal.mysql.order.OrderItemMapper;
import static com.cf.imes.framework.common.exception.util.ServiceExceptionUtil.exception;
/**
* 生产单明细表 order_item_{N} Service 实现类
*
* @author 晨丰科技
*/
@Service
@Validated
public class OrderItemServiceImpl implements OrderItemService {
@Resource
private OrderItemMapper orderItemMapper;
@Override
public Long createOrderItem(OrderItemSaveReqVO createReqVO) {
// 插入
OrderItemDO orderItem = BeanUtils.toBean(createReqVO, OrderItemDO.class);
orderItemMapper.insert(orderItem);
// 返回
return orderItem.getId();
}
@Override
public void updateOrderItem(OrderItemSaveReqVO updateReqVO) {
// 校验存在
validateOrderItemExists(updateReqVO.getId());
// 更新
OrderItemDO updateObj = BeanUtils.toBean(updateReqVO, OrderItemDO.class);
orderItemMapper.updateById(updateObj);
}
@Override
public void deleteOrderItem(Long id) {
// 校验存在
validateOrderItemExists(id);
// 删除
orderItemMapper.deleteById(id);
}
private void validateOrderItemExists(Long id) {
if (orderItemMapper.selectById(id) == null) {
throw exception(ORDER_ITEM_NOT_EXISTS);
}
}
@Override
public OrderItemDO getOrderItem(Long id) {
return orderItemMapper.selectById(id);
}
@Override
public PageResult<OrderItemDO> getOrderItemPage(OrderItemPageReqVO pageReqVO) {
return orderItemMapper.selectPage(pageReqVO);
}
}
@@ -0,0 +1,55 @@
package com.cf.imes.module.executor.service.order;
import javax.validation.*;
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;
/**
* 生产单表 order_{N} Service 接口
*
* @author 晨丰科技
*/
public interface OrderService {
/**
* 创建生产单表 order_{N}
*
* @param createReqVO 创建信息
* @return 编号
*/
Long createOrder(@Valid OrderSaveReqVO createReqVO);
/**
* 更新生产单表 order_{N}
*
* @param updateReqVO 更新信息
*/
void updateOrder(@Valid OrderSaveReqVO updateReqVO);
/**
* 删除生产单表 order_{N}
*
* @param id 编号
*/
void deleteOrder(Long id);
/**
* 获得生产单表 order_{N}
*
* @param id 编号
* @return 生产单表 order_{N}
*/
OrderDO getOrder(Long id);
/**
* 获得生产单表 order_{N}分页
*
* @param pageReqVO 分页查询
* @return 生产单表 order_{N}分页
*/
PageResult<OrderDO> getOrderPage(OrderPageReqVO pageReqVO);
}
@@ -0,0 +1,72 @@
package com.cf.imes.module.executor.service.order;
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 org.springframework.stereotype.Service;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import com.cf.imes.module.executor.dal.dataobject.order.OrderDO;
import com.cf.imes.framework.common.pojo.PageResult;
import com.cf.imes.framework.common.util.object.BeanUtils;
import com.cf.imes.module.executor.dal.mysql.order.OrderMapper;
import static com.cf.imes.framework.common.exception.util.ServiceExceptionUtil.exception;
import static com.cf.imes.module.executor.enums.ErrorCodeConstants.*;
/**
* 生产单表 order_{N} Service 实现类
*
* @author 晨丰科技
*/
@Service
@Validated
public class OrderServiceImpl implements OrderService {
@Resource
private OrderMapper orderMapper;
@Override
public Long createOrder(OrderSaveReqVO createReqVO) {
// 插入
OrderDO order = BeanUtils.toBean(createReqVO, OrderDO.class);
orderMapper.insert(order);
// 返回
return order.getId();
}
@Override
public void updateOrder(OrderSaveReqVO updateReqVO) {
// 校验存在
validateOrderExists(updateReqVO.getId());
// 更新
OrderDO updateObj = BeanUtils.toBean(updateReqVO, OrderDO.class);
orderMapper.updateById(updateObj);
}
@Override
public void deleteOrder(Long id) {
// 校验存在
validateOrderExists(id);
// 删除
orderMapper.deleteById(id);
}
private void validateOrderExists(Long id) {
if (orderMapper.selectById(id) == null) {
throw exception(ORDER_NOT_EXISTS);
}
}
@Override
public OrderDO getOrder(Long id) {
return orderMapper.selectById(id);
}
@Override
public PageResult<OrderDO> getOrderPage(OrderPageReqVO pageReqVO) {
return orderMapper.selectPage(pageReqVO);
}
}
@@ -0,0 +1,55 @@
package com.cf.imes.module.executor.service.order;
import javax.validation.*;
import com.cf.imes.module.executor.controller.admin.order.vo.plate.PlatePageReqVO;
import com.cf.imes.module.executor.controller.admin.order.vo.plate.PlateSaveReqVO;
import com.cf.imes.module.executor.dal.dataobject.order.PlateDO;
import com.cf.imes.framework.common.pojo.PageResult;
/**
* 生产单板件 Service 接口
*
* @author 晨丰科技
*/
public interface PlateService {
/**
* 创建生产单板件
*
* @param createReqVO 创建信息
* @return 编号
*/
Long createPlate(@Valid PlateSaveReqVO createReqVO);
/**
* 更新生产单板件
*
* @param updateReqVO 更新信息
*/
void updatePlate(@Valid PlateSaveReqVO updateReqVO);
/**
* 删除生产单板件
*
* @param id 编号
*/
void deletePlate(Long id);
/**
* 获得生产单板件
*
* @param id 编号
* @return 生产单板件
*/
PlateDO getPlate(Long id);
/**
* 获得生产单板件分页
*
* @param pageReqVO 分页查询
* @return 生产单板件分页
*/
PageResult<PlateDO> getPlatePage(PlatePageReqVO pageReqVO);
}
@@ -0,0 +1,71 @@
package com.cf.imes.module.executor.service.order;
import com.cf.imes.module.executor.controller.admin.order.vo.plate.PlatePageReqVO;
import com.cf.imes.module.executor.controller.admin.order.vo.plate.PlateSaveReqVO;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import com.cf.imes.module.executor.dal.dataobject.order.PlateDO;
import com.cf.imes.framework.common.pojo.PageResult;
import com.cf.imes.framework.common.util.object.BeanUtils;
import com.cf.imes.module.executor.dal.mysql.order.PlateMapper;
import static com.cf.imes.framework.common.exception.util.ServiceExceptionUtil.exception;
/**
* 生产单板件 Service 实现类
*
* @author 晨丰科技
*/
@Service
@Validated
public class PlateServiceImpl implements PlateService {
@Resource
private PlateMapper plateMapper;
@Override
public Long createPlate(PlateSaveReqVO createReqVO) {
// 插入
PlateDO plate = BeanUtils.toBean(createReqVO, PlateDO.class);
plateMapper.insert(plate);
// 返回
return plate.getId();
}
@Override
public void updatePlate(PlateSaveReqVO updateReqVO) {
// 校验存在
validatePlateExists(updateReqVO.getId());
// 更新
PlateDO updateObj = BeanUtils.toBean(updateReqVO, PlateDO.class);
plateMapper.updateById(updateObj);
}
@Override
public void deletePlate(Long id) {
// 校验存在
validatePlateExists(id);
// 删除
plateMapper.deleteById(id);
}
private void validatePlateExists(Long id) {
if (plateMapper.selectById(id) == null) {
throw exception(PLATE_NOT_EXISTS);
}
}
@Override
public PlateDO getPlate(Long id) {
return plateMapper.selectById(id);
}
@Override
public PageResult<PlateDO> getPlatePage(PlatePageReqVO pageReqVO) {
return plateMapper.selectPage(pageReqVO);
}
}

Some files were not shown because too many files have changed in this diff Show More