移除manage微服务相关内容

This commit is contained in:
gaoqr
2025-05-19 10:39:55 +08:00
parent dc05d230f5
commit 3e3a488641
201 changed files with 0 additions and 15039 deletions
@@ -1,51 +0,0 @@
<?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-manage</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-manage-api</artifactId>
<description>
manage 模块 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>
@@ -1,4 +0,0 @@
/**
* manage API包 暴露给其他模块API
*/
package com.cf.imes.module.manage.api;
@@ -1,36 +0,0 @@
package com.cf.imes.module.manage.api.plate;
import com.cf.imes.framework.common.pojo.CommonResult;
import com.cf.imes.module.manage.enums.ApiConstants;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Parameters;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
@FeignClient(name = ApiConstants.NAME) // TODO 晨丰:fallbackFactory =
@Tag(name = "RPC 服务 - 多组织")
public interface PlateApi {
String PREFIX = ApiConstants.PREFIX + "/plate";
@GetMapping(PREFIX +"/get")
@Operation(summary = "获得板材信息表")
@Parameters({
@Parameter(name = "id", description = "编号", required = true, example = "1024"),
@Parameter(name = "organId", description = "板材所属组织ID", required = true, example = "1024")
})
CommonResult<Boolean> getPlate(@RequestParam("id") Long id,
@RequestParam("organId") Long organId);
@GetMapping(PREFIX +"/getGoodsId")
@Operation(summary = "判断板材是否存在")
@Parameters({
@Parameter(name = "id", description = "客户的商品编号", required = true, example = "1024"),
@Parameter(name = "organId", description = "板材所属组织ID", required = true, example = "1024")
})
CommonResult<Long> getPlateGoods(@RequestParam("id") String goodsId,
@RequestParam("organId") Long organId);
}
@@ -1,23 +0,0 @@
package com.cf.imes.module.manage.enums;
import com.cf.imes.framework.common.enums.RpcConstants;
/**
* API 相关的枚举
*
* @author 晨丰科技
*/
public class ApiConstants {
/**
* 服务名
*
* 注意,需要保证和 spring.application.name 保持一致
*/
public static final String NAME = "manage-server";
public static final String PREFIX = RpcConstants.RPC_API_PREFIX + "/manage";
public static final String VERSION = "1.0.0";
}
@@ -1,16 +0,0 @@
package com.cf.imes.module.manage.enums;
/**
* Manage 字典类型的枚举类
*
* @author 晨丰科技
*/
public class DictTypeConstants {
public static final String PLATE_TEXTURE = "plate_texture_type";// 板件纹里
public static final String PART_CATEGORY = "part_category";// 配件主类型
public static final String BOOLEAN_STRING = "infra_boolean_string"; // Boolean 是否类型
}
@@ -1,20 +0,0 @@
package com.cf.imes.module.manage.enums;
import com.cf.imes.framework.common.exception.ErrorCode;
/**
* @author there
* 生产管理服务错误码枚举 使用1-004-000-000 段
*/
public class ErrorCodeConstants {
public static final ErrorCode PARTS_NOT_EXISTS = new ErrorCode(1_004_001_000, "配件不存在");
public static final ErrorCode PARTS_GOOD_ID_EXISTS = new ErrorCode(1_004_001_001, "配件编号已存在");
public static final ErrorCode PARTS_UNIT_NOT_NULL = new ErrorCode(1_004_001_002, "配件-组件或五金或封边条,单位禁止为空");
public static final ErrorCode PARTS_EDGE_NOT_NULL = new ErrorCode(1_004_001_003, "配件-封边条颜色、宽厚禁止为空");
public static final ErrorCode FILE_NULL = new ErrorCode(1_004_001_004, "上传文件为空");
public static final ErrorCode FILE_FORMAT_ERROR = new ErrorCode(1_004_001_005, "导入文件格式有误");
public static final ErrorCode FILE_EXCEED_SIZE = new ErrorCode(1_004_001_006, "文件大小超过 10M");
public static final ErrorCode FILE_CONTENT_NULL = new ErrorCode(1_004_001_007, "文件大小为空");
}
@@ -1,23 +0,0 @@
package com.cf.imes.module.manage.enums.parts;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* 配件主类的枚举值
*/
@Getter
@AllArgsConstructor
public enum CategoryEnum implements ObjectEnum{
ASSEMBLY("组件"),
HARDWARE("五金"),
EDGING("封边条"),
OTHER("其他");
/**
* 类别名称
*/
private final String value;
}
@@ -1,6 +0,0 @@
package com.cf.imes.module.manage.enums.parts;
public interface ObjectEnum {
String getValue();
}
@@ -1,17 +0,0 @@
package com.cf.imes.module.manage.enums.parts;
import lombok.AllArgsConstructor;
import lombok.Getter;
@Getter
@AllArgsConstructor
public enum WhetherEnum implements ObjectEnum{
TRUE(""),
FALSE("");
/**
* 类别名称
*/
private final String value;
}
@@ -1,32 +0,0 @@
package com.cf.imes.module.manage.enums.remainPlate;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* 余料板放置枚举类
*/
@Getter
@AllArgsConstructor
public enum RemainPlatePlaceStyleEnum {
ZERO(0, "正面"),
ONE(1, "正面右转"),
TWO(2, "正面后转"),
THREE(3, "正面左转"),
FOUR(4, "反面"),
FIVE(5, "反面右转"),
SIX(6, "反面后转"),
SEVEN(7, "反面左转");
private final Integer status;
private String description;
public boolean equals(Integer status) {
return this.status .equals(status) ;
}
public boolean equals(RemainPlatePlaceStyleEnum enableStatusEnum) {
return enableStatusEnum != null && enableStatusEnum.status .equals(this.getStatus()) ;
}
}
@@ -1,22 +0,0 @@
package com.cf.imes.module.manage.enums.remainPlate;
import lombok.AllArgsConstructor;
import lombok.Getter;
@Getter
@AllArgsConstructor
public enum RemainPlateStatusEnum {
UNUSED(0, "未使用"),
USED(1, "已使用");
private final Integer status;
private String description;
public boolean equals(Integer status) {
return this.status .equals(status) ;
}
public boolean equals(RemainPlateStatusEnum enableStatusEnum) {
return enableStatusEnum != null && enableStatusEnum.status .equals(this.getStatus()) ;
}
}
@@ -1,25 +0,0 @@
package com.cf.imes.module.manage.enums.remainPlate;
import lombok.AllArgsConstructor;
import lombok.Getter;
@Getter
@AllArgsConstructor
public enum RemainPlateUseTypeEnum {
TYPE_ZERO(0, ""),
TYPE_ONE(1, "核销"),
TYPE_TWO(2, "排单"),
TYPE_THREE(3, "补板");
private final Integer status;
private String description;
public boolean equals(Integer status) {
return this.status .equals(status) ;
}
public boolean equals(RemainPlateUseTypeEnum enableStatusEnum) {
return enableStatusEnum != null && enableStatusEnum.status .equals(this.getStatus()) ;
}
}
@@ -1,335 +0,0 @@
<?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-manage</artifactId>
<version>${revision}</version>
</parent>
<artifactId>cf-module-prod-manage-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-manage-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>
<dependency>
<groupId>com.cf.imes</groupId>
<artifactId>cf-spring-boot-starter-biz-dict</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>
<dependency>
<groupId>com.cf.imes</groupId>
<artifactId>cf-spring-boot-starter-biz-data-permission</artifactId>
</dependency>
<!-- 工具类相关 -->
<dependency>
<groupId>com.cf.imes</groupId>
<artifactId>cf-spring-boot-starter-excel</artifactId>
</dependency>
<!-- pagehelper分页插件-->
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper</artifactId>
<version>6.1.0</version>
<exclusions>
<exclusion>
<groupId>com.github.jsqlparser</groupId>
<artifactId>jsqlparser</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>sqlparser4.5</artifactId>
<version>6.1.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.jacob/jacob -->
<dependency>
<groupId>com.hynnet</groupId>
<artifactId>jacob</artifactId>
<version>1.18</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.8</version> <!-- 使用最新版本 -->
</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-biz-id</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>
<configuration>
<layout>ZIP</layout>
<includes>
<include>
<groupId>com.cf.imes</groupId>
<artifactId>cf-common</artifactId>
</include>
<include>
<groupId>com.cf.imes</groupId>
<artifactId>cf-module-infra-api</artifactId>
</include>
<include>
<groupId>com.cf.imes</groupId>
<artifactId>cf-module-prod-executor-api</artifactId>
</include>
<include>
<groupId>com.cf.imes</groupId>
<artifactId>cf-module-prod-manage-api</artifactId>
</include>
<include>
<groupId>com.cf.imes</groupId>
<artifactId>cf-module-system-api</artifactId>
</include>
<include>
<groupId>com.cf.imes</groupId>
<artifactId>cf-spring-boot-starter-banner</artifactId>
</include>
<include>
<groupId>com.cf.imes</groupId>
<artifactId>cf-spring-boot-starter-biz-data-permission</artifactId>
</include>
<include>
<groupId>com.cf.imes</groupId>
<artifactId>cf-spring-boot-starter-biz-dict</artifactId>
</include>
<include>
<groupId>com.cf.imes</groupId>
<artifactId>cf-spring-boot-starter-biz-error-code</artifactId>
</include>
<include>
<groupId>com.cf.imes</groupId>
<artifactId>cf-spring-boot-starter-biz-operatelog</artifactId>
</include>
<include>
<groupId>com.cf.imes</groupId>
<artifactId>cf-spring-boot-starter-biz-organ</artifactId>
</include>
<include>
<groupId>com.cf.imes</groupId>
<artifactId>cf-spring-boot-starter-excel</artifactId>
</include>
<include>
<groupId>com.cf.imes</groupId>
<artifactId>cf-spring-boot-starter-file</artifactId>
</include>
<include>
<groupId>com.cf.imes</groupId>
<artifactId>cf-spring-boot-starter-monitor</artifactId>
</include>
<include>
<groupId>com.cf.imes</groupId>
<artifactId>cf-spring-boot-starter-mybatis</artifactId>
</include>
<include>
<groupId>com.cf.imes</groupId>
<artifactId>cf-spring-boot-starter-redis</artifactId>
</include>
<include>
<groupId>com.cf.imes</groupId>
<artifactId>cf-spring-boot-starter-rpc</artifactId>
</include>
<include>
<groupId>com.cf.imes</groupId>
<artifactId>cf-spring-boot-starter-security</artifactId>
</include>
<include>
<groupId>com.cf.imes</groupId>
<artifactId>cf-spring-boot-starter-web</artifactId>
</include>
<include>
<groupId>com.cf.imes</groupId>
<artifactId>cf-spring-boot-starter-biz-id</artifactId>
</include>
</includes>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal> <!-- 将引入的 jar 打入其中 -->
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>${maven.dependency.plugin.version}</version>
<executions>
<execution>
<phase>prepare-package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<!-- 将依赖放到target/lib目录下 -->
<outputDirectory>target/lib</outputDirectory>
<!-- 排除自身的代码包-->
<excludeGroupIds>com.cf.imes</excludeGroupIds>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>${maven.assembly.plugin.version}</version>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<!--指定assembly配置文件位置-->
<descriptor>src/main/build/assembly.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>bundle</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
@@ -1,45 +0,0 @@
<assembly>
<id>bundle</id>
<formats>
<format>tar.gz</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>
<!-- 配置文件 -->
<fileSet>
<directory>${basedir}/src/main/resources</directory>
<outputDirectory>config</outputDirectory>
<includes>
<include>application-${profileActive}.yaml</include>
<include>bootstrap-${profileActive}.yaml</include>
<include>bootstrap.yaml</include>
</includes>
</fileSet>
<!-- 模板xlsx相关文件 -->
<fileSet>
<directory>${basedir}/src/main/resources/type</directory>
<outputDirectory>type</outputDirectory>
</fileSet>
<!-- 依赖库 -->
<fileSet>
<directory>${basedir}/target/lib</directory>
<includes>
<include>*.jar</include>
</includes>
<outputDirectory>lib</outputDirectory>
</fileSet>
<!-- 可执行的jar -->
<fileSet>
<directory>${project.build.directory}</directory>
<outputDirectory>/</outputDirectory>
<includes>
<include>${project.artifactId}.jar</include>
</includes>
</fileSet>
</fileSets>
</assembly>
@@ -1,18 +0,0 @@
package com.cf.imes.module.manage;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
/**
* @author there
*/
@SpringBootApplication
@EnableAspectJAutoProxy(exposeProxy = true) // add config
@EnableFeignClients
public class ManageServerApplication {
public static void main(String[] args) {
SpringApplication.run(ManageServerApplication.class, args);
}
}
@@ -1,36 +0,0 @@
package com.cf.imes.module.manage.api.plate;
import com.cf.imes.framework.common.pojo.CommonResult;
import com.cf.imes.module.manage.dal.dataobject.plate.PlateDO;
import com.cf.imes.module.manage.service.plate.PlateService;
import javax.annotation.Resource;
import static com.cf.imes.framework.common.pojo.CommonResult.success;
public class PlateServiceApiImpl implements PlateApi{
@Resource
private PlateService plateService;
@Override
public CommonResult<Boolean> getPlate(Long id, Long organId) {
PlateDO plateDO = plateService.getPlate(id, organId);
if (plateDO == null) {
return success(false);
}
return success(true);
}
@Override
public CommonResult<Long> getPlateGoods(String goodsId, Long organId) {
if (goodsId == null) {
return success(0L);
}
PlateDO plateDO = plateService.getPlateGoods(goodsId, organId);
if (plateDO == null) {
return success(0L);
}
return success(plateDO.getId());
}
}
@@ -1,50 +0,0 @@
package com.cf.imes.module.manage.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.manage.dal.dataobject.register.RegisterDO;
import com.cf.imes.module.manage.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);
}
}
}
@@ -1,26 +0,0 @@
package com.cf.imes.module.manage.config;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
@Data
@Component
@ConfigurationProperties(prefix = "voices.parameters")
public class VocieParameters {
// 设置音频的质量( 越大越好,目前最大好像 22,最小为 4 )
private Long quality;
// 朗读声音大小
private Long soundSize;
// 朗读速度
private Long readingSpeed;
// 音频保存的路径
private String path;
}
@@ -1,275 +0,0 @@
package com.cf.imes.module.manage.controller.admin.pack;
import com.cf.imes.framework.common.pojo.CommonResult;
import com.cf.imes.framework.common.pojo.PageResult;
import com.cf.imes.module.manage.controller.admin.pack.prePack.PrePackReqVO;
import com.cf.imes.module.manage.controller.admin.pack.vo.*;
import com.cf.imes.module.manage.controller.admin.query.vo.pack.OrderPackageVO;
import com.cf.imes.module.manage.controller.admin.query.vo.pack.PackageDetailsRespVO;
import com.cf.imes.module.manage.service.pack.PackService;
import com.cf.imes.module.manage.service.query.ProductionStatusService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.validation.Valid;
import java.util.List;
import static com.cf.imes.framework.common.pojo.CommonResult.success;
@Tag(name = "管理后台 - 生产打包 ")
@RestController
@RequestMapping("/manage/pack")
@Validated
public class PackController {
@Resource
private PackService packService;
@Resource
private ProductionStatusService productionStatusService;
@GetMapping("/page")
@Operation(summary = "打包分页查询")
@PreAuthorize("@ss.hasPermission('manage:pack:query')")
public CommonResult<PageResult<PackRespVO>> getPlatePage(@Valid PackPageReqVO pageReqVO) {
return CommonResult.success(packService.getPackPage(pageReqVO));
}
@GetMapping("/getOrderPlate")
@Operation(summary = "查看生产订单对应的没有打包的板材信息")
@Parameter(name = "orderId", description = "生产单Id", required = true)
@PreAuthorize("@ss.hasAnyPermissions('manage:pack:export-lost-plate','manage:pack:pack')")
public CommonResult<List<PlateDetailsRespVO>> getOrderPlateList(@Valid @RequestParam("orderId") Long orderId) {
return success(packService.getOrderPlateList(orderId));
}
@GetMapping("/getOrderPlateList")
@Operation(summary = "查询多个生产单对应的板材信息")
@Parameter(name = "orderIds", description = "生产单ID", required = true)
@PreAuthorize("@ss.hasAnyPermissions('manage:pack:create','manage:pack:pre-pack','manage:pack:pack')")
public CommonResult<List<PlateDetailsRespVO>> getOrdersPlateList(@Valid @RequestParam("orderIds") List<Long> orderIds) {
return success(packService.getOrdersPlateList(orderIds));
}
@GetMapping("/getOrderPack")
@Operation(summary = "查看生产订单对应的包裹信息-未分页")
@PreAuthorize("@ss.hasAnyPermissions('manage:pack:export-pack-num','manage:pack:pack')")
public CommonResult<List<OrderPackageVO>> getOrderPack(@Valid PackageDetailsReqVO reqVO) {
return success(packService.getOrderPack(reqVO));
}
@GetMapping("/getPageOrderPack")
@Operation(summary = "查看生产订单对应的包裹信息-分页")
@PreAuthorize("@ss.hasPermission('manage:pack:pack-details')")
public CommonResult<PageResult<OrderPackageVO>> getPageOrderPack(@Valid PackageDetailsReqVO reqVO) {
return success(packService.getPageOrderPack(reqVO));
}
@GetMapping("/queryPackageDetails")
@Operation(summary = "查询包裹的详细信息")
@PreAuthorize("@ss.hasAnyPermissions('manage:pack:pack-details','manage:pack:query')")
public CommonResult<PageResult<PackageDetailsRespVO>> queryPackageDetails(@Valid PackDetailsReqVO reqVO){
return CommonResult.success(productionStatusService.queryPackageDetails(reqVO));
}
@GetMapping("/getParts")
@Operation(summary = "查看配件列表")
@PreAuthorize("@ss.hasPermission('manage:pack-parts:query')")
public CommonResult<List<OrderPartsRespVO>> getParts(@Valid OrderPartsReqVO reqVO) {
return success(packService.getPartsList(reqVO));
}
@PutMapping("/updatePack")
@Operation(summary = "板材包裹更新-即封包")
@PreAuthorize("@ss.hasPermission('manage:pack:update')")
public CommonResult<OrderPackRespVO> updatePack(@Valid @RequestBody OrderPackReqVO packageVO) {
return success(packService.updatePack(packageVO));
}
@PutMapping("/updateParts")
@Operation(summary = "配件包裹更新-即封包")
@PreAuthorize("@ss.hasPermission('manage:pack:update')")
public CommonResult<OrderPackRespVO> updateParts(@Valid @RequestBody OrderPartsReqVO reqVO) {
return success(packService.updateParts(reqVO));
}
@GetMapping("/selectPack")
@Operation(summary = "查询包裹")
@Parameter(name = "orderId", description = "生产单Id", required = true)
@PreAuthorize("@ss.hasPermission('manage:pack:query')")
public CommonResult<List<OrderPackRespVO>> selectPack(@Valid @RequestParam("orderId") Long orderId) {
return success(packService.selectPack(orderId));
}
@DeleteMapping("/deletePack")
@Operation(summary = "删除包裹及其关联的包裹信息(删除全部)")
@PreAuthorize("@ss.hasPermission('manage:pack:delete')")
public CommonResult<Boolean> deleteOrderPack (@Valid @RequestBody PackReqVO reqVO) {
packService.deleteOrderPack(reqVO);
return success(true);
}
@PutMapping("/unpacking")
@Operation(summary = "拆包-更改包裹为未封包")
@PreAuthorize("@ss.hasPermission('manage:pack:unpacking')")
public CommonResult<OrderPackRespVO> unpacking(@Valid @RequestBody PackingReqVO reqVO) {
OrderPackRespVO unpacking = packService.unpacking(reqVO.getPackageId());
return success(unpacking);
}
// @GetMapping("/print")
// @Operation(summary = "包裹订单打印")
// @PreAuthorize("@ss.hasPermission('manage:pack:query')")
public CommonResult<PrintOrderPackRespVO> printOrderPack (@Valid PrintOrderPackReqVO reqVO) {
return success(packService.printOrderPack(reqVO));
}
// @PostMapping("/insertParts")
// @Operation(summary = "新增配件包裹")
// @PreAuthorize("@ss.hasPermission('manage:pack:insert')")
public CommonResult<OrderPackRespVO> addNewPartsPack (@Valid @RequestBody OrderPackReqVO reqVO) {
return success(packService.addNewPartsPack(reqVO));
}
@PostMapping("/insertOtherPack")
@Operation(summary = "新增外部配件-即新增一个包裹")
@PreAuthorize("@ss.hasPermission('manage:pack:external-parts')")
public CommonResult<OrderPackRespVO> addNewOtherPack(@Valid @RequestBody OtherPackReqVO reqVO) {
return success(packService.addNewOtherPack(reqVO));
}
@PutMapping("/insertOther")
@Operation(summary = "新增外部配件")
@PreAuthorize("@ss.hasPermission('manage:pack:external-parts')")
public CommonResult<OrderPartsRespVO> addNewOtherParts (@Valid @RequestBody OtherPackReqVO reqVO) {
return success(packService.addNewOtherParts(reqVO));
}
@DeleteMapping("/deleteOtherParts")
@Operation(summary = "删除包裹中的外部配件")
@PreAuthorize("@ss.hasPermission('manage:pack:delete')")
public CommonResult<Boolean> deleteOtherParts (@Valid @RequestBody DeleteOtherPartsReqVO reqVO) {
packService.deleteOtherParts(reqVO);
return success(true);
}
@GetMapping("/getPrePackInfo")
@Operation(summary = "查询预打包优化信息")
@PreAuthorize("@ss.hasPermission('manage:pack:pre-pack')")
public CommonResult<String> getPrePackInfo ( @RequestParam("orderId") Long orderId) {
return success(packService.getPrePackInfo(orderId));
}
@PostMapping("/saveOptimizeInfo")
@Operation(summary = "预打包保存优化信息")
@PreAuthorize("@ss.hasPermission('manage:pack:pre-pack')")
public CommonResult<Boolean> saveOptimizeInfo(@Valid @RequestBody PrePackReqVO reqVO) {
packService.saveOptimizeInfo(reqVO);
return success(true);
}
}
@@ -1,28 +0,0 @@
package com.cf.imes.module.manage.controller.admin.pack.prePack;
import lombok.Builder;
import lombok.Data;
import lombok.ToString;
@Data
@ToString(callSuper = true)
@Builder
public class PackPlateList {
// 包裹ID
private Long packId;
// 包裹编号
private String packNo;
// 板材ID
private Long plateId;
// 板材编号
private String plateNo;
}
@@ -1,34 +0,0 @@
package com.cf.imes.module.manage.controller.admin.pack.prePack;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.ToString;
@Schema(description = "预打包的优化结构")
@Data
@ToString(callSuper = true)
public class PrePackData {
@Schema(description = "包裹编号")
private String name;
@Schema(description = "点的位置信息")
private Double pointX;
private Double pointY;
@Schema(description = "板材编号")
private String plateNo;
@Schema(description = "板材宽度")
private Long plateWidth;
@Schema(description = "板材高度")
private Long plateHeight;
}
@@ -1,105 +0,0 @@
package com.cf.imes.module.manage.controller.admin.pack.prePack;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.ToString;
import javax.validation.Valid;
import java.util.List;
@Schema(description = "预打包的优化结构")
@Data
@ToString(callSuper = true)
public class PrePackOptimizeInfo {
@Schema(description = "分组名称")
private String groupName;
@Schema(description = "优化的数据")
private List<PrePackData> list;
@Valid
@Data
public static class PrePackData {
@Schema(description = "包裹编号")
private String name;
@Schema(description = "")
private List<PrerStoreyNum> list;
}
@Valid
@Data
public static class PrerStoreyNum {
@Schema(description = "包裹层数名称")
private String name;
@Schema(description = "")
private Long floor_place_width;
@Schema(description = "")
private Long floor_place_height;
@Schema(description = "")
private List<PrerPlateData> list;
}
@Valid
@Data
public static class PrerPlateData {
@Schema(description = "小板名称")
private String name;
@Schema(description = "")
private String plateNo;
@Schema(description = "")
private String plateId;
@Schema(description = "")
private PrePlaceInfo placeInfo;
}
@Valid
@Data
public static class PrePlaceInfo{
@Schema(description = "")
private String banid;
@Schema(description = "")
private Double line;
@Schema(description = "")
private Double x;
@Schema(description = "")
private Double y;
@Schema(description = "")
private Long pbg;
@Schema(description = "")
private Long pbk;
}
}
@@ -1,30 +0,0 @@
package com.cf.imes.module.manage.controller.admin.pack.prePack;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.ToString;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
@Schema(description = "管理后台 - 预打包保存优化信息")
@Data
@ToString(callSuper = true)
public class PrePackReqVO {
@Schema(description = "生产单ID")
@NotNull(message = "优化数据异常,请重新优化")
private Long orderId;
@Schema(description = "优化信息")
@NotBlank(message = "优化数据异常,请重新优化")
private String optimizeInfo;
}
@@ -1,37 +0,0 @@
package com.cf.imes.module.manage.controller.admin.pack.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.ToString;
import javax.validation.constraints.NotNull;
@Schema(description = "管理后台 - 删除其他配件 Request VO")
@Data
@ToString(callSuper = true)
public class DeleteOtherPartsReqVO {
@Schema(description = "生产单号", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "生产单号为空,请重新删除配件")
private Long orderId;
@Schema(description = "包裹Id", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "包裹号为空,请重新删除配件")
private Long packageId;
@Schema(description = "配件ID", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "配件信息为空,请重新删除配件")
private Long partsId;
@Schema(description = "是否是其他类型的配件", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "配件类型为空,请重新删除配件")
private Boolean isOtherParts;
}
@@ -1,16 +0,0 @@
package com.cf.imes.module.manage.controller.admin.pack.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Schema(description = "工序组名称")
@Data
public class GroupNameList {
@Schema(description = "工序组名称")
private String name;
}
@@ -1,57 +0,0 @@
package com.cf.imes.module.manage.controller.admin.pack.vo;
import com.cf.imes.module.manage.validation.pack.PackTypeValid;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.ToString;
import javax.validation.constraints.NotNull;
import java.util.List;
@Schema(description = "管理后台 - 包裹新增 Request VO")
@Data
@ToString(callSuper = true)
public class OrderPackReqVO {
@Schema(description = "包裹ID", requiredMode = Schema.RequiredMode.REQUIRED)
private Long packId;
@Schema(description = "生产单号", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "生产单号为空")
private Long orderId;
@Schema(description = "包裹编号", requiredMode = Schema.RequiredMode.REQUIRED)
private String packNo;
@Schema(description = "包裹类型", requiredMode = Schema.RequiredMode.REQUIRED)
@PackTypeValid
private Integer packageType;
// @Schema(description = "包裹状态", requiredMode = Schema.RequiredMode.REQUIRED)
// private Long packStatus;
@Schema(description = "备注")
private String remark;
@Schema(description = "新增的板件ID", requiredMode = Schema.RequiredMode.REQUIRED)
private List<Long> addPlateIdList;
@Schema(description = "移除的板件ID", requiredMode = Schema.RequiredMode.REQUIRED)
private List<Long> deletePlateIdList;
@Schema(description = "新增的配件包裹ID", requiredMode = Schema.RequiredMode.REQUIRED)
private List<Long> addPartsIdList;
}
@@ -1,41 +0,0 @@
package com.cf.imes.module.manage.controller.admin.pack.vo;
import com.baomidou.mybatisplus.annotation.TableId;
import com.cf.imes.framework.mybatis.core.dataobject.BaseDO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Builder;
import lombok.Data;
@Schema(description = "管理后台 - 生产单包裹表 Response VO")
@Data
@Builder
public class OrderPackRespVO {
@Schema(description = "包裹ID", requiredMode = Schema.RequiredMode.REQUIRED)
private Long id;
@Schema(description = "生产单号", requiredMode = Schema.RequiredMode.REQUIRED)
private Long orderId;
@Schema(description = "包裹编号", requiredMode = Schema.RequiredMode.REQUIRED)
private String packageNo;
@Schema(description = "包裹类型,-1未定义,0板材,1配件,2其他配件", requiredMode = Schema.RequiredMode.REQUIRED)
private Integer packageType;
@Schema(description = "包裹名", requiredMode = Schema.RequiredMode.REQUIRED)
private String name;
@Schema(description = "包裹状态,0未封包,1已封包,2已入库,3已出库", requiredMode = Schema.RequiredMode.REQUIRED)
private Integer status;
@Schema(description = "组织ID", requiredMode = Schema.RequiredMode.REQUIRED)
private Long organId;
@Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED)
private String remark;
}
@@ -1,39 +0,0 @@
package com.cf.imes.module.manage.controller.admin.pack.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.ToString;
import javax.validation.constraints.NotNull;
import java.util.List;
@Schema(description = "管理后台 - 生产单模块表 Request VO")
@Data
//@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class OrderPartsReqVO /*extends PageParam*/ {
@Schema(description = "生产单号", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "生产单号为空")
private Long orderId;
@Schema(description = "更新配件时传-包裹ID")
private Long packId;
@Schema(description = "新增的配件ID")
private List<Long> addPartsIdList;
@Schema(description = "更新配件时传-删除的配件ID")
private List<Long> deletePartsIdList;
@Schema(description = "新增的板件ID")
private List<Long> addPlateIdList;
}
@@ -1,69 +0,0 @@
package com.cf.imes.module.manage.controller.admin.pack.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Schema(description = "管理后台 - 配件列表详情 Response VO")
@Data
public class OrderPartsRespVO {
@Schema(description = "配件ID", requiredMode = Schema.RequiredMode.REQUIRED)
private Long partsId;
@Schema(description = "配件名称", requiredMode = Schema.RequiredMode.REQUIRED)
private String name;
@Schema(description = "型号", requiredMode = Schema.RequiredMode.REQUIRED)
private String model;
@Schema(description = "规格", requiredMode = Schema.RequiredMode.REQUIRED)
private String spec;
@Schema(description = "数量", requiredMode = Schema.RequiredMode.REQUIRED)
private Long num;
@Schema(description = "单位", requiredMode = Schema.RequiredMode.REQUIRED)
private String unit;
@Schema(description = "品牌", requiredMode = Schema.RequiredMode.REQUIRED)
private String brand;
@Schema(description = "厂家", requiredMode = Schema.RequiredMode.REQUIRED)
private String factory;
@Schema(description = "配件类型", requiredMode = Schema.RequiredMode.REQUIRED)
private String type;
@Schema(description = "是否复合配件", requiredMode = Schema.RequiredMode.REQUIRED)
private Boolean isComposite;
@Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED)
private String remark;
@Schema(description = "配件颜色", requiredMode = Schema.RequiredMode.REQUIRED)
private String partsColor;
@Schema(description = "配件宽度", requiredMode = Schema.RequiredMode.REQUIRED)
private Double partsWidth;
@Schema(description = "配件长度", requiredMode = Schema.RequiredMode.REQUIRED)
private Double partsLength;
@Schema(description = "配件厚度", requiredMode = Schema.RequiredMode.REQUIRED)
private Double partsThickness;
@Schema(description = "配件主类:1封边2五金3组件", requiredMode = Schema.RequiredMode.REQUIRED)
private String category;
@Schema(description = "子配件ID列表,复合部件时记录子配件ID,半角逗号分隔", requiredMode = Schema.RequiredMode.REQUIRED)
private String subparts;
}
@@ -1,36 +0,0 @@
package com.cf.imes.module.manage.controller.admin.pack.vo;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.util.List;
@Schema(description = "管理后台 - 查看生产单对应的板件信息")
@Data
@ExcelIgnoreUnannotated
public class OrderPlateDetailsRespVO {
@Schema(description = "板件总数", requiredMode = Schema.RequiredMode.REQUIRED)
private Long plateNum;
@Schema(description = "已处理量", requiredMode = Schema.RequiredMode.REQUIRED)
private Long plateProcessedNum;
@Schema(description = "待处理量", requiredMode = Schema.RequiredMode.REQUIRED)
private Long pendingNum;
// @Schema(description = "当前包裹的板件数", requiredMode = Schema.RequiredMode.REQUIRED)
// private Long currentPackNum;
@Schema(description = "生产单对应的板件信息", requiredMode = Schema.RequiredMode.REQUIRED)
List<PlateDetailsRespVO> plateDetailsRespVO;
}
@@ -1,28 +0,0 @@
package com.cf.imes.module.manage.controller.admin.pack.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.apache.poi.ss.formula.functions.Value;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Schema(description = "管理后台 - 板材列表显示 Response VO")
@Data
public class OrderPlateGroupRespVO {
@Schema(description = "房间id", requiredMode = Schema.RequiredMode.REQUIRED)
private Long roomId;
@Schema(description = "房间名称", requiredMode = Schema.RequiredMode.REQUIRED)
private String roomName;
}
@@ -1,50 +0,0 @@
package com.cf.imes.module.manage.controller.admin.pack.vo;
import com.cf.imes.framework.common.validation.NumberValid;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.ToString;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
@Schema(description = "管理后台 - 新增外部配件 Request VO")
@Data
@ToString(callSuper = true)
public class OtherPackReqVO {
@Schema(description = "生产单号", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "生产单号为空,请重新新增外部配件")
private Long orderId;
@Schema(description = "配件名称", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "配件名称不能为空")
@Size(max = 64, message = "配件名称长度不能超过 64 个字符")
private String name;
@Schema(description = "配件数量", requiredMode = Schema.RequiredMode.REQUIRED)
@NumberValid(name = "配件数量")
private Double num;
@Schema(description = "配件单位", requiredMode = Schema.RequiredMode.REQUIRED)
@NotBlank(message = "配件单位不能为空")
@Size(max = 32, message = "配件单位长度不能超过 32 个字符")
private String unit;
@Schema(description = "包裹编号", requiredMode = Schema.RequiredMode.REQUIRED)
private String packNo;
@Schema(description = "备注")
private String remark;
}
@@ -1,28 +0,0 @@
package com.cf.imes.module.manage.controller.admin.pack.vo;
import com.cf.imes.framework.common.pojo.PageParam;
import com.cf.imes.module.manage.validation.pack.PackTypeValid;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.ToString;
import javax.validation.constraints.NotNull;
@Schema(description = "管理后台 - 查看包裹详情")
@Data
@ToString(callSuper = true)
public class PackDetailsReqVO extends PageParam {
@Schema(description = "包裹ID", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "包裹数据错误,请重新查看")
private Long packageId;
@Schema(description = "包裹类型", requiredMode = Schema.RequiredMode.REQUIRED)
@PackTypeValid
private Integer type;
}
@@ -1,56 +0,0 @@
package com.cf.imes.module.manage.controller.admin.pack.vo;
import com.cf.imes.framework.common.pojo.PageParam;
import com.cf.imes.module.manage.validation.pack.OrderPackagedStatusValid;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.Pattern;
@Schema(description = "管理后台 - 打包分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class PackPageReqVO extends PageParam {
@Schema(description = "打包状态(0:未打包,1:已打包)", requiredMode = Schema.RequiredMode.REQUIRED)
@OrderPackagedStatusValid
private Integer status;
@Schema(description = "订单号")
@Pattern(regexp = "^[0-9]*$",message = "生产单号必须为数字")
@Length(max = 19,message = "生产单号长度不能超过19")
private String orderId;
@Schema(description = "自定义单号")
@Length(max = 32,message = "自定义单号数据过长,请重新输入")
private String customOrderNo;
@Schema(description = "经销商")
@Length(max = 255, message = "经销商数据过长,请重新输入")
private String dealer;
@Schema(description = "客户")
@Length(max = 255, message = "客户数据过长,请重新输入")
private String customer;
@Schema(description = "地址")
@Length(max = 255, message = "收货地址数据过长,请重新输入")
private String address;
@Schema(description = "是否翻页-true:上,false:下")
private Boolean isUp;
}
@@ -1,34 +0,0 @@
package com.cf.imes.module.manage.controller.admin.pack.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.ToString;
import javax.validation.constraints.NotNull;
@Schema(description = "管理后台 - 删除订单包裹 Request VO")
@Data
@ToString(callSuper = true)
public class PackReqVO {
@Schema(description = "生产单ID", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "生产单号为空,请重新删除配件")
private Long orderId;
@Schema(description = "包裹ID", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "包裹信息为空,请重新删除配件")
private Long packageId;
@Schema(description = "包裹编号", requiredMode = Schema.RequiredMode.REQUIRED)
private Long packageNo;
@Schema(description = "是否是其他类型的包裹", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "包裹类型为空,请重新删除配件")
private Boolean isOther;
}
@@ -1,101 +0,0 @@
package com.cf.imes.module.manage.controller.admin.pack.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.Setter;
import java.time.LocalDateTime;
import java.util.List;
@Schema(description = "管理后台 - 生产单表 order_{N} Response VO")
@Data
@Setter
public class PackRespVO {
@Schema(description = "生产单号", requiredMode = Schema.RequiredMode.REQUIRED, example = "7788")
private Long id;
@Schema(description = "包裹ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "7788")
private Long packId;
@Schema(description = "自定义单号", requiredMode = Schema.RequiredMode.REQUIRED,example = "ABCD")
private String customOrderNo;
@Schema(description = "经销商电话", requiredMode = Schema.RequiredMode.REQUIRED,example = "ABCD")
private String dealerPhoneNumber;
@Schema(description = "经销商", requiredMode = Schema.RequiredMode.REQUIRED,example = "ABCD")
private String dealer;
@Schema(description = "订单日期", requiredMode = Schema.RequiredMode.REQUIRED,example = "ABCD")
private LocalDateTime orderDate;
@Schema(description = "交付日期", requiredMode = Schema.RequiredMode.REQUIRED,example = "ABCD")
private LocalDateTime deliveryDate;
@Schema(description = "打包状态", requiredMode = Schema.RequiredMode.REQUIRED,example = "0")
private Integer packaged;
@Schema(description = "客户", requiredMode = Schema.RequiredMode.REQUIRED,example = "张三")
private String customer;
@Schema(description = "客户地址", requiredMode = Schema.RequiredMode.REQUIRED,example = "AABB")
private String address;
@Schema(description = "客户电话", requiredMode = Schema.RequiredMode.REQUIRED,example = "ABCD")
private String phoneNumber;
@Schema(description = "业务员", requiredMode = Schema.RequiredMode.REQUIRED,example = "ABCD")
private String salesman;
@Schema(description = "拆单员", requiredMode = Schema.RequiredMode.REQUIRED,example = "ABCD")
private String splitter;
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime createTime;
@Schema(description = "已打包数-包裹数")
private Long packCount;
@Schema(description = "已打包片数-已处理量")
private Long packPieceCount;
@Schema(description = "总片数-板件总数")
private Long totalPieceCount;
@Schema(description = "待处理量")
private Long pendingNum;
@Schema(description = "生产单对应的板材ID集")
private List<Long> plateIdList;
@Schema(description = "生产单对应的包裹ID集")
private List<Long> packIdList;
// @Schema(description = "生产单对应的板件信息", requiredMode = Schema.RequiredMode.REQUIRED)
// List<PlateDetailsRespVO> plateDetailsRespVO;
}
@@ -1,42 +0,0 @@
package com.cf.imes.module.manage.controller.admin.pack.vo;
import com.cf.imes.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.ToString;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.Pattern;
@Schema(description = "管理后台 - 查看生产单下对应的包裹信息")
@Data
@ToString(callSuper = true)
public class PackageDetailsReqVO extends PageParam {
@Schema(description = "生产单号", requiredMode = Schema.RequiredMode.REQUIRED)
@Pattern(regexp = "^[0-9]*$",message = "生产单号必须为数字")
@Length(max = 19,message = "生产单号长度不能超过 19 位")
private String orderId;
@Schema(description = "板编号")
@Pattern(regexp = "^[0-9]*$",message = "板编号必须为数字")
@Length(max = 13,message = "板编号长度不能超过 13 位")
private String plateNo;
@Schema(description = "包裹状态")
private Boolean packStatus;
@Schema(description = "包裹编号")
@Pattern(regexp = "^[0-9]*$",message = "包裹编号必须为数字")
@Length(max = 13,message = "包裹编号长度不能超过 13 位")
private String packageNo;
}
@@ -1,21 +0,0 @@
package com.cf.imes.module.manage.controller.admin.pack.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.ToString;
import javax.validation.constraints.NotNull;
@Schema(description = "管理后台 - 拆包")
@Data
@ToString(callSuper = true)
public class PackingReqVO {
@Schema(description = "包裹ID", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "包裹异常,请查看是否封包")
private Long packageId;
}
@@ -1,23 +0,0 @@
package com.cf.imes.module.manage.controller.admin.pack.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.ToString;
@Schema(description = "板材和配件ID")
@Data
@ToString(callSuper = true)
public class PlateAndPartIdList {
@Schema(description = "板材ID")
private Long plateId;
@Schema(description = "配件ID")
private Long partsId;
}
@@ -1,106 +0,0 @@
package com.cf.imes.module.manage.controller.admin.pack.vo;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.util.List;
@Schema(description = "管理后台 - 板材详情(导出板材表) Response VO")
@Data
@ExcelIgnoreUnannotated
public class PlateDetailsRespVO {
@Schema(description = "包裹ID", requiredMode = Schema.RequiredMode.REQUIRED)
private Long packageId;
@Schema(description = "包裹号", requiredMode = Schema.RequiredMode.REQUIRED)
private String packageNo;
@Schema(description = "房间名称", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("房间名称")
private String roomName;
@Schema(description = "柜体名称", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("柜体名称")
private String cabinetName;
@Schema(description = "房间ID", requiredMode = Schema.RequiredMode.REQUIRED)
private String roomId;
@Schema(description = "柜体ID", requiredMode = Schema.RequiredMode.REQUIRED)
private String bodyId;
@Schema(description = "生产单ID", requiredMode = Schema.RequiredMode.REQUIRED)
private String orderId;
@Schema(description = "板材ID", requiredMode = Schema.RequiredMode.REQUIRED)
private String plateId;
@Schema(description = "自定义板编号", requiredMode = Schema.RequiredMode.REQUIRED)
private String customPlateNo;
@Schema(description = "板编号", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("板编号")
private String plateNo;
@Schema(description = "板名称", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("板名称")
private String plateName;
@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)
@ExcelProperty("面积")
private Double area;
@Schema(description = "纹路", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("纹路")
private Integer texture;
@Schema(description = "异形", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("异形")
private Boolean specialShaped;
@Schema(description = "造型", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("造型")
private Boolean profiling;
@Schema(description = "排孔", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("排孔")
private Boolean rowHole;
@Schema(description = "加工组", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("加工组")
private String processGroup;
@Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("备注")
private String remark;
@Schema(description = "加工组名称集合")
private List<GroupNameList> processGroupNameList;
}
@@ -1,23 +0,0 @@
package com.cf.imes.module.manage.controller.admin.pack.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.ToString;
@Schema(description = "管理后台 - 打印生产单的包裹 Request VO")
@Data
@ToString(callSuper = true)
public class PrintOrderPackReqVO {
@Schema(description = "生产单号", requiredMode = Schema.RequiredMode.REQUIRED, example = "9822")
private Long orderId;
@Schema(description = "包裹id", requiredMode = Schema.RequiredMode.REQUIRED, example = "9822")
private Long packageNo;
}
@@ -1,46 +0,0 @@
package com.cf.imes.module.manage.controller.admin.pack.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.util.List;
@Schema(description = "管理后台 - 包裹打印显示 Response VO")
@Data
public class PrintOrderPackRespVO {
@Schema(description = "自定义单号", requiredMode = Schema.RequiredMode.REQUIRED)
private String customOrderNo;
@Schema(description = "经销商", requiredMode = Schema.RequiredMode.REQUIRED,example = "ABCD")
private String dealer;
@Schema(description = "订单号", requiredMode = Schema.RequiredMode.REQUIRED, example = "7788")
private Long orderId;
@Schema(description = "包裹ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "7788")
private Long packNo;
@Schema(description = "包裹序号", requiredMode = Schema.RequiredMode.REQUIRED, example = "7788")
private Long packNum;
@Schema(description = "客户地址", requiredMode = Schema.RequiredMode.REQUIRED,example = "AABB")
private String address;
@Schema(description = "板材列表", requiredMode = Schema.RequiredMode.REQUIRED,example = "AABB")
private List<PlateDetailsRespVO> plateList;
}
@@ -1,168 +0,0 @@
package com.cf.imes.module.manage.controller.admin.parts;
import com.cf.imes.framework.common.pojo.CommonResult;
import com.cf.imes.framework.common.pojo.PageParam;
import com.cf.imes.framework.common.pojo.PageResult;
import com.cf.imes.framework.common.util.object.BeanUtils;
import com.cf.imes.framework.excel.core.util.ExcelUtils;
import com.cf.imes.framework.operatelog.core.annotations.OperateLog;
import com.cf.imes.module.manage.controller.admin.parts.vo.*;
import com.cf.imes.module.manage.dal.dataobject.parts.PartsDO;
import com.cf.imes.module.manage.service.parts.PartsExcelListener;
import com.cf.imes.module.manage.service.parts.PartsService;
import com.cf.imes.module.manage.util.file.ExcelReadUtil;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Parameters;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import java.io.IOException;
import java.util.List;
import static com.cf.imes.framework.common.pojo.CommonResult.success;
import static com.cf.imes.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;
import static com.cf.imes.framework.operatelog.core.enums.OperateTypeEnum.IMPORT;
@Tag(name = "管理后台 - 配件管理")
@RestController
@RequestMapping("/manage/parts/")
@Validated
public class PartsController {
@Resource
private PartsService partsService;
final String IMPORT_TEMPLATE = "配件导入模板.xlsx";
@PostMapping("/create")
@Operation(summary = "创建配件")
@PreAuthorize("@ss.hasAnyPermissions('system:accessory:create','base:accessory:create')")
public CommonResult<Long> create(@Valid @RequestBody PartsSaveReqVO createReqVO) {
return success(partsService.create(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新配件")
@PreAuthorize("@ss.hasAnyPermissions('system:accessory:update','base:accessory:update')")
public CommonResult<Boolean> update(@Valid @RequestBody PartsSaveReqVO updateReqVO) {
partsService.update(updateReqVO);
return success(true);
}
@DeleteMapping("/delete")
@Operation(summary = "删除配件")
@Parameters({
@Parameter(name = "id", description = "编号", required = true, example = "1024"),
@Parameter(name = "organId", description = "板材所属组织ID", example = "1024")
})
@PreAuthorize("@ss.hasAnyPermissions('system:accessory:delete','base:accessory:delete')")
public CommonResult<Boolean> delete(@RequestParam("id") Long id,
@RequestParam(value = "organId",required = false, defaultValue = "0") Long organId) {
partsService.delete(id, organId);
return success(true);
}
@GetMapping("/get")
@Operation(summary = "获得配件")
@Parameters({
@Parameter(name = "id", description = "编号", required = true, example = "1024"),
@Parameter(name = "organId", description = "板材所属组织ID", example = "1024")
})
@PreAuthorize("@ss.hasAnyPermissions('system:accessory:update','base:accessory:update')")
public CommonResult<PartsRespVO> get(@RequestParam("id") Long id,
@RequestParam(value = "organId", required = false, defaultValue = "0") Long organId) {
PartsDO partsDO = partsService.get(id, organId);
return success(BeanUtils.toBean(partsDO, PartsRespVO.class));
}
@GetMapping("/page")
@Operation(summary = "获得配件分页")
@PreAuthorize("@ss.hasAnyPermissions('system:accessory:query','base:accessory:query')")
public CommonResult<PageResult<PartsRespVO>> getPage(@Valid PartsPageReqVO pageReqVO) {
PageResult<PartsDO> pageResult = partsService.getPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, PartsRespVO.class));
}
@GetMapping("/webcad/page")
@Operation(summary = "获得配件分页")
public CommonResult<PageResult<PartsRespVO>> webCadGetPage(@Valid PartsPageReqVO pageReqVO) {
PageResult<PartsDO> pageResult = partsService.webCadGetPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, PartsRespVO.class));
}
@GetMapping("/export-excel")
@Operation(summary = "导出配件文件")
@PreAuthorize("@ss.hasAnyPermissions('system:accessory:export','base:accessory:export')")
@OperateLog(type = EXPORT)
public void exportExcel(@Valid PartsPageReqVO pageReqVO,
HttpServletResponse response) throws IOException {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<PartsDO> list = partsService.getPage(pageReqVO).getList();
// 导出 Excel
ExcelUtils.write(response, "配件表.xls", "数据", PartsRespVO.class,
BeanUtils.toBean(list, PartsRespVO.class));
}
@GetMapping("/get-import-template")
@Operation(summary = "获得导入配件模板")
@Parameter(name = "value", description = "文件类型", required = true, example = "0")
@PreAuthorize("@ss.hasAnyPermissions('system:accessory:export-template','base:accessory:export-template')")
public void importTemplate(HttpServletResponse response, @RequestParam("value") @NotEmpty(message = "文件路径不能为空") String value) {
partsService.exportTemplate(response, value);
}
@PostMapping("/import")
@Operation(summary = "导入配件")
@Parameters({
@Parameter(name = "file", description = "Excel 文件", required = true),
@Parameter(name = "updateSupport", description = "是否支持更新", example = "true"),
@Parameter(name = "organId", description = "配件所属组织ID")
})
@OperateLog(type = IMPORT)
@PreAuthorize("@ss.hasAnyPermissions('system:accessory:import','base:accessory:import')")
public void importExcel(@RequestParam("file") MultipartFile file,
@RequestParam(value = "updateSupport", required = false, defaultValue = "false") Boolean updateSupport,
@RequestParam(value = "organId", required = false, defaultValue = "0") Long organId,
HttpServletResponse response) throws Exception {
ExcelReadUtil excelReadUtil = new ExcelReadUtil();
PartsExcelListener listener = new PartsExcelListener();
List<PartsImportExcelVO> list = excelReadUtil.read(file, PartsImportExcelVO.class, listener);
if (!excelReadUtil.getFlag())
ExcelUtils.write(response, IMPORT_TEMPLATE, "配件列表", PartsImportExcelVO.class, list);
else {
if (list.isEmpty()){
PartsImportExcelVO partsImportExcelVO = PartsImportExcelVO.builder().result("导入失败,请保证导入文件中包含配件数据").build();
list.add(partsImportExcelVO);
ExcelUtils.write(response, IMPORT_TEMPLATE, "配件列表", PartsImportExcelVO.class, list);
} else {
partsService.importPartsList(list, updateSupport, organId);// 成功,批量导入
}
}
}
@GetMapping("/cad/page")
@Operation(summary = "cad获得配件分页")
// @PreAuthorize("@ss.hasAnyPermissions('system:accessory:query','base:accessory:query')")
public CommonResult<PageResult<PartsRespVO>> getCadPage(@Valid PartsCadPageReqVO pageReqVO) {
PageResult<PartsDO> pageResult = partsService.getCadPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, PartsRespVO.class));
}
@GetMapping("/webcad/all")
@Operation(summary = "获取全部配件信息")
public CommonResult<List<PartsRespVO>> getPlateAll(@RequestParam("category") String category) {
List<PartsDO> list = partsService.getPartAll(category);
return success(BeanUtils.toBean(list, PartsRespVO.class));
}
}
@@ -1,88 +0,0 @@
package com.cf.imes.module.manage.controller.admin.parts.vo;
import com.cf.imes.framework.common.pojo.PageParam;
import com.cf.imes.module.manage.validation.parts.PartsNumberValid;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import javax.validation.constraints.Size;
/**
* cad 传参
*/
@Schema(description = "管理后台 - 配件分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class PartsCadPageReqVO extends PageParam {
@Schema(description = "商品名称", example = "张三")
@Size(max = 64, message = "配件名称长度不能超过64个字符")
private String name;
@Schema(description = "颜色")
@Size(max = 32, message = "颜色长度不能超过32个字符")
private String color;
@Schema(description = "材质:颗粒板、欧松板、多层板、生态板、禾香板、密度板、实木、铝蜂窝板、铝塑板")
@Size(max = 64, message = "材质长度不能超过64个字符")
private String material;
@Schema(description = "配件类型", example = "2")
@Size(max = 32, message = "配件类型长度不能超过323个字符")
private String category;
@Schema(description = "配件子类", example = "2")
@Size(max = 64, message = "配件子类长度不能超过64个字符")
private String type;
@Schema(description = "型号")
@Size(max = 64, message = "配件型号长度不能超过64个字符")
private String model;
@Schema(description = "规格")
@Size(max = 64, message = "配件规格不能超过64个字符")
private String spec;
@Schema(description = "宽度")
@PartsNumberValid(name = "宽度")
private Double width;
@Schema(description = "长度")
@PartsNumberValid(name = "长度")
private Double length;
@Schema(description = "厚度")
@PartsNumberValid(name = "厚度")
private Double thickness;
@Schema(description = "品牌")
@Size(max = 64, message = "配件品牌不能超过64个字符")
private String brand;
@Schema(description = "厂家")
@Size(max = 128, message = "厂家长度不能超过64个字符")
private String factory;
@Schema(description = "单位")
@Size(max = 32, message = "单位长度不能超过64个字符")
private String unit;
@Schema(description = "是否复合部件:0 否 1 是")
private Boolean isComposite;
@Schema(description = "备注", example = "你说的对")
@Size(max = 255, message = "备注长度不能超过255个字符")
private String remark;
private Long organId;
@Schema(description = "排序", example = "ascend")
private String order;
@Schema(description = "排序字段", example = "id")
private String field;
}
@@ -1,75 +0,0 @@
package com.cf.imes.module.manage.controller.admin.parts.vo;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
/**
* 配件导入模板
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = false) // 设置 chain = false,避免用户导入有问题
public class PartsImportExcelVO {
@ExcelProperty("物料编号")
private String goodsId;
@ExcelProperty("分类")
private String category;
@ExcelProperty("复合")
private String isComposite;
@ExcelProperty("子类")
private String type;
@ExcelProperty("物料名称")
private String name;
@ExcelProperty("型号")
private String model;
@ExcelProperty("规格")
private String spec;
@ExcelProperty("材质")
private String material;
@ExcelProperty("颜色")
private String color;
@ExcelProperty("品牌")
private String brand;
@ExcelProperty("厂家")
private String factor;
@ExcelProperty("长度")// float(8,3)
private String length;
@ExcelProperty("宽度")// float(8,3)
private String width;
@ExcelProperty("厚度")
private String thickness;
@ExcelProperty("备注")
private String remark;
@ExcelProperty("价格")// float(8,3)
private String price;
@ExcelProperty("单位")
private String unit;
@ExcelProperty("上传结果")
private String result;
}
@@ -1,108 +0,0 @@
package com.cf.imes.module.manage.controller.admin.parts.vo;
import com.cf.imes.framework.common.pojo.PageParam;
import com.cf.imes.module.manage.validation.parts.PartsNumberValid;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;
import javax.validation.constraints.Size;
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 PartsPageReqVO extends PageParam {
@Schema(description = "设计端商品ID", example = "26589")
@Size(max = 32, message = "配件编号长度不能超过32个字符")
private String goodsId;
@Schema(description = "配件名称", example = "张三")
@Size(max = 64, message = "配件名称长度不能超过64个字符")
private String name;
@Schema(description = "颜色")
@Size(max = 32, message = "颜色长度不能超过32个字符")
private String color;
@Schema(description = "材质:颗粒板、欧松板、多层板、生态板、禾香板、密度板、实木、铝蜂窝板、铝塑板")
@Size(max = 64, message = "材质长度不能超过64个字符")
private String material;
@Schema(description = "配件类型", example = "2")
@Size(max = 32, message = "配件类型长度不能超过323个字符")
private String category;
@Schema(description = "配件子类", example = "2")
@Size(max = 64, message = "配件子类长度不能超过64个字符")
private String type;
@Schema(description = "型号")
@Size(max = 64, message = "配件型号长度不能超过64个字符")
private String model;
@Schema(description = "规格")
@Size(max = 64, message = "配件规格不能超过64个字符")
private String spec;
@Schema(description = "价格")
@PartsNumberValid(name = "价格")
private Double[] price;
@Schema(description = "宽度")
@PartsNumberValid(name = "宽度")
private Double[] width;
@Schema(description = "长度")
@PartsNumberValid(name = "长度")
private Double[] length;
@Schema(description = "厚度")
@PartsNumberValid(name = "厚度")
private Double[] thickness;
@Schema(description = "品牌")
@Size(max = 64, message = "配件品牌不能超过64个字符")
private String brand;
@Schema(description = "厂家")
@Size(max = 128, message = "厂家长度不能超过64个字符")
private String factory;
@Schema(description = "单位")
@Size(max = 32, message = "单位长度不能超过64个字符")
private String unit;
@Schema(description = "是否复合部件:0 否 1 是")
private Boolean isComposite;
@Schema(description = "子配件ID列表,复合部件时记录子配件ID,半角逗号分隔", example = "你说的对")
@Size(max = 255, message = "子配件列表长度不能超过255个字符")
private String subparts;
@Schema(description = "备注", example = "你说的对")
@Size(max = 255, message = "备注长度不能超过255个字符")
private String remark;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
private Long organId;
@Schema(description = "排序", example = "ascend")
private String order;
@Schema(description = "排序字段", example = "id")
private String field;
}
@@ -1,111 +0,0 @@
package com.cf.imes.module.manage.controller.admin.parts.vo;
import com.cf.imes.framework.common.validation.NumberValid;
import com.cf.imes.framework.excel.core.annotations.DictFormat;
import com.cf.imes.framework.excel.core.convert.DictConvert;
import com.cf.imes.module.manage.enums.DictTypeConstants;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;
@Schema(description = "管理后台 - 配件 Response VO")
@Data
@ExcelIgnoreUnannotated
public class PartsRespVO {
@Schema(description = "配件 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "11238")
@ExcelProperty("配件ID")
@ExcelIgnore
private Long id;
@Schema(description = "设计端商品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "26589")
@ExcelProperty("配件编号")
private String goodsId;
@Schema(description = "是否复合部件:0 否 1 是", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty(value = "是否复合部件", converter = DictConvert.class)
@DictFormat(DictTypeConstants.BOOLEAN_STRING)
private Boolean isComposite;
@Schema(description = "子配件ID列表,复合部件时记录子配件ID,半角逗号分隔", requiredMode = Schema.RequiredMode.REQUIRED, example = "你说的对")
// @ExcelProperty("子配件ID列表")
@ExcelIgnore
private String subparts;
@Schema(description = "配件类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
@ExcelProperty("配件类型")
@DictFormat(DictTypeConstants.PART_CATEGORY)
private String category;
@Schema(description = "配件子类", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
@ExcelProperty("配件子类")
private String type;
@Schema(description = "配件名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
@ExcelProperty("配件名称")
private String name;
@Schema(description = "型号", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("型号")
private String model;
@Schema(description = "材质:颗粒板、欧松板、多层板、生态板、禾香板、密度板、实木、铝蜂窝板、铝塑板", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("材质")
private String material;
@Schema(description = "颜色", requiredMode = Schema.RequiredMode.REQUIRED)
@Size(max = 32, message = "颜色长度不能超过32个字符")
@ExcelProperty("颜色")
private String color;
@Schema(description = "单位", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("单位")
private String unit;
@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)
@NumberValid(name = "宽度")
@ExcelProperty("宽度")
private Double width;
@Schema(description = "长度", requiredMode = Schema.RequiredMode.REQUIRED)
@NumberValid(name = "长度")
@ExcelProperty("长度")
private Double length;
@Schema(description = "厚度", requiredMode = Schema.RequiredMode.REQUIRED)
@NumberValid(name = "厚度")
@ExcelProperty("厚度")
private Double thickness;
@Schema(description = "价格", requiredMode = Schema.RequiredMode.REQUIRED)
@NumberValid(name = "价格")
@ExcelProperty("价格")
private Double price;
@Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "你说的对")
@ExcelProperty("备注")
private String remark;
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("创建时间")
private LocalDateTime createTime;
}
@@ -1,99 +0,0 @@
package com.cf.imes.module.manage.controller.admin.parts.vo;
import com.cf.imes.framework.common.validation.NumberValid;
import com.cf.imes.module.manage.validation.parts.PartsCategoryValid;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import javax.validation.constraints.*;
@Schema(description = "管理后台 - 配件 新增/修改 Request VO")
@Data
public class PartsSaveReqVO {
@Schema(description = "配件 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "11238")
private Long id;
@Schema(description = "设计端商品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "26589")
@NotEmpty(message = "设计端商品ID不能为空")
@Size(max = 32, message = "设计端商品ID长度不能超过32个字符")
private String goodsId;
@Schema(description = "配件名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
@NotEmpty(message = "配件名称不能为空")
@Size(max = 64, message = "配件名称长度不能超过64个字符")
private String name;
@Schema(description = "颜色", requiredMode = Schema.RequiredMode.REQUIRED)
@Size(max = 32, message = "颜色长度不能超过32个字符")
// @NotEmpty(message = "颜色不能为空")
private String color;
@Schema(description = "材质:颗粒板、欧松板、多层板、生态板、禾香板、密度板、实木、铝蜂窝板、铝塑板", requiredMode = Schema.RequiredMode.REQUIRED)
// @NotEmpty(message = "材质:颗粒板、欧松板、多层板、生态板、禾香板、密度板、实木、铝蜂窝板、铝塑板不能为空")
@Size(max = 64, message = "材质长度不能超过64个字符")
private String material;
@Schema(description = "配件类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
@NotEmpty(message = "配件类型不能为空")
@Size(max = 32, message = "配件类型长度不能超过32个字符")
@PartsCategoryValid
private String category;
@Schema(description = "配件子类", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
@Size(max = 64, message = "配件子类长度不能超过64个字符")
private String type;
@Schema(description = "型号", requiredMode = Schema.RequiredMode.REQUIRED)
// @NotEmpty(message = "型号不能为空")
@Size(max = 64, message = "型号长度不能超过64个字符")
private String model;
@Schema(description = "价格", requiredMode = Schema.RequiredMode.REQUIRED)
@NumberValid(name = "价格")
private Double price;
@Schema(description = "宽度", requiredMode = Schema.RequiredMode.REQUIRED)
@NumberValid(name = "宽度")
private Double width;
@Schema(description = "长度", requiredMode = Schema.RequiredMode.REQUIRED)
@NumberValid(name = "长度")
private Double length;
@Schema(description = "厚度", requiredMode = Schema.RequiredMode.REQUIRED)
@NumberValid(name = "厚度")
private Double thickness;
@Schema(description = "规格", requiredMode = Schema.RequiredMode.REQUIRED)
@Size(max = 64, message = "规格长度不能超过64个字符")
private String spec;
@Schema(description = "品牌", requiredMode = Schema.RequiredMode.REQUIRED)
@Size(max = 64, message = "品牌长度不能超过64个字符")
private String brand;
@Schema(description = "厂家", requiredMode = Schema.RequiredMode.REQUIRED)
@Size(max = 128, message = "厂家长度不能超过128个字符")
private String factory;
@Schema(description = "单位", requiredMode = Schema.RequiredMode.REQUIRED)
// @NotEmpty(message = "单位不能为空")
@Size(max = 32, message = "单位长度不能超过32个字符")
private String unit;
@Schema(description = "是否复合部件:0 否 1 是", requiredMode = Schema.RequiredMode.REQUIRED)
// @NotNull(message = "是否复合部件不能为空")
private Boolean isComposite;
@Schema(description = "子配件ID列表,复合部件时记录子配件ID,半角逗号分隔", requiredMode = Schema.RequiredMode.REQUIRED, example = "你说的对")
@Size(max = 255, message = "子配件列表长度不能超过255个字符")
private String subparts;
@Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "你说的对")
@Size(max = 255, message = "备注长度不能超过255个字符")
private String remark;
private Long organId;
}
@@ -1,146 +0,0 @@
package com.cf.imes.module.manage.controller.admin.patching;
import com.cf.imes.framework.common.pojo.CommonResult;
import com.cf.imes.framework.common.pojo.PageResult;
import com.cf.imes.module.manage.controller.admin.patching.vo.*;
import com.cf.imes.module.manage.service.patching.PatchingPlateService;
import com.cf.imes.module.manage.dal.dataobject.patching.MachineDO;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.validation.Valid;
import java.util.List;
import static com.cf.imes.framework.common.pojo.CommonResult.success;
@Tag(name = "管理后台 - 补板")
@RestController
@RequestMapping("/manage/patching")
@Validated
public class PatchingPlateController {
@Resource
private PatchingPlateService patchingPlateService;
@GetMapping("/searchPage")
@Operation(summary = "批量加入补板查询")
@PreAuthorize("@ss.hasPermission('manage:patching:query')")
public CommonResult<PageResult<PatchingPlateRespVO>> patchingSearchPlate(@Valid PatchingPlatePageReqVO pageReqVO){
PageResult<PatchingPlateRespVO> patchingPlateRespVOPageResult = patchingPlateService.patchingSearchPlate(pageReqVO);
return success(patchingPlateRespVOPageResult);
}
@GetMapping("/searchPlate")
@Operation(summary = "查询详细的板件")
@PreAuthorize("@ss.hasPermission('manage:patching:query')")
public CommonResult<PageResult<PatchingDetailRespVO>> searchPlateDetail(@Valid PatchingPlatePageReqVO pageReqVO){
PageResult<PatchingDetailRespVO> plateDetailsRespVOPageResult = patchingPlateService.searchPlateDetail(pageReqVO);
return success(plateDetailsRespVOPageResult);
}
@GetMapping("/searchPatchingList")
@Operation(summary = "加入的板件信息")
@Parameter(name = "plateId", description = "板件ID", required = true, example = "1")
@PreAuthorize("@ss.hasPermission('manage:patching:query')")
public CommonResult<PatchingDetailRespVO> searchPatchingList(@Valid @RequestParam("plateId") Long plateId){
return success(patchingPlateService.searchPatchingList(plateId));
}
@GetMapping("/optimizeLayout")
@Operation(summary = "优化排版")
@PreAuthorize("@ss.hasPermission('manage:patching:query')")
public CommonResult<List<PatchingDetailRespVO>> optimizeLayout(@Valid PatchingDetailReqVO reqVO){
List<PatchingDetailRespVO> patchingDetailRespVOS = patchingPlateService.optimizeLayout(reqVO);
return success(patchingDetailRespVOS);
}
@PostMapping("/insertPatching")
@Operation(summary = "新增补板详情表")
@PreAuthorize("@ss.hasPermission('manage:patching:query')")
public CommonResult<Boolean> insertPatching(@Valid @RequestBody PatchingReqVO reqVO){
patchingPlateService.insertPatching(reqVO);
return success(true);
}
@GetMapping("/search")
@Operation(summary = "查询所有的机台")
@PreAuthorize("@ss.hasPermission('manage:patching:query')")
public CommonResult<List<MachineDO>> searchMachine(){
return success(patchingPlateService.searchMachine());
}
@GetMapping("/searchPatchNC")
@Operation(summary = "导出 NC 所需要的数据")
@PreAuthorize("@ss.hasPermission('manage:patching:query')")
public CommonResult<List<PatchingDetailRespVO>> searchPatchNC(@Valid PatchingDetailReqVO reqVO){
List<PatchingDetailRespVO> patchingDetailRespVOS = patchingPlateService.optimizeLayout(reqVO);
return success(patchingDetailRespVOS);
}
}
@@ -1,24 +0,0 @@
package com.cf.imes.module.manage.controller.admin.patching.vo;
import lombok.Data;
import lombok.ToString;
import java.io.Serializable;
@Data
@ToString(callSuper = true)
public class DataRangeList implements Serializable {
private static final long serialVersionUID = -5467901878313885959L;
// 最大值
private Long maxaa;
// 最小值
private Long minbb;
}
@@ -1,37 +0,0 @@
package com.cf.imes.module.manage.controller.admin.patching.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
@Schema(description = "管理后台 - Response VO")
@Data
public class MachineRespVO {
@Schema(description = "机台主键ID", requiredMode = Schema.RequiredMode.REQUIRED)
private Long id;
@Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED)
private String name;
@Schema(description = "机台类型", requiredMode = Schema.RequiredMode.REQUIRED)
private Boolean machineType;
@Schema(description = "标签id", requiredMode = Schema.RequiredMode.REQUIRED)
private Long labelId;
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime createTime;
@Schema(description = "创建者", requiredMode = Schema.RequiredMode.REQUIRED)
private String creator;
}
@@ -1,20 +0,0 @@
package com.cf.imes.module.manage.controller.admin.patching.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.ToString;
import java.util.List;
@Schema(description = "管理后台 - 优化排版 Request VO")
@Data
@ToString(callSuper = true)
public class PatchingDetailReqVO {
@Schema(description = "板编号", requiredMode = Schema.RequiredMode.REQUIRED)
private List<Long> plateIdList;
}
@@ -1,168 +0,0 @@
package com.cf.imes.module.manage.controller.admin.patching.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Schema(description = "管理后台 - 补板详情 Response VO")
@Data
public class PatchingDetailRespVO {
@Schema(description = "房间名称", requiredMode = Schema.RequiredMode.REQUIRED)
private String roomName;
@Schema(description = "房间ID", requiredMode = Schema.RequiredMode.REQUIRED)
private Long roomId;
@Schema(description = "柜体名称", requiredMode = Schema.RequiredMode.REQUIRED)
private String cabinetName;
@Schema(description = "柜体ID", requiredMode = Schema.RequiredMode.REQUIRED)
private Long bodyId;
@Schema(description = "材料", requiredMode = Schema.RequiredMode.REQUIRED)
private String material;
@Schema(description = "颜色", requiredMode = Schema.RequiredMode.REQUIRED)
private String color;
// 需要添加的额外字段
@Schema(description = "板件组合名称", requiredMode = Schema.RequiredMode.REQUIRED)
private String plateCombinationName;
@Schema(description = "自定义单号", requiredMode = Schema.RequiredMode.REQUIRED)
private Long customOrderId;
@Schema(description = "客户", requiredMode = Schema.RequiredMode.REQUIRED)
private String customer;
@Schema(description = "地址", requiredMode = Schema.RequiredMode.REQUIRED)
private String address;
// 用于进行判断是否为异形等
@Schema(description = "异形数量", requiredMode = Schema.RequiredMode.REQUIRED)
private String specialShaped;
@Schema(description = "造型数量", requiredMode = Schema.RequiredMode.REQUIRED)
private String profiling;
@Schema(description = "排孔数量", requiredMode = Schema.RequiredMode.REQUIRED)
private String rowHole;
@Schema(description = "主键-板件ID", requiredMode = Schema.RequiredMode.REQUIRED)
private Long id;
@Schema(description = "生产单号", requiredMode = Schema.RequiredMode.REQUIRED)
private Long orderId;
@Schema(description = "组织 ID", requiredMode = Schema.RequiredMode.REQUIRED)
private Long organId;
@Schema(description = "板名称", requiredMode = Schema.RequiredMode.REQUIRED)
private String name;
@Schema(description = "自定义板编号", requiredMode = Schema.RequiredMode.REQUIRED)
private String plateNo;
@Schema(description = "板类型,0 层板 1 立板 2 背板", requiredMode = Schema.RequiredMode.REQUIRED)
private Integer type;
@Schema(description = "商品 ID", requiredMode = Schema.RequiredMode.REQUIRED)
private Long goodsId;
@Schema(description = "宽度", requiredMode = Schema.RequiredMode.REQUIRED)
private Double width;
@Schema(description = "高度", requiredMode = Schema.RequiredMode.REQUIRED)
private Double height;
@Schema(description = "厚度", requiredMode = Schema.RequiredMode.REQUIRED)
private Double thickness;
@Schema(description = "拆单宽度", requiredMode = Schema.RequiredMode.REQUIRED)
private Double splitWidth;
@Schema(description = "拆单高度", requiredMode = Schema.RequiredMode.REQUIRED)
private Double splitHeight;
@Schema(description = "拆单厚度", requiredMode = Schema.RequiredMode.REQUIRED)
private Double splitThickness;
@Schema(description = "左封边厚度", requiredMode = Schema.RequiredMode.REQUIRED)
private Double sealLeft;
@Schema(description = "右封边厚度", requiredMode = Schema.RequiredMode.REQUIRED)
private Double sealRight;
@Schema(description = "上封边厚度", requiredMode = Schema.RequiredMode.REQUIRED)
private Double sealUp;
@Schema(description = "下封边厚度", requiredMode = Schema.RequiredMode.REQUIRED)
private Double sealDown;
@Schema(description = "面积", requiredMode = Schema.RequiredMode.REQUIRED)
private Double area;
@Schema(description = "纹路类型,0 正纹 1 可翻转 2 反纹", requiredMode = Schema.RequiredMode.REQUIRED)
private Integer texture;
@Schema(description = "孔面类型,0 正面 1 反面 2 侧面", requiredMode = Schema.RequiredMode.REQUIRED)
private Integer holeFace;
@Schema(description = "排孔类型,0 正纹 1 反面 2 随意面", requiredMode = Schema.RequiredMode.REQUIRED)
private Integer holeArrange;
@Schema(description = "异型孔数量", requiredMode = Schema.RequiredMode.REQUIRED)
private Integer unregularPointCount;
@Schema(description = "正面孔数量", requiredMode = Schema.RequiredMode.REQUIRED)
private Integer frontHoleCount;
@Schema(description = "背面孔数量", requiredMode = Schema.RequiredMode.REQUIRED)
private Integer backHoleCount;
@Schema(description = "侧面孔数量", requiredMode = Schema.RequiredMode.REQUIRED)
private Integer sideHoleCount;
@Schema(description = "正面造型量", requiredMode = Schema.RequiredMode.REQUIRED)
private Integer frontModelCount;
@Schema(description = "背面造型量", requiredMode = Schema.RequiredMode.REQUIRED)
private Integer backModelCount;
@Schema(description = "是否门板", requiredMode = Schema.RequiredMode.REQUIRED)
private Boolean isDoor;
@Schema(description = "开门类型,0 无 1 左 2 右 3 上 4 下", requiredMode = Schema.RequiredMode.REQUIRED)
private Integer openDoorType;
@Schema(description = "异型偏移 x", requiredMode = Schema.RequiredMode.REQUIRED)
private Float offsetX;
@Schema(description = "异型偏移 y", requiredMode = Schema.RequiredMode.REQUIRED)
private Float offsetY;
@Schema(description = "是否孤形对角", requiredMode = Schema.RequiredMode.REQUIRED)
private Boolean isArcAcross;
@Schema(description = "模块类型 ID", requiredMode = Schema.RequiredMode.REQUIRED)
private Long moduleTypeId;
@Schema(description = "排单过滤类型,1 有挖穿造型 2 有挖穿孔 4 有二维刀路 8 可叠", requiredMode = Schema.RequiredMode.REQUIRED)
private String filterType;
@Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED)
private String remark;
}
@@ -1,123 +0,0 @@
package com.cf.imes.module.manage.controller.admin.patching.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.cf.imes.framework.common.pojo.PageParam;
import io.swagger.v3.core.util.Json;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.apache.ibatis.type.TypeHandler;
import java.util.HashMap;
import java.util.List;
@Schema(description = "管理后台 - 补板 分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class PatchingPlatePageReqVO extends PageParam {
@Schema(description = "订单号")
private Long orderNo;
@Schema(description = "自定义单号")
private String customOrderNo;
@Schema(description = "状态-生产中,加工完成,打包完成", requiredMode = Schema.RequiredMode.REQUIRED,example = "3,4,5")
private List<Long> statusList;
@Schema(description = "客户")
private String customer;
@Schema(description = "收货地址")
private String address;
@Schema(description = "开始时间"/*, requiredMode = Schema.RequiredMode.REQUIRED*/)
private String startTime;
@Schema(description = "结束时间"/*, requiredMode = Schema.RequiredMode.REQUIRED*/)
private String endTime;
@Schema(description = "矩形")
private Boolean isRectangle;
@Schema(description = "异形")
private Boolean isSpecialShaped;
@Schema(description = "造型")
private Boolean isProfiling;
@Schema(description = "有挖穿造型")
private Boolean isDigThrough;
@Schema(description = "有挖穿孔")
private Boolean isDiggingHoles;
@Schema(description = "有二维刀路")
private Boolean is2DCuttingPath;
@Schema(description = "门板")
private Boolean isDoor;
@Schema(description = "长范围")
@TableField(typeHandler = JacksonTypeHandler.class)
private List<DataRangeList> longRangeList;
@Schema(description = "宽范围")
private List<DataRangeList> WidthRangeList;
}
@@ -1,55 +0,0 @@
package com.cf.imes.module.manage.controller.admin.patching.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Schema(description = "管理后台 - 补板 Response VO")
@Data
public class PatchingPlateRespVO {
@Schema(description = "订单号", requiredMode = Schema.RequiredMode.REQUIRED)
private Long orderId;
@Schema(description = "自定义单号", requiredMode = Schema.RequiredMode.REQUIRED)
private Long customOrderId;
@Schema(description = "客户", requiredMode = Schema.RequiredMode.REQUIRED)
private String customer;
@Schema(description = "地址", requiredMode = Schema.RequiredMode.REQUIRED)
private String address;
@Schema(description = "订单状态", requiredMode = Schema.RequiredMode.REQUIRED)
private Long orderStatus;
@Schema(description = "柜体ID", requiredMode = Schema.RequiredMode.REQUIRED)
private Long groupId;
@Schema(description = "板件显示名称", requiredMode = Schema.RequiredMode.REQUIRED)
private String plateName;
@Schema(description = "材料", requiredMode = Schema.RequiredMode.REQUIRED)
private String material;
@Schema(description = "颜色", requiredMode = Schema.RequiredMode.REQUIRED)
private String color;
@Schema(description = "宽度", requiredMode = Schema.RequiredMode.REQUIRED)
private Double width;
@Schema(description = "长度", requiredMode = Schema.RequiredMode.REQUIRED)
private Double height;
@Schema(description = "厚度", requiredMode = Schema.RequiredMode.REQUIRED)
private Double thickness;
@Schema(description = "面积", requiredMode = Schema.RequiredMode.REQUIRED)
private Double area;
@Schema(description = "板件数量", requiredMode = Schema.RequiredMode.REQUIRED)
private Long plateNum;
}
@@ -1,34 +0,0 @@
package com.cf.imes.module.manage.controller.admin.patching.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.ToString;
import java.util.List;
@Schema(description = "管理后台 - 新增补板详情 Request VO")
@Data
@ToString(callSuper = true)
public class PatchingReqVO {
@Schema(description = "板编号", requiredMode = Schema.RequiredMode.REQUIRED)
private List<Long> idList;
@Schema(description = "计划ID", requiredMode = Schema.RequiredMode.REQUIRED)
private Long planId;
@Schema(description = "机台", requiredMode = Schema.RequiredMode.REQUIRED)
private Long machineId;
/* @Schema(description = "板材详情", requiredMode = Schema.RequiredMode.REQUIRED)
private String detail;*/
}
@@ -1,4 +0,0 @@
### 请求 /manage/plate 接口 => 没有权限
GET {{baseUrl}}/system/plate
Authorization: Bearer {{token}}
organ-id: {{adminTenentId}}
@@ -1,182 +0,0 @@
package com.cf.imes.module.manage.controller.admin.plate;
import com.cf.imes.framework.common.pojo.CommonResult;
import com.cf.imes.framework.common.pojo.PageParam;
import com.cf.imes.framework.common.pojo.PageResult;
import com.cf.imes.framework.common.util.object.BeanUtils;
import com.cf.imes.framework.excel.core.util.ExcelUtils;
import com.cf.imes.framework.operatelog.core.annotations.OperateLog;
import com.cf.imes.module.manage.controller.admin.plate.vo.plate.PlateImportExcelVO;
import com.cf.imes.module.manage.controller.admin.plate.vo.plate.PlatePageReqVO;
import com.cf.imes.module.manage.controller.admin.plate.vo.plate.PlateRespVO;
import com.cf.imes.module.manage.controller.admin.plate.vo.plate.PlateSaveReqVO;
import com.cf.imes.module.manage.dal.dataobject.plate.PlateDO;
import com.cf.imes.module.manage.service.plate.PlateExcelListener;
import com.cf.imes.module.manage.service.plate.PlateService;
import com.cf.imes.module.manage.util.file.ExcelReadUtil;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Parameters;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.io.IOException;
import java.util.List;
import static com.cf.imes.framework.common.pojo.CommonResult.success;
import static com.cf.imes.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;
import static com.cf.imes.framework.operatelog.core.enums.OperateTypeEnum.IMPORT;
@Tag(name = "管理后台 - 板材库管理")
@RestController
@RequestMapping("/manage/plate")
@Validated
public class PlateController {
@Resource
private PlateService plateService;
final String IMPORT_TEMPLATE = "板材导入模板.xlsx";
@PostMapping("/create")
@Operation(summary = "创建板材信息")
@PreAuthorize("@ss.hasAnyPermissions('manage:plate:create','base:plate:create')")
public CommonResult<Long> createPlate(@Valid @RequestBody PlateSaveReqVO createReqVO) {
return success(plateService.createPlate(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新板材信息")
@PreAuthorize("@ss.hasAnyPermissions('manage:plate:update','base:plate:update')")
public CommonResult<Boolean> updatePlate(@Valid @RequestBody PlateSaveReqVO updateReqVO) {
plateService.updatePlate(updateReqVO);
return success(true);
}
@DeleteMapping("/delete")
@Operation(summary = "删除板材信息")
@Parameters({
@Parameter(name = "id", description = "编号", required = true, example = "1024"),
@Parameter(name = "organId", description = "板材所属组织ID", example = "1024")
})
@PreAuthorize("@ss.hasAnyPermissions('manage:plate:delete','base:plate:delete')")
public CommonResult<Boolean> deletePlate(@RequestParam("id") Long id,
@RequestParam(value = "organId",required = false, defaultValue = "0") Long organId) {
plateService.deletePlate(id,organId);
return success(true);
}
@GetMapping("/get")
@Operation(summary = "获得板材信息")
@Parameters({
@Parameter(name = "id", description = "编号", required = true, example = "1024"),
@Parameter(name = "organId", description = "板材所属组织ID", required = true, example = "1024")
})
@PreAuthorize("@ss.hasAnyPermissions('manage:plate:update','base:plate:update')")
public CommonResult<PlateRespVO> getPlate(@RequestParam("id") Long id,
@RequestParam("organId") Long organId) {
PlateDO plate = plateService.getPlate(id, organId);
return success(BeanUtils.toBean(plate, PlateRespVO.class));
}
@GetMapping("/page")
@Operation(summary = "获得板材信息分页")
@PreAuthorize("@ss.hasAnyPermissions('manage:plate:query','base:plate:query')")
public CommonResult<PageResult<PlateRespVO>> getPlatePage(@Valid PlatePageReqVO pageReqVO) {
PageResult<PlateDO> pageResult = plateService.getPlatePage(pageReqVO);
return success(BeanUtils.toBean(pageResult, PlateRespVO.class));
}
@GetMapping("/webcad/page")
@Operation(summary = "webcad获得板材信息分页")
public CommonResult<PageResult<PlateRespVO>> webCadGetPlatePage(@Valid PlatePageReqVO pageReqVO) {
PageResult<PlateDO> pageResult = plateService.webCadGetPlatePage(pageReqVO);
return success(BeanUtils.toBean(pageResult, PlateRespVO.class));
}
@GetMapping("/export")
@Operation(summary = "导出板材信息")
@PreAuthorize("@ss.hasAnyPermissions('manage:plate:export','base: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));
}
@GetMapping("/get-import-template")
@Operation(summary = "获得导入用户模板")
@PreAuthorize("@ss.hasAnyPermissions('system:plate:export-template','base:plate:export-template')")
public void importTemplate(HttpServletResponse response) throws IOException {
// // 手动创建导出 demo
// List<PlateImportExcelVO> list = Arrays.asList(
// PlateImportExcelVO.builder().goodsId("BD10010001").goodsName("18mm-多层板-暖白").material("多层板").width(String.valueOf(1220)).height(String.valueOf(2440))
// .thickness(String.valueOf(18)).brand("AAA").spec("2440*1220*18").color("暖白").price("120").texture("无").build(),
// PlateImportExcelVO.builder().goodsId("BD10010002").goodsName("18mm-颗粒板-高级灰").material("多层板").width(String.valueOf(1220)).height(String.valueOf(2750))
// .thickness(String.valueOf(18)).brand("鸿达树").spec("2750*1220*18").color("高级灰").price("120").texture("无").build()
// );
// // 输出
// ExcelUtils.write(response, IMPORT_TEMPLATE, "板材列表", PlateImportExcelVO.class, list);
plateService.exportTemplate(response, "excel_plate_add.xlsx");
}
// @GetMapping("/get-import-template")
// @Operation(summary = "获得导入板材模板")
// @Parameter(name = "value", description = "文件类型", required = true, example = "0")
// public void importTemplate(HttpServletResponse response, @RequestParam("value") @NotEmpty(message = "文件路径不能为空") String value) {
// plateService.exportTemplate(response, value);
// }
@PostMapping("/import")
@Operation(summary = "导入板材")
@Parameters({
@Parameter(name = "file", description = "Excel 文件", required = true),
@Parameter(name = "updateSupport", description = "是否支持更新,默认为 false", example = "true"),
@Parameter(name = "organId", description = "板材所属组织ID")
})
@OperateLog(type = IMPORT)
// @PreAuthorize("@ss.hasPermission('manage:plate:import')")
@PreAuthorize("@ss.hasAnyPermissions('manage:plate:import','base:plate:import')")
public void importExcel(@RequestParam("file") MultipartFile file,
@RequestParam(value = "updateSupport", required = false, defaultValue = "false") Boolean updateSupport,
@RequestParam(value = "organId") Long organId,
HttpServletResponse response) throws Exception {
ExcelReadUtil excelReadUtil = new ExcelReadUtil();
PlateExcelListener listener = new PlateExcelListener();
List<PlateImportExcelVO> list = excelReadUtil.read(file, PlateImportExcelVO.class, listener);
// 判断文件是否导入成功
if (!excelReadUtil.getFlag())
ExcelUtils.write(response, IMPORT_TEMPLATE, "板材列表", PlateImportExcelVO.class, list);
else {
if (list.isEmpty()){
PlateImportExcelVO plateImportExcelVO = PlateImportExcelVO.builder().result("导入失败,请保证导入文件中包含板材数据").build();
list.add(plateImportExcelVO);
ExcelUtils.write(response, IMPORT_TEMPLATE, "板材列表", PlateImportExcelVO.class, list);
}else {
plateService.importPlateList(list, updateSupport, organId);// 成功,批量导入
}
}
// plateExcelUtil.clear();
}
@GetMapping("/webcad/all")
@Operation(summary = "获取全部板材信息")
public CommonResult<List<PlateRespVO>> webCadGetPlateAll() {
List<PlateDO> list = plateService.getPlateAll();
return success(BeanUtils.toBean(list, PlateRespVO.class));
}
}
@@ -1,129 +0,0 @@
package com.cf.imes.module.manage.controller.admin.plate;
import com.cf.imes.framework.common.pojo.CommonResult;
import com.cf.imes.framework.common.pojo.PageParam;
import com.cf.imes.framework.common.pojo.PageResult;
import com.cf.imes.framework.common.util.object.BeanUtils;
import com.cf.imes.framework.excel.core.util.ExcelUtils;
import com.cf.imes.framework.operatelog.core.annotations.OperateLog;
import com.cf.imes.module.manage.controller.admin.plate.vo.remain.RemainPlatePageReqVO;
import com.cf.imes.module.manage.controller.admin.plate.vo.remain.RemainPlateRespVO;
import com.cf.imes.module.manage.controller.admin.plate.vo.remain.RemainPlateSaveReqVO;
import com.cf.imes.module.manage.controller.admin.plate.vo.remain.RemainPlateUptReqVO;
import com.cf.imes.module.manage.dal.dataobject.remainplaten.RemainPlateDO;
import com.cf.imes.module.manage.service.remainplaten.RemainPlateService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.io.IOException;
import java.util.List;
import java.util.Set;
import static com.cf.imes.framework.common.pojo.CommonResult.success;
import static com.cf.imes.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;
@Tag(name = "管理后台 - 余料管理")
@RestController
@RequestMapping("/manage/remain-plate")
@Validated
public class RemainPlateController {
@Resource
private RemainPlateService remainPlateService;
@PostMapping("/create")
@Operation(summary = "添加余料(单个)")
@PreAuthorize("@ss.hasAnyPermissions('manage:remain-plate:create','placeorder:optimize')")
public CommonResult<Boolean> createRemainPlate(@Valid @RequestBody RemainPlateSaveReqVO createReqVO) {
return success(remainPlateService.createRemainPlate(createReqVO));
}
@PostMapping("/createMultiple")
@Operation(summary = "创建生产单余料板表(多个)")
@PreAuthorize("@ss.hasAnyPermissions('manage:remain-plate:create','placeorder:optimize')")
public CommonResult<Boolean> createRemainPlateMultiple(@Valid @RequestBody Set<RemainPlateSaveReqVO> createReqVOS) {
return success(remainPlateService.createRemainPlateMultiple(createReqVOS));
}
@PutMapping("/update")
@Operation(summary = "余料修改")
@PreAuthorize("@ss.hasPermission('manage:remain-plate:update')")
public CommonResult<Boolean> updateRemainPlate(@Valid @RequestBody RemainPlateSaveReqVO updateReqVO) {
remainPlateService.updateRemainPlate(updateReqVO);
return success(true);
}
@PutMapping("/updateStatus")
@Operation(summary = "余料板批量核销")
@PreAuthorize("@ss.hasAnyPermissions('manage:remain-plate:update','manage:remain-plate:write-off')")
public CommonResult<Boolean> updateRemainPlate(@RequestBody RemainPlateUptReqVO updateReqVO) {
remainPlateService.updateRemainPlateStatus(updateReqVO.getIds(),
updateReqVO.getStatus(),
updateReqVO.getUseType(),
updateReqVO.getPlanId());
return success(true);
}
@PutMapping("/revertUpdate")
@Operation(summary = "余料板批量释放")
@PreAuthorize("@ss.hasAnyPermissions('manage:remain-plate:update','manage:remain-plate:release')")
public CommonResult<Boolean> revertRemainPlate(@RequestBody RemainPlateUptReqVO updateReqVO) {
remainPlateService.revertRemainPlateStatus(updateReqVO.getIds(),updateReqVO.getStatus());
return success(true);
}
@DeleteMapping("/delete")
@Operation(summary = "删除余料")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('manage:remain-plate:delete')")
public CommonResult<Boolean> deleteRemainPlate(@RequestParam("id") Set<Long> ids) {
remainPlateService.deleteRemainPlate(ids);
return success(true);
}
@GetMapping("/get")
@Operation(summary = "获得生产单余料板表")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('manage:remain-plate:query')")
public CommonResult<RemainPlateRespVO> getRemainPlate(@RequestParam("id") Long id) {
RemainPlateDO remainPlate = remainPlateService.getRemainPlate(id);
return success(BeanUtils.toBean(remainPlate, RemainPlateRespVO.class));
}
@GetMapping("/page")
@Operation(summary = "获得生产单余料板表分页")
@PreAuthorize("@ss.hasAnyPermissions('manage:remain-plate:query','placeorder:optimize','placeorder:remain-insert','production:manager-list:calculate')")
public CommonResult<PageResult<RemainPlateRespVO>> getRemainPlatePage(@Valid RemainPlatePageReqVO pageReqVO) {
PageResult<RemainPlateDO> pageResult = remainPlateService.getRemainPlatePage(pageReqVO);
return success(BeanUtils.toBean(pageResult, RemainPlateRespVO.class));
}
@GetMapping("/pageAdd")
@Operation(summary = "获得生产单余料板可添加分页")
@PreAuthorize("@ss.hasPermission('manage:remain-plate:query')")
public CommonResult<PageResult<RemainPlateRespVO>> getRemainPlatePageToAdd(@Valid RemainPlatePageReqVO pageReqVO) {
PageResult<RemainPlateDO> pageResult = remainPlateService.getRemainPlatePageToAdd(pageReqVO);
return success(BeanUtils.toBean(pageResult, RemainPlateRespVO.class));
}
@GetMapping("/export-excel")
@Operation(summary = "导出生产单余料板表Excel")
@PreAuthorize("@ss.hasPermission('manage:remain-plate:export')")
@OperateLog(type = EXPORT)
public void exportRemainPlateExcel(@Valid RemainPlatePageReqVO pageReqVO,
HttpServletResponse response) throws IOException {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<RemainPlateDO> list = remainPlateService.getRemainPlatePage(pageReqVO).getList();
// 导出 Excel
ExcelUtils.write(response, "生产单余料板表 order_remain_plate_{N}.xls", "数据", RemainPlateRespVO.class,
BeanUtils.toBean(list, RemainPlateRespVO.class));
}
}
@@ -1,110 +0,0 @@
package com.cf.imes.module.manage.controller.admin.plate.vo.plate;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.cf.imes.framework.excel.core.annotations.DictFormat;
import com.cf.imes.framework.excel.core.convert.DictConvert;
import com.cf.imes.module.manage.enums.DictTypeConstants;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotEmpty;
/**
* 用户 Excel 导入 VO
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = false) // 设置 chain = false,避免用户导入有问题
public class PlateImportExcelVO {
@ExcelProperty("*物料编号")
@NotEmpty(message = "物料编号不能为空")
private String goodsId;
@ExcelProperty("*物料名称")
@NotEmpty(message = "物料名称不能为空")
private String goodsName;
@ExcelProperty("*材质")
@NotEmpty(message = "材质不能为空")
private String material;
@ExcelProperty("*颜色")
@NotEmpty(message = "颜色不能为空")
private String color;
@ExcelProperty(value = "纹理")
@ColumnWidth(10)
private String texture;
@ExcelProperty("宽度")
@ColumnWidth(10)
@NotEmpty(message = "宽度不能为空")
private String width;
@ExcelProperty("高度")// float(8,3)
@ColumnWidth(10)
@NotEmpty(message = "高度不能为空")
private String height;
@ExcelProperty("*厚度")
@ColumnWidth(10)
@NotEmpty(message = "厚度不能为空")
private String thickness;
@ExcelProperty("规格")
@NotEmpty(message = "规格不能为空")
private String spec;
@ExcelProperty("备注")
private String remark;
@ExcelProperty("品牌")
@NotEmpty(message = "品牌不能为空")
private String brand;
@ExcelProperty("价格")
@NotEmpty(message = "价格不能为空")
private String price;
@ExcelProperty("上传结果")
private String result;
public boolean isValidGoods() {
return !(goodsId == null || goodsId.isEmpty() || goodsName == null || goodsName.isEmpty() || material == null ||
material.isEmpty() || color == null || color.isEmpty() ||thickness.isEmpty() );
}
// 数据长度判断
public boolean checkPrecision(Double number) {
if (number == null) {
return false;
}
// 将浮点数转换成字符串
String numberStr = Double.toString(number);
// 分割整数部分和小数部分
String[] parts = numberStr.split("\\.");
String integerPart = parts[0];
String decimalPart = parts.length > 1 ? parts[1] : "";
// 检查整数部分位数
if (integerPart.length() > 5) {
return false;
}
// 检查小数部分位数
if (decimalPart.length() > 3) {
return false;
}
return true;
}
}
@@ -1,28 +0,0 @@
package com.cf.imes.module.manage.controller.admin.plate.vo.plate;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Builder;
import lombok.Data;
import java.util.List;
import java.util.Map;
/**
* @projectName: cf_imes_back
* @author: 晨丰科技
* @date: 2024/2/27 16:36
*/
@Schema(description = "管理后台 - 板材信息表 plate_{N}导入 Response VO")
@Data
@Builder
public class PlateImportRespVO {
@Schema(description = "创建成功的板材数组", requiredMode = Schema.RequiredMode.REQUIRED)
private List<String> createPlateNames;
@Schema(description = "更新成功的板材数组", requiredMode = Schema.RequiredMode.REQUIRED)
private List<String> updatePlateNames;
@Schema(description = "导入失败的板材集合,key 为板材名,value 为失败原因", requiredMode = Schema.RequiredMode.REQUIRED)
private Map<String, String> failurePlateNames;
}
@@ -1,75 +0,0 @@
package com.cf.imes.module.manage.controller.admin.plate.vo.plate;
import com.cf.imes.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;
import javax.validation.constraints.Size;
import java.time.LocalDateTime;
import static com.cf.imes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = "管理后台 - 板材信息表 plate_{N}分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class PlatePageReqVO extends PageParam {
@Schema(description = "客户的商品编号", example = "1")
@Size(max = 32, message = "商品编号长度不能超过32个字符")
private String goodsId;
@Schema(description = "商品名称", example = "赵六")
@Size(max = 64, message = "商品名称长度不能超过64个字符")
private String goodsName;
@Schema(description = "材质:颗粒板、欧松板、多层板、生态板、禾香板、密度板、实木、铝蜂窝板、铝塑板")
@Size(max = 64, message = "材质长度不能超过64个字符")
private String material;
@Schema(description = "颜色")
@Size(max = 32, message = "颜色长度不能超过32个字符")
private String color;
@Schema(description = "纹理")
private Boolean texture;
@Schema(description = "宽度")
private Double width;
@Schema(description = "高度")
private Double height;
@Schema(description = "厚度")
private Double thickness;
@Schema(description = "价格", example = "3380")
private Double price;
@Schema(description = "品牌")
@Size(max = 64, message = "品牌长度不能超过64个字符")
private String brand;
@Schema(description = "规格")
@Size(max = 64, message = "规格长度不能超过64个字符")
private String spec;
@Schema(description = "备注", example = "随便")
@Size(max = 255, message = "备注长度不能超过255个字符")
private String remark;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
private Long organId;
@Schema(description = "排序", example = "ascend")
private String order;
@Schema(description = "排序字段", example = "id")
private String field;
}
@@ -1,75 +0,0 @@
package com.cf.imes.module.manage.controller.admin.plate.vo.plate;
import com.cf.imes.framework.excel.core.annotations.DictFormat;
import com.cf.imes.framework.excel.core.convert.DictConvert;
import com.cf.imes.module.manage.enums.DictTypeConstants;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
@Schema(description = "管理后台 - 板材信息表 plate_{N} Response VO")
@Data
@ExcelIgnoreUnannotated
public class PlateRespVO {
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@ExcelIgnore
private Long id;
@Schema(description = "客户的商品编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@ExcelProperty("商品编号")
private String goodsId;
@Schema(description = "商品名称", 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 = "纹理", example = "")
@ExcelProperty(value = "纹理", converter = DictConvert.class)
@DictFormat(DictTypeConstants.PLATE_TEXTURE)
private Boolean texture;
@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 = "3380")
@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)
@ExcelIgnore
private LocalDateTime createTime;
private Long organId;
}
@@ -1,74 +0,0 @@
package com.cf.imes.module.manage.controller.admin.plate.vo.plate;
import com.cf.imes.framework.common.validation.NumberValid;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
@Schema(description = "管理后台 - 板材信息表 plate_{N}新增/修改 Request VO")
@Data
public class PlateSaveReqVO {
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Long id;
@Schema(description = "客户的商品编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotEmpty(message = "客户的商品编号不能为空")
@Size(max = 32, message = "商品编号长度不能超过32个字符")
private String goodsId;
@Schema(description = "商品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
@NotEmpty(message = "商品名称不能为空")
@Size(max = 64, message = "商品名称长度不能超过64个字符")
private String goodsName;
@Schema(description = "材质:颗粒板、欧松板、多层板、生态板、禾香板、密度板、实木、铝蜂窝板、铝塑板", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "材质:颗粒板、欧松板、多层板、生态板、禾香板、密度板、实木、铝蜂窝板、铝塑板不能为空")
@Size(max = 64, message = "材质长度不能超过64个字符")
private String material;
@Schema(description = "颜色", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "颜色不能为空")
@Size(max = 32, message = "颜色长度不能超过32个字符")
private String color;
@Schema(description = "纹理", requiredMode = Schema.RequiredMode.REQUIRED)
// @NotNull(message = "纹理不能为空")
private Boolean texture;
@Schema(description = "宽度", requiredMode = Schema.RequiredMode.REQUIRED)
// @NotNull(message = "宽度不能为空")
@NumberValid(name = "宽度")
private Double width;
@Schema(description = "高度", requiredMode = Schema.RequiredMode.REQUIRED)
// @NotNull(message = "高度不能为空")
@NumberValid(name = "高度")
private Double height;
@Schema(description = "厚度", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "厚度不能为空")
@NumberValid(name = "厚度")
private Double thickness;
@Schema(description = "价格", example = "3380")
@NumberValid(name = "价格")
private Double price;
@Schema(description = "品牌")
@Size(max = 64, message = "品牌长度不能超过64个字符")
private String brand;
@Schema(description = "规格")
@Size(max = 64, message = "规格长度不能超过64个字符")
private String spec;
@Schema(description = "备注", example = "随便")
@Size(max = 255, message = "备注长度不能超过255个字符")
private String remark;
private Long organId;
}
@@ -1,111 +0,0 @@
package com.cf.imes.module.manage.controller.admin.plate.vo.remain;
import com.cf.imes.framework.common.validation.NumberValid;
import com.cf.imes.module.manage.validation.common.ValidCommonStatus;
import com.cf.imes.module.manage.validation.placeStyle.ValidPlaceStyle;
import com.cf.imes.module.manage.validation.type.ValidTypeField;
import lombok.*;
import io.swagger.v3.oas.annotations.media.Schema;
import com.cf.imes.framework.common.pojo.PageParam;
import org.springframework.format.annotation.DateTimeFormat;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import static com.cf.imes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = "管理后台 - 生产单余料板表 order_remain_plate_{N}分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class RemainPlatePageReqVO extends PageParam {
@Schema(description = "ID", example = "16628")
@Pattern(regexp = "^[0-9]*$",message = "余料号应为数字")
private String id;
@Schema(description = "排单 ID", example = "16628")
@Pattern(regexp = "^[0-9]*$",message = "使用排单号应为数字")
private String planId;
@Schema(description = "组织id", example = "1")
private Long organId;
@Schema(description = "初始排单 ID", example = "6628")
@Pattern(regexp = "^[0-9]*$",message = "排单号应为数字")
private String initPlanId;
@Schema(description = "余料板状态,0未使用,1使用中", example = "0")
@ValidCommonStatus
private Integer status;
@Schema(description = "是否为开料添加,0否,1是", example = "0")
private Boolean isCutting;
@Schema(description = "使用类型,0核销,1排单,2补板", example = "0")
@ValidTypeField
private Integer useType;
@Schema(description = "商品 ID", example = "7425")
@Size(max = 32, message = "商品ID长度不能超过32个字符")
private String goodsId;
@Schema(description = "商品名", example = "晨丰")
@Size(max = 255, message = "商品名长度不能超过255个字符")
private String name;
@Schema(description = "材料")
@Size(max = 50, message = "材料长度不能超过50个字符")
private String material;
@Schema(description = "颜色")
@Size(max = 50, message = "颜色长度不能超过50个字符")
private String color;
@Schema(description = "纹理")
private Boolean texture;
@Schema(description = "宽度")
private BigDecimal[] width;
@Schema(description = "长度")
private BigDecimal[] length;
@Schema(description = "厚度")
@NumberValid(name = "厚度")
private BigDecimal thickness;
@Schema(description = "品牌")
@Size(max = 50, message = "品牌长度不能超过50个字符")
private String brand;
@Schema(description = "放置样式,0正面,1正面右转,2正面后转,3正面左转,4反面,5反面右转,6反面后转,7反面左转")
@ValidPlaceStyle
private Integer placeStyle;
@Schema(description = "仓库名")
@Size(max = 64, message = "品牌长度不能超过64个字符")
private String store;
@Schema(description = "数量", example = "18318")
private Integer count;
@Schema(description = "备注", example = "随便")
@Size(max = 255, message = "品牌长度不能超过255个字符")
private String remark;
@Schema(description = "轮廊数据,Json 串")
private String outLineJson;
@Schema(description = "创建日期")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
@Schema(description = "排序", example = "ascend")
private String order;
@Schema(description = "排序字段", example = "id")
private String field;
}
@@ -1,105 +0,0 @@
package com.cf.imes.module.manage.controller.admin.plate.vo.remain;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
import javax.validation.constraints.NotEmpty;
@Schema(description = "管理后台 - 生产单余料板表 order_remain_plate_{N} Response VO")
@Data
@ExcelIgnoreUnannotated
public class RemainPlateRespVO {
@Schema(description = "余料板 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "16470")
@ExcelProperty("余料板 ID")
private Long id;
@Schema(description = "组织id", example = "1")
@ExcelIgnore
private Long organId;
@Schema(description = "排单 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "16628")
@ExcelProperty("排单 ID")
private Long planId;
@Schema(description = "初始排单 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "6628")
@ExcelProperty("初始排单 ID")
private Long initPlanId;
@Schema(description = "余料板状态,0未使用,1使用中", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@ExcelProperty("余料板状态,0未使用,1使用中")
private Integer status;
@Schema(description = "是否为开料添加,0否,1是", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@ExcelProperty("是否为开料添加,0否,1是")
private Boolean isCutting;
@Schema(description = "使用类型,0核销,1排单,2补板", example = "0")
@ExcelProperty("使用类型,0核销,1排单,2补板")
private Integer useType;
@Schema(description = "商品 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "7425")
@ExcelProperty("商品 ID")
private String 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)
@ExcelProperty("颜色")
private String color;
@Schema(description = "纹理 有 无", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("纹理 有 无")
private Boolean texture;
@Schema(description = "宽度", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("宽度")
private BigDecimal width;
@Schema(description = "长度", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("长度")
private BigDecimal length;
@Schema(description = "厚度", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("厚度")
private BigDecimal thickness;
@Schema(description = "品牌", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("品牌")
private String brand;
@Schema(description = "放置样式,0正面,1正面右转,2正面后转,3正面左转,4反面,5反面右转,6反面后转,7反面左转", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("放置样式,0正面,1正面右转,2正面后转,3正面左转,4反面,5反面右转,6反面后转,7反面左转")
private Integer placeStyle;
@Schema(description = "仓库名", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("仓库名")
private String store;
@Schema(description = "数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "18318")
@ExcelProperty("数量")
private Integer count;
@Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "随便")
@ExcelProperty("备注")
private String remark;
@Schema(description = "轮廊数据,Json 串", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("轮廊数据,Json 串")
private String outLineJson;
@Schema(description = "创建日期", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("创建日期")
private LocalDateTime createTime;
}
@@ -1,101 +0,0 @@
package com.cf.imes.module.manage.controller.admin.plate.vo.remain;
import com.cf.imes.framework.common.validation.NumberValid;
import com.cf.imes.module.manage.validation.common.ValidCommonStatus;
import com.cf.imes.module.manage.validation.placeStyle.ValidPlaceStyle;
import com.cf.imes.module.manage.validation.type.ValidTypeField;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.math.BigDecimal;
@Schema(description = "管理后台 - 生产单余料板表 Request VO")
@Data
public class RemainPlateSaveReqVO {
@Schema(description = "余料板 ID")
private Long id;
@Schema(description = "组织id", example = "1")
private Long organId;
@Schema(description = "排单 ID")
private Long planId;
@Schema(description = "初始排单 ID")
private Long initPlanId;
@Schema(description = "余料板状态,0未使用,1已使用", example = "1")
@ValidCommonStatus
private Integer status;
@Schema(description = "是否为开料添加,0否,1是", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "是否为开料添加,0否,1是")
private Boolean isCutting;
@Schema(description = "使用类型,0核销,1排单,2补板", example = "1")
@ValidTypeField
private Integer useType;
@Schema(description = "商品 ID", example = "7425")
@Size(max = 32, message = "商品ID长度不能超过32个字符")
private String goodsId;
@Schema(description = "商品名", example = "晨丰")
@Size(max = 255, message = "商品名长度不能超过255个字符")
private String name;
@Schema(description = "材料", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "材料不能为空")
@Size(max = 50, message = "材料长度不能超过50个字符")
private String material;
@Schema(description = "颜色", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "颜色不能为空")
@Size(max = 50, message = "颜色长度不能超过50个字符")
private String color;
@Schema(description = "纹理 有 无", requiredMode = Schema.RequiredMode.REQUIRED)
private Boolean texture;
@Schema(description = "宽度", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "宽度不能为空")
@NumberValid(name = "宽度")
private BigDecimal width;
@Schema(description = "长度", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "长度不能为空")
@NumberValid(name = "长度")
private BigDecimal length;
@Schema(description = "厚度", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "厚度不能为空")
@NumberValid(name = "厚度")
private BigDecimal thickness;
@Schema(description = "品牌")
@Size(max = 50, message = "品牌长度不能超过50个字符")
private String brand;
@Schema(description = "放置样式,0正面,1正面右转,2正面后转,3正面左转,4反面,5反面右转,6反面后转,7反面左转", example = "0")
@ValidPlaceStyle
private Integer placeStyle;
@Schema(description = "仓库名")
@Size(max = 64, message = "仓库名长度不能超过64个字符")
private String store;
@Schema(description = "数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "18318")
@NotNull(message = "数量不能为空")
private Integer count;
@Schema(description = "备注", example = "随便")
@Size(max = 255, message = "备注长度不能超过255个字符")
private String remark;
@Schema(description = "轮廊数据,Json 串", requiredMode = Schema.RequiredMode.REQUIRED, example = "18318")
private String outLineJson;
}
@@ -1,67 +0,0 @@
package com.cf.imes.module.manage.controller.admin.plate.vo.remain;
import com.cf.imes.framework.common.validation.NumberValid;
import com.cf.imes.module.manage.validation.placeStyle.ValidPlaceStyle;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.math.BigDecimal;
/**
* 余料修改字段
*/
@Schema(description = "管理后台 - 余料修改字段 VO")
@Data
public class RemainPlateUpSaveVO {
@Schema(description = "宽度", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "宽度不能为空")
@NumberValid(name = "宽度")
private BigDecimal width;
@Schema(description = "长度", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "长度不能为空")
@NumberValid(name = "长度")
private BigDecimal length;
@Schema(description = "厚度", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "厚度不能为空")
@NumberValid(name = "厚度")
private BigDecimal thickness;
@Schema(description = "纹理 有 无", requiredMode = Schema.RequiredMode.REQUIRED)
private Boolean texture;
@Schema(description = "材料", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "材料不能为空")
@Size(max = 50, message = "材料长度不能超过50个字符")
private String material;
@Schema(description = "颜色", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "颜色不能为空")
@Size(max = 50, message = "颜色长度不能超过50个字符")
private String color;
@Schema(description = "品牌")
@Size(max = 50, message = "品牌长度不能超过50个字符")
private String brand;
@Schema(description = "仓库名")
@Size(max = 64, message = "品牌长度不能超过64个字符")
private String store;
@Schema(description = "备注", example = "随便")
@Size(max = 255, message = "品牌长度不能超过255个字符")
private String remark;
@Schema(description = "放置样式", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "余料放置样式不可为空")
@ValidPlaceStyle
private Integer placeStyle;
@Schema(description = "轮廊数据,Json 串", requiredMode = Schema.RequiredMode.REQUIRED)
private String outLineJson;
}
@@ -1,27 +0,0 @@
package com.cf.imes.module.manage.controller.admin.plate.vo.remain;
import com.cf.imes.module.manage.validation.common.ValidCommonStatus;
import com.cf.imes.module.manage.validation.type.ValidTypeField;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.util.Set;
@Schema(description = "管理后台 - 生产单余料板表 order_remain_plate_{N} Response VO")
@Data
public class RemainPlateUptReqVO {
@Schema(description = "余料板集", example = "16470")
private Set<Long> ids;
@Schema(description = "余料板状态,0未使用,1使用中", example = "1")
@ValidCommonStatus
private Integer status;
@Schema(description = "使用类型,1核销,2排单,3补板", example = "0")
@ValidTypeField
private Integer useType;
@Schema(description = "排单 ID", example = "6628")
private Long planId;
}
@@ -1,108 +0,0 @@
package com.cf.imes.module.manage.controller.admin.process;
import com.cf.imes.framework.common.pojo.CommonResult;
import com.cf.imes.framework.common.pojo.PageResult;
import com.cf.imes.module.manage.controller.admin.process.vo.*;
import com.cf.imes.module.manage.controller.admin.query.vo.productionStatus.OrderModuleVO;
import com.cf.imes.module.manage.controller.admin.query.vo.productionStatus.OrderPlateRespVO;
import com.cf.imes.module.manage.controller.admin.query.vo.productionStatus.PlatePageVO;
import com.cf.imes.module.manage.service.process.ProductionProcessService;
import com.cf.imes.module.manage.service.query.ProductionStatusService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.validation.Valid;
import java.util.List;
import static com.cf.imes.framework.common.pojo.CommonResult.success;
@Tag(name = "管理后台 - 生产单工序")
@RestController
@RequestMapping("/manage/process")
@Validated
public class ProductionProcessController {
@Resource
private ProductionProcessService productionProcessService;
@Resource
private ProductionStatusService productionStatusService;
@GetMapping("/page")
@Operation(summary = "查看生产工序分页")
@PreAuthorize("@ss.hasPermission('product:process:query')")
public CommonResult<PageResult<ProcessRespVO>> getUserPage(@Valid ProcessPageReqVO pageReqVO) {
return success(productionProcessService.getProcessPage(pageReqVO));
}
@PutMapping("/update")
@Operation(summary = "修改生产工序明细和步骤表的状态")
@PreAuthorize("@ss.hasPermission('product:process:work')")
public CommonResult<Boolean> updateProcessStatus(@Valid @RequestBody OrderProcessStepItemVO reqVo){
productionProcessService.updateProcessStatus(reqVo);
return success(true);
}
@GetMapping("/selectPlate")
@Operation(summary = "查看当前生产单的工序对应的板件信息")
@PreAuthorize("@ss.hasPermission('product:process:view')")
public CommonResult<OrderPlateReqVO> selectPlate(@Valid ProcessPlateReqVO reqVO){
return success(productionProcessService.selectPlate(reqVO));
}
// @GetMapping("/selectBodyName")
// @Operation(summary = "查询生产单对应的柜体名称")
public CommonResult<List<OrderBodyRespVo>> selectBodyName(@Valid OrderBodyReqVO reqVO){
return success(productionProcessService.selectBodyName(reqVO));
}
// @GetMapping("/selectPlateName")
// @Operation(summary = "查看板材信息的组合名称")
// @Parameter(name = "stepItemId", description = "工序明细ID", required = true, example = "1")
// @PreAuthorize("@ss.hasPermission('manage:process:query')")
public CommonResult<List<OrderModuleVO>> selectPlateName(@Valid @RequestParam("stepItemId") Long stepItemId){
return success(productionProcessService.selectPlateName(stepItemId));
}
//
// @GetMapping("/pagePlate")
// @Operation(summary = "查看板材信息分页")
// @PreAuthorize("@ss.hasPermission('manage:process:query')")
public CommonResult<PageResult<OrderPlateRespVO>> queryPlate(@Valid PlatePageVO pageReqVO){
return success(productionStatusService.getOrderPlatePage(pageReqVO));
}
}
@@ -1,23 +0,0 @@
package com.cf.imes.module.manage.controller.admin.process.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.ToString;
@Schema(description = "管理后台 - 查询柜体信息")
@Data
@ToString(callSuper = true)
public class OrderBodyReqVO {
@Schema(description = "工序类型",requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Long processType;
@Schema(description = "生产单号",requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Long orderId;
}
@@ -1,19 +0,0 @@
package com.cf.imes.module.manage.controller.admin.process.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Schema(description = "管理后台 - 查看订单柜体信息 Response VO")
@Data
public class OrderBodyRespVo {
@Schema(description = "柜体ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Long id;
@Schema(description = "柜体名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "9822")
private String name;
}
@@ -1,35 +0,0 @@
package com.cf.imes.module.manage.controller.admin.process.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
@Schema(description = "管理后台 - 查询生产单对应的板件信息 Response VO")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class OrderPlateReqVO {
// @Schema(description = "柜体名称")
// private List<String> bodyName;
//
//
// @Schema(description = "柜体ID")
// private List<Long> bodyIds;
@Schema(description = "柜体ID和名称")
List<OrderBodyRespVo> orderBodyRespVoList;
@Schema(description = "板件信息")
List<PlateDetails> plateDetails;
}
@@ -1,24 +0,0 @@
package com.cf.imes.module.manage.controller.admin.process.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.ToString;
@Schema(description = "管理后台 - 修改生产步骤表 ")
@Data
@ToString(callSuper = true)
public class OrderProStepReqVO {
@Schema(description = "工序步骤id", requiredMode = Schema.RequiredMode.REQUIRED)
private Long processStepId;
@Schema(description = "生产单工序ID", requiredMode = Schema.RequiredMode.REQUIRED)
private Long orderProcessId;
@Schema(description = "生产单号", requiredMode = Schema.RequiredMode.REQUIRED)
private Long orderId;
}
@@ -1,24 +0,0 @@
package com.cf.imes.module.manage.controller.admin.process.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.ToString;
@Schema(description = "管理后台 - 生产单工序明细表 Request VO")
@Data
@ToString(callSuper = true)
public class OrderProcessReqVO {
@Schema(description = "工序步骤ID", requiredMode = Schema.RequiredMode.REQUIRED,example = "12")
private Long processStepId;
@Schema(description = "工序状态",requiredMode = Schema.RequiredMode.REQUIRED, example = "false")
private Boolean status;
@Schema(description = "生产单工序ID",requiredMode = Schema.RequiredMode.REQUIRED, example = "1234")
private Long orderProcessId;
}
@@ -1,34 +0,0 @@
package com.cf.imes.module.manage.controller.admin.process.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Schema(description = "管理后台 Response VO")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class OrderProcessStepItemVO {
// @Schema(description = "生产单工序明细ID", requiredMode = Schema.RequiredMode.REQUIRED,example = "11")
// private Long processStepItemId;
@Schema(description = "生产单工序步骤ID", requiredMode = Schema.RequiredMode.REQUIRED,example = "11")
private Long processStepId;
@Schema(description = "商品ID", requiredMode = Schema.RequiredMode.REQUIRED,example = "ABCD")
private Long goodsId;
@Schema(description = "加工项名称", requiredMode = Schema.RequiredMode.REQUIRED,example = "ABCD")
private String name;
}
@@ -1,28 +0,0 @@
package com.cf.imes.module.manage.controller.admin.process.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Data
public class PlateDetails {
@Schema(description = "板编号")
private Long plateId;
@Schema(description = "自定义板编号-板号")
private Long plateNo;
@Schema(description = "")
private Long length;
@Schema(description = "")
private Long width;
@Schema(description = "")
private Long thickness;
}
@@ -1,41 +0,0 @@
package com.cf.imes.module.manage.controller.admin.process.vo;
import com.cf.imes.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@Schema(description = "管理后台 - 生产单表 分页 Request VO ")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ProcessPageReqVO extends PageParam {
@Schema(description = "工序 id", requiredMode = Schema.RequiredMode.REQUIRED,example = "11")
private Long processID;
@Schema(description = "加工状态",requiredMode = Schema.RequiredMode.REQUIRED, example = "false")
private Boolean processStatus;
// @Schema(description = "工序类型",requiredMode = Schema.RequiredMode.REQUIRED, example = "false")
// private Long type;
@Schema(description = "生产单号")
private Long orderId;
@Schema(description = "自定义单号")
private String customOrderNo;
@Schema(description = "客户")
private String customer;
@Schema(description = "地址")
private String address;
}
@@ -1,39 +0,0 @@
package com.cf.imes.module.manage.controller.admin.process.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.ToString;
@Schema(description = "管理后台 - 查询板件")
@Data
@ToString(callSuper = true)
public class ProcessPlateReqVO {
@Schema(description = "工序类型",requiredMode = Schema.RequiredMode.REQUIRED)
private Long processType;
@Schema(description = "生产单号",requiredMode = Schema.RequiredMode.REQUIRED)
private Long orderId;
// @Schema(description = "工序明细ID",requiredMode = Schema.RequiredMode.REQUIRED)
// private Long stepItemId;
@Schema(description = "生产单工序步骤ID", requiredMode = Schema.RequiredMode.REQUIRED,example = "11")
private Long processStepId;
@Schema(description = "加工项名称", requiredMode = Schema.RequiredMode.REQUIRED,example = "ABCD")
private String name;
@Schema(description = "柜体ID")
private Long bodyId;
}
@@ -1,100 +0,0 @@
package com.cf.imes.module.manage.controller.admin.process.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
@Schema(description = "管理后台 - 生产单表 order_{N} Response VO")
@Data
public class ProcessRespVO {
@Schema(description = "主键-生产单号", requiredMode = Schema.RequiredMode.REQUIRED, example = "11")
private Long orderId;
@Schema(description = "自定义单号", requiredMode = Schema.RequiredMode.REQUIRED,example = "ABCD")
private String customOrderNo;
@Schema(description = "经销商", requiredMode = Schema.RequiredMode.REQUIRED,example = "ABCD")
private String dealer;
@Schema(description = "交付日期", requiredMode = Schema.RequiredMode.REQUIRED,example = "ABCD")
private LocalDateTime deliveryDate;
@Schema(description = "订单状态", requiredMode = Schema.RequiredMode.REQUIRED,example = "0")
private Long status;
@Schema(description = "客户", requiredMode = Schema.RequiredMode.REQUIRED,example = "张三")
private String customer;
@Schema(description = "客户地址", requiredMode = Schema.RequiredMode.REQUIRED,example = "AABB")
private String address;
@Schema(description = "客户电话", requiredMode = Schema.RequiredMode.REQUIRED,example = "ABCD")
private String phoneNumber;
@Schema(description = "商品ID", requiredMode = Schema.RequiredMode.REQUIRED,example = "ABCD")
private Long goodsId;
@Schema(description = "工序ID", requiredMode = Schema.RequiredMode.REQUIRED,example = "ABCD")
private Long processID;
@Schema(description = "生产单工序步骤ID", requiredMode = Schema.RequiredMode.REQUIRED,example = "123")
private Long processStepId;
// @Schema(description = "生产单工序明细ID", requiredMode = Schema.RequiredMode.REQUIRED,example = "123")
// private Long processStepItemId;
@Schema(description = "工序类型", requiredMode = Schema.RequiredMode.REQUIRED,example = "123")
private Long processType;
@Schema(description = "加工项名称", requiredMode = Schema.RequiredMode.REQUIRED,example = "ABCD")
private String name;
@Schema(description = "工序名称", requiredMode = Schema.RequiredMode.REQUIRED,example = "ABCD")
private String stepName;
@Schema(description = "加工人", requiredMode = Schema.RequiredMode.REQUIRED,example = "ABCD")
private String manager;
@Schema(description = "加工状态", requiredMode = Schema.RequiredMode.REQUIRED,example = "ABCD")
private Boolean processStatus;
@Schema(description = "业务员", requiredMode = Schema.RequiredMode.REQUIRED,example = "ABCD")
private String salesman;
@Schema(description = "拆单员", requiredMode = Schema.RequiredMode.REQUIRED,example = "ABCD")
private String splitter;
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime createTime;
@Schema(description = "已打包数", requiredMode = Schema.RequiredMode.REQUIRED)
private Long packCount;
@Schema(description = "已打包片数", requiredMode = Schema.RequiredMode.REQUIRED)
private Long packPieceCount;
@Schema(description = "总片数", requiredMode = Schema.RequiredMode.REQUIRED)
private Long totalPieceCount;
}
@@ -1,30 +0,0 @@
package com.cf.imes.module.manage.controller.admin.process.vo;
import lombok.Data;
import java.util.List;
@Data
public class ProcessStepStatus {
// 生产单号
private Long orderId;
// 工序步骤表的状态
private Boolean processStepStatus;
// 工序明细表的状态
private Boolean processStepItemStatus;
// 工序ID
private Long processId;
// 工序步骤表的类型
private Integer type;
// 柜体id
private List<Long> bodyId;
}
@@ -1,21 +0,0 @@
package com.cf.imes.module.manage.controller.admin.process.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.ToString;
@Schema(description = "更改状态")
@Data
@ToString(callSuper = true)
public class ProcessStepVo {
@Schema(description = "步骤ID", requiredMode = Schema.RequiredMode.REQUIRED,example = "3344")
private Long id;
@Schema(description = "订单状态",requiredMode = Schema.RequiredMode.REQUIRED)
private Boolean Status;
}
@@ -1,61 +0,0 @@
package com.cf.imes.module.manage.controller.admin.process.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Schema(description = "管理后台 - 工序信息表 Response VO")
@Data
public class UserProcessRespVO {
@Schema(description = "主键-工序ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "11")
private Long id;
@Schema(description = "组织ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "11")
private Long organId;
@Schema(description = "工序名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "11")
private String name;
@Schema(description = "计件工资", requiredMode = Schema.RequiredMode.REQUIRED, example = "11")
private Double pieceRate;
@Schema(description = "计件类型:1 数量 2 长度 3 平方 4 宽 5 高 6 体积 7 生产单金额百分比", requiredMode = Schema.RequiredMode.REQUIRED, example = "11")
private Long pieceType;
@Schema(description = "工序类型:0 全部加工 1 开料 2 部件加工 3 异形封边 4 分堆 5 打包 6 出库 7 组件加工 8 板材", requiredMode = Schema.RequiredMode.REQUIRED, example = "11")
private Long type;
@Schema(description = "是否推送终端客户:0 否 1 是", requiredMode = Schema.RequiredMode.REQUIRED, example = "11")
private Boolean isCustom;
@Schema(description = "是否推送经销商:0 否 1 是", requiredMode = Schema.RequiredMode.REQUIRED, example = "11")
private Boolean isDealer;
@Schema(description = "排序优先级", requiredMode = Schema.RequiredMode.REQUIRED, example = "11")
private Long sort;
@Schema(description = "小时产量", requiredMode = Schema.RequiredMode.REQUIRED, example = "11")
private Double hourCapacity;
@Schema(description = "单位", requiredMode = Schema.RequiredMode.REQUIRED, example = "11")
private String unit;
@Schema(description = "是否启用:0 否 1 是", requiredMode = Schema.RequiredMode.REQUIRED, example = "11")
private Boolean isEnabled;
@Schema(description = "准备时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "11")
private String prepareTime;
@Schema(description = "描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "11")
private String description;
}
@@ -1,159 +0,0 @@
package com.cf.imes.module.manage.controller.admin.query;
import com.cf.imes.framework.common.pojo.CommonResult;
import com.cf.imes.framework.common.pojo.PageResult;
import com.cf.imes.framework.common.util.object.BeanUtils;
import com.cf.imes.module.manage.controller.admin.process.vo.ProcessRespVO;
import com.cf.imes.module.manage.controller.admin.query.vo.pack.OrderPackageVO;
import com.cf.imes.module.manage.controller.admin.query.vo.pack.PrintOrderRespVO;
import com.cf.imes.module.manage.controller.admin.query.vo.productionStatus.*;
import com.cf.imes.module.manage.controller.admin.query.vo.salary.PriceRatePageReqVO;
import com.cf.imes.module.manage.controller.admin.query.vo.salary.PriceRateReqVO;
import com.cf.imes.module.manage.dal.dataobject.process.OrderDO;
import com.cf.imes.module.manage.service.query.ProductionStatusService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import javax.validation.Valid;
import java.util.List;
import static com.cf.imes.framework.common.pojo.CommonResult.success;
@Tag(name = "管理后台 - 生产查询")
@RestController
@RequestMapping("/manage/query")
@Validated
public class ProductionStatusController {
@Resource
private ProductionStatusService productionStatusService;
// @GetMapping("/page")
// @Operation(summary = "生产状态查询分页")
// @PreAuthorize("@ss.hasPermission('manage:query:query')")
public CommonResult<PageResult<ProcessRespVO>> pageProductionStatus(@Valid OrderPlatePageReqVO pageReqVO){
PageResult<OrderDO> pageResult = productionStatusService.getProductionPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, ProcessRespVO.class));
}
@GetMapping("/select")
@Operation(summary = "查看生产单下的工序组工序")
@Parameter(name = "orderNo", description = "生产单Id", required = true)
@PreAuthorize("@ss.hasPermission('production:manager-list:processStatus')")
public CommonResult<List<ProductionGroupVO>> selectProduction(@Valid @RequestParam("orderNo") Long orderNo){
List<ProductionGroupVO> orderProcessById = productionStatusService.selectProduction(orderNo);
return CommonResult.success(orderProcessById);
}
// @GetMapping("/selectPlateName")
// @Operation(summary = "查看板材信息的组合名称")
// @PreAuthorize("@ss.hasPermission('manage:query:query')")
public CommonResult<List<OrderModuleVO>> selectPlateName(@Valid OrderModuleReqVO reqVO){
return success(productionStatusService.selectPlateName(reqVO));
}
// @GetMapping("/pagePlate")
// @Operation(summary = "查看板材信息分页")
// @PreAuthorize("@ss.hasPermission('manage:query:query')")
public CommonResult<PageResult<OrderPlateRespVO>> queryPlate(@Valid PlatePageVO pageReqVO){
return success(productionStatusService.getOrderPlatePage(pageReqVO));
}
@GetMapping("/pageSalary")
@Operation(summary = "计件工资分页查询")
@PreAuthorize("@ss.hasPermission('manage:query:pageSalary')")
public CommonResult<PageResult<PriceRateReqVO>> StepSalary(@Valid PriceRatePageReqVO pageReqVO){
PageResult<PriceRateReqVO> salaryPage = productionStatusService.getSalaryPage(pageReqVO);
return CommonResult.success(salaryPage);
}
// @GetMapping("/pagePackage")
// @Operation(summary = "打包查询分页")
// @PreAuthorize("@ss.hasPermission('manage:query:query')")
public CommonResult<PageResult<ProcessRespVO>> queryPackage(@Valid OrderPlatePageReqVO pageReqVO){
PageResult<OrderDO> pageResult = productionStatusService.queryPackage(pageReqVO);
return success(BeanUtils.toBean(pageResult, ProcessRespVO.class));
}
// @GetMapping("/queryPackageList")
// @Operation(summary = "生产单打包完成包裹查看")
// @Parameter(name = "orderNo", description = "生产单Id", required = true)
// @PreAuthorize("@ss.hasPermission('manage:query:queryPackageList')")
public CommonResult<List<OrderPackageVO>> queryPackageList(@Valid @RequestParam("orderNo") Long orderNo){
List<OrderPackageVO> orderProcessById = productionStatusService.getPackageList(orderNo);
return CommonResult.success(orderProcessById);
}
@GetMapping("/printOrder")
@Operation(summary = "打印订单")
@Parameter(name = "orderNo", description = "生产单Id", required = true)
@PreAuthorize("@ss.hasPermission('manage:query:export')")
public CommonResult<PrintOrderRespVO> printOrder(@Valid @RequestParam("orderNo") Long orderNo){
return CommonResult.success(productionStatusService.printOrder(orderNo));
}
}
@@ -1,23 +0,0 @@
package com.cf.imes.module.manage.controller.admin.query.vo.pack;
import com.cf.imes.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@Schema(description = "管理后台 - 查看包裹详情分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class OrderPackagePageReqVO extends PageParam {
@Schema(description = "包裹Id")
private Long packageNo;
/* @Schema(description = "包裹类型")
private Integer type;*/
}
@@ -1,64 +0,0 @@
package com.cf.imes.module.manage.controller.admin.query.vo.pack;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
@Schema(description = "管理后台 - 生产单包裹表 Response VO")
@Data
public class OrderPackageVO {
@Schema(description = "主键-包裹ID", requiredMode = Schema.RequiredMode.REQUIRED)
private Long id;
@Schema(description = "生产单号", requiredMode = Schema.RequiredMode.REQUIRED)
private Long orderId;
@Schema(description = "自定义单号")
private String customOrderNo;
@Schema(description = "客户")
private String customer;
@Schema(description = "客户地址")
private String address;
@Schema(description = "经销商")
private String dealer;
@Schema(description = "包裹编号", requiredMode = Schema.RequiredMode.REQUIRED)
private String packageNo;
@Schema(description = "包裹类型", requiredMode = Schema.RequiredMode.REQUIRED)
private Long type;
@Schema(description = "包裹状态", requiredMode = Schema.RequiredMode.REQUIRED)
private Long status;
@Schema(description = "组织ID", requiredMode = Schema.RequiredMode.REQUIRED)
private Long organId;
@Schema(description = "创建人", requiredMode = Schema.RequiredMode.REQUIRED)
private String creator;
@Schema(description = "包裹备注", requiredMode = Schema.RequiredMode.REQUIRED)
private String packRemark;
@Schema(description = "生产单备注", requiredMode = Schema.RequiredMode.REQUIRED)
private String orderRemark;
@Schema(description = "出库人", requiredMode = Schema.RequiredMode.REQUIRED)
private String updater;
@Schema(description = "出库时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime updateTime;
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
private LocalDateTime createTime;
}
@@ -1,127 +0,0 @@
package com.cf.imes.module.manage.controller.admin.query.vo.pack;
import com.cf.imes.module.manage.controller.admin.pack.vo.GroupNameList;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.util.List;
@Schema(description = "管理后台 - 包裹详情 Response VO")
@Data
public class PackageDetailsRespVO {
@Schema(description = "生产单ID", requiredMode = Schema.RequiredMode.REQUIRED)
private String orderId;
@Schema(description = "房间名称-板材类型显示", requiredMode = Schema.RequiredMode.REQUIRED)
private String roomName;
@Schema(description = "柜体名称", requiredMode = Schema.RequiredMode.REQUIRED)
private String cabinetName;
@Schema(description = "板材ID", requiredMode = Schema.RequiredMode.REQUIRED)
private Long plateId;
@Schema(description = "板编号", requiredMode = Schema.RequiredMode.REQUIRED)
private String plateNo;
@Schema(description = "板名称", requiredMode = Schema.RequiredMode.REQUIRED)
private String plateName;
@Schema(description = "材料", requiredMode = Schema.RequiredMode.REQUIRED)
private String material;
@Schema(description = "颜色", requiredMode = Schema.RequiredMode.REQUIRED)
private String color;
@Schema(description = "宽度", requiredMode = Schema.RequiredMode.REQUIRED)
private Double width;
@Schema(description = "长度", requiredMode = Schema.RequiredMode.REQUIRED)
private Double height;
@Schema(description = "厚度", requiredMode = Schema.RequiredMode.REQUIRED)
private Double thickness;
@Schema(description = "面积", requiredMode = Schema.RequiredMode.REQUIRED)
private Double area;
@Schema(description = "纹路", requiredMode = Schema.RequiredMode.REQUIRED)
private String texture;
@Schema(description = "是否异型", requiredMode = Schema.RequiredMode.REQUIRED)
private Boolean specialShaped;
@Schema(description = "是否造型", requiredMode = Schema.RequiredMode.REQUIRED)
private Boolean profiling;
@Schema(description = "是否有孔", requiredMode = Schema.RequiredMode.REQUIRED)
private Boolean rowHole;
@Schema(description = "加工组", requiredMode = Schema.RequiredMode.REQUIRED)
private String processGroup;
@Schema(description = "备注(板材和配件都要传递)", requiredMode = Schema.RequiredMode.REQUIRED)
private String remark;
@Schema(description = "加工组名称集合")
private List<GroupNameList> processGroupNameList;
@Schema(description = "配件名称-配件类型显示", requiredMode = Schema.RequiredMode.REQUIRED)
private String name;
@Schema(description = "配件ID", requiredMode = Schema.RequiredMode.REQUIRED)
private Long partsId;
@Schema(description = "型号", requiredMode = Schema.RequiredMode.REQUIRED)
private String model;
@Schema(description = "规格", requiredMode = Schema.RequiredMode.REQUIRED)
private String spec;
@Schema(description = "明细配件类型, 2 五金/配件 3 其他 4 报价配件", requiredMode = Schema.RequiredMode.REQUIRED)
private String type;
@Schema(description = "数量", requiredMode = Schema.RequiredMode.REQUIRED)
private Long num;
@Schema(description = "单位", requiredMode = Schema.RequiredMode.REQUIRED)
private String unit;
@Schema(description = "是否复合部件:0 否 1 是", requiredMode = Schema.RequiredMode.REQUIRED)
private Boolean isComposite;
@Schema(description = "品牌", requiredMode = Schema.RequiredMode.REQUIRED)
private String brand;
@Schema(description = "厂家", requiredMode = Schema.RequiredMode.REQUIRED)
private String factory;
@Schema(description = "配件颜色", requiredMode = Schema.RequiredMode.REQUIRED)
private String partsColor;
@Schema(description = "配件宽度", requiredMode = Schema.RequiredMode.REQUIRED)
private Double partsWidth;
@Schema(description = "配件长度", requiredMode = Schema.RequiredMode.REQUIRED)
private Double partsLength;
@Schema(description = "配件厚度", requiredMode = Schema.RequiredMode.REQUIRED)
private Double partsThickness;
@Schema(description = "配件主类:1封边2五金3组件", requiredMode = Schema.RequiredMode.REQUIRED)
private String category;
@Schema(description = "子配件ID列表,复合部件时记录子配件ID,半角逗号分隔", requiredMode = Schema.RequiredMode.REQUIRED)
private String subparts;
}
@@ -1,35 +0,0 @@
package com.cf.imes.module.manage.controller.admin.query.vo.pack;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Schema(description = "管理后台 - 打印订单 Response VO")
@Data
public class PrintOrderRespVO {
@Schema(description = "订单号", requiredMode = Schema.RequiredMode.REQUIRED)
private Long orderNo;
@Schema(description = "自定义单号", requiredMode = Schema.RequiredMode.REQUIRED)
private String customOrderNo;
@Schema(description = "经销商", requiredMode = Schema.RequiredMode.REQUIRED)
private String dealer;
@Schema(description = "收货地址", requiredMode = Schema.RequiredMode.REQUIRED)
private String address;
@Schema(description = "客户", requiredMode = Schema.RequiredMode.REQUIRED)
private String customer;
@Schema(description = "客户手机号", requiredMode = Schema.RequiredMode.REQUIRED)
private String customerPhone;
@Schema(description = "包裹数量", requiredMode = Schema.RequiredMode.REQUIRED)
private Integer packageQuantity;
}
@@ -1,19 +0,0 @@
package com.cf.imes.module.manage.controller.admin.query.vo.productionStatus;
import com.cf.imes.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.ToString;
@Schema(description = "管理后台 - 生产单模块表 Request VO")
@Data
@ToString(callSuper = true)
public class OrderModuleReqVO extends PageParam {
@Schema(description = "生产单号", requiredMode = Schema.RequiredMode.REQUIRED, example = "9822")
private Long orderNo;
}
@@ -1,27 +0,0 @@
package com.cf.imes.module.manage.controller.admin.query.vo.productionStatus;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Schema(description = "管理后台 - 生产单模块表 order_module_{N} Response VO")
@Data
public class OrderModuleVO {
@Schema(description = "柜体 id", requiredMode = Schema.RequiredMode.REQUIRED, example = "嘿嘿")
private Long bodyId;
@Schema(description = "加工组 id", example = "嘿嘿")
private Long groupId;
@Schema(description = "组合名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "嘿嘿")
private String name;
@Schema(description = "加工组名称", example = "嘿嘿")
private String groupName;
}
@@ -1,47 +0,0 @@
package com.cf.imes.module.manage.controller.admin.query.vo.productionStatus;
import com.cf.imes.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import java.util.List;
@Schema(description = "管理后台 - 生产单表 order_{N} 分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class OrderPlatePageReqVO extends PageParam {
@Schema(description = "生产状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2,3")
private List<Long> statusList;
@Schema(description = "订单号")
private Long orderNo;
@Schema(description = "自定义单号")
private String customOrderNo;
@Schema(description = "客户")
private String customer;
@Schema(description = "地址")
private String address;
@Schema(description = "经销商")
private String dealer;
}
@@ -1,35 +0,0 @@
package com.cf.imes.module.manage.controller.admin.query.vo.productionStatus;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Schema(description = "管理后台 - 板材信息表 Response VO")
@Data
public class OrderPlateRespVO {
@Schema(description = "板编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "9822")
private Long id;
@Schema(description = "板名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
private String name;
@Schema(description = "颜色", requiredMode = Schema.RequiredMode.REQUIRED)
private String color;
@Schema(description = "宽度", requiredMode = Schema.RequiredMode.REQUIRED)
private Double width;
@Schema(description = "高度", requiredMode = Schema.RequiredMode.REQUIRED)
private Double height;
@Schema(description = "厚度", requiredMode = Schema.RequiredMode.REQUIRED)
private Double thickness;
@Schema(description = "材质:颗粒板、欧松板、多层板、生态板、禾香板、密度板、实木、铝蜂窝板、铝塑板", requiredMode = Schema.RequiredMode.REQUIRED)
private String material;
}
@@ -1,24 +0,0 @@
package com.cf.imes.module.manage.controller.admin.query.vo.productionStatus;
import com.cf.imes.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@Schema(description = "管理后台 - 板材信息表分页")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class PlatePageVO extends PageParam {
@Schema(description = "柜体 id",requiredMode = Schema.RequiredMode.REQUIRED)
private Long bodyId ;
@Schema(description = "加工组 id")
private Long groupId;
}
@@ -1,38 +0,0 @@
package com.cf.imes.module.manage.controller.admin.query.vo.productionStatus;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import static com.cf.imes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY;
import static com.cf.imes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = "管理后台 - 生产单工序步骤表 order_process_step_{N} Response VO")
@Data
public class ProductionGroupVO {
@Schema(description = "工序组名", requiredMode = Schema.RequiredMode.REQUIRED, example = "嘿嘿")
private String groupName;
@Schema(description = "工序名", requiredMode = Schema.RequiredMode.REQUIRED, example = "嘿嘿")
private String name;
@Schema(description = "加工状态", requiredMode = Schema.RequiredMode.REQUIRED)
private Boolean status;
@Schema(description = "工序负责人", requiredMode = Schema.RequiredMode.REQUIRED, example = "cfy_cf")
private String manager;
// @Schema(description = "排单号", requiredMode = Schema.RequiredMode.REQUIRED, example = "cfy_cf")
// private String planNo;
@Schema(description = "加工时间", requiredMode = Schema.RequiredMode.REQUIRED)
private String processDate;
}
@@ -1,44 +0,0 @@
package com.cf.imes.module.manage.controller.admin.query.vo.salary;
import com.cf.imes.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import java.util.Date;
import static com.cf.imes.framework.common.util.date.DateUtils.*;
@Schema(description = "管理后台 - 计件工资查询分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class PriceRatePageReqVO extends PageParam {
@Schema(description = "开始时间", requiredMode = Schema.RequiredMode.REQUIRED)
private String startTime;
@Schema(description = "结束时间", requiredMode = Schema.RequiredMode.REQUIRED)
private String endTime;
@Schema(description = "加工人")
private String manager;
@Schema(description = "工序名称")
private String name;
@Schema(description = "显示零单价(默认不显示-false)", requiredMode = Schema.RequiredMode.REQUIRED)
private Boolean noShowZero;
}
@@ -1,35 +0,0 @@
package com.cf.imes.module.manage.controller.admin.query.vo.salary;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Schema(description = "管理后台 - 计件工资查询 Response VO")
@Data
public class PriceRateReqVO {
@Schema(description = "工序ID", requiredMode = Schema.RequiredMode.REQUIRED)
private Long processId;
@Schema(description = "工序名", requiredMode = Schema.RequiredMode.REQUIRED)
private String name;
@Schema(description = "单价", requiredMode = Schema.RequiredMode.REQUIRED)
private Long priceRate;
@Schema(description = "数量", requiredMode = Schema.RequiredMode.REQUIRED)
private Long num;
@Schema(description = "计件类型", requiredMode = Schema.RequiredMode.REQUIRED)
private Integer priceType;
@Schema(description = "金额", requiredMode = Schema.RequiredMode.REQUIRED)
private Double amount;
@Schema(description = "加工人", requiredMode = Schema.RequiredMode.REQUIRED)
private String manager;
}
@@ -1,197 +0,0 @@
package com.cf.imes.module.manage.controller.admin.test;
import java.util.Base64;
import java.io.ByteArrayOutputStream;
import java.util.zip.DataFormatException;
import java.util.zip.Deflater;
import java.util.zip.Inflater;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.util.zip.GZIPInputStream;
import java.util.zip.GZIPOutputStream;
public class JsonUtil {
public static void main(String[] args) throws IOException {
String jsonData = "{\n" +
" \"code\": 0,\n" +
" \"data\": [\n" +
" {\n" +
" \"createTime\": 1717053232000,\n" +
" \"updateTime\": 1717053232000,\n" +
" \"creator\": \"晨丰科技\",\n" +
" \"updater\": \"晨丰科技\",\n" +
" \"deleted\": false,\n" +
" \"id\": 358,\n" +
" \"name\": \"2024年5月30日2\",\n" +
" \"pieceRate\": 0.001,\n" +
" \"pieceType\": 3,\n" +
" \"type\": 1,\n" +
" \"isCustom\": true,\n" +
" \"isDealer\": false,\n" +
" \"sort\": 1000,\n" +
" \"hourCapacity\": 0.001,\n" +
" \"unit\": \"\",\n" +
" \"isEnabled\": true,\n" +
" \"prepareTime\": 0,\n" +
" \"description\": \"2024年5月30日2\",\n" +
" \"organId\": 1\n" +
" },\n" +
" {\n" +
" \"createTime\": 1717053193000,\n" +
" \"updateTime\": 1717053193000,\n" +
" \"creator\": \"晨丰科技\",\n" +
" \"updater\": \"晨丰科技\",\n" +
" \"deleted\": false,\n" +
" \"id\": 357,\n" +
" \"name\": \"2024年5月30日\",\n" +
" \"pieceRate\": 0.001,\n" +
" \"pieceType\": 2,\n" +
" \"type\": 7,\n" +
" \"isCustom\": true,\n" +
" \"isDealer\": false,\n" +
" \"sort\": 1000,\n" +
" \"hourCapacity\": 0.001,\n" +
" \"unit\": \"\",\n" +
" \"isEnabled\": true,\n" +
" \"prepareTime\": 0,\n" +
" \"description\": \"2024年5月30日\",\n" +
" \"organId\": 1\n" +
" }\n" +
" ],\n" +
" \"msg\": \"\"\n" +
"}";
String s = zipString(jsonData);
System.out.println(s.getBytes());
System.out.println(s.length());
System.out.println(jsonData.length());
String compress = compress(jsonData);
System.out.println(compress);
System.out.println(compress.length());
}
/**
* 压缩
*/
public static String zipString(String unzipString) {
/**
* https://www.yiibai.com/javazip/javazip_deflater.html#article-start
* 0 ~ 9 压缩等级 低到高
* public static final int BEST_COMPRESSION = 9; 最佳压缩的压缩级别。
* public static final int BEST_SPEED = 1; 压缩级别最快的压缩。
* public static final int DEFAULT_COMPRESSION = -1; 默认压缩级别。
* public static final int DEFAULT_STRATEGY = 0; 默认压缩策略。
* public static final int DEFLATED = 8; 压缩算法的压缩方法(目前唯一支持的压缩方法)。
* public static final int FILTERED = 1; 压缩策略最适用于大部分数值较小且数据分布随机分布的数据。
* public static final int FULL_FLUSH = 3; 压缩刷新模式,用于清除所有待处理的输出并重置拆卸器。
* public static final int HUFFMAN_ONLY = 2; 仅用于霍夫曼编码的压缩策略。
* public static final int NO_COMPRESSION = 0; 不压缩的压缩级别。
* public static final int NO_FLUSH = 0; 用于实现最佳压缩结果的压缩刷新模式。
* public static final int SYNC_FLUSH = 2; 用于清除所有未决输出的压缩刷新模式; 可能会降低某些压缩算法的压缩率。
*/
//使用指定的压缩级别创建一个新的压缩器。
Deflater deflater = new Deflater(Deflater.BEST_COMPRESSION);
//设置压缩输入数据。
deflater.setInput(unzipString.getBytes());
//当被调用时,表示压缩应该以输入缓冲区的当前内容结束。
deflater.finish();
final byte[] bytes = new byte[256];
ByteArrayOutputStream outputStream = new ByteArrayOutputStream(256);
while (!deflater.finished()) {
//压缩输入数据并用压缩数据填充指定的缓冲区。
int length = deflater.deflate(bytes);
outputStream.write(bytes, 0, length);
}
//关闭压缩器并丢弃任何未处理的输入。
deflater.end();
return Base64.getEncoder().encodeToString(outputStream.toByteArray());
}
/**
* 解压缩
*/
public static String unzipString(String zipString) {
byte[] decode = Base64.getDecoder().decode(zipString);
//创建一个新的解压缩器 https://www.yiibai.com/javazip/javazip_inflater.html
Inflater inflater = new Inflater();
//设置解压缩的输入数据。
inflater.setInput(decode);
final byte[] bytes = new byte[256];
try (ByteArrayOutputStream outputStream = new ByteArrayOutputStream(256)) {
//finished() 如果已到达压缩数据流的末尾,则返回true。
while (!inflater.finished()) {
//将字节解压缩到指定的缓冲区中。
int length = inflater.inflate(bytes);
outputStream.write(bytes, 0, length);
}
return outputStream.toString();
} catch (DataFormatException e) {
e.printStackTrace();
return null;
} catch (IOException e) {
e.printStackTrace();
return null;
} finally {
//关闭解压缩器并丢弃任何未处理的输入。
inflater.end();
}
}
// 使用 GZIP 进行压缩
public static String compress(String str) throws IOException {
if (null == str || str.length() <= 0) {
return str;
}
// 创建一个新的输出流
ByteArrayOutputStream out = new ByteArrayOutputStream();
// 使用默认缓冲区大小创建新的输出流
GZIPOutputStream gzip = new GZIPOutputStream(out);
// 将字节写入此输出流
gzip.write(str.getBytes("utf-8")); // 因为后台默认字符集有可能是GBK字符集,所以此处需指定一个字符集
gzip.close();
// 使用指定的 charsetName,通过解码字节将缓冲区内容转换为字符串
return out.toString("ISO-8859-1");
}
// 解压缩
public static String unCompress(String str) throws IOException {
if (null == str || str.length() <= 0) {
return str;
}
// 创建一个新的输出流
ByteArrayOutputStream out = new ByteArrayOutputStream();
// 创建一个 ByteArrayInputStream,使用 buf 作为其缓冲 区数组
ByteArrayInputStream in = new ByteArrayInputStream(str.getBytes("ISO-8859-1"));
// 使用默认缓冲区大小创建新的输入流
GZIPInputStream gzip = new GZIPInputStream(in);
byte[] buffer = new byte[256];
int n = 0;
// 将未压缩数据读入字节数组
while ((n = gzip.read(buffer)) >= 0) {
out.write(buffer, 0, n);
}
// 使用指定的 charsetName,通过解码字节将缓冲区内容转换为字符串
return out.toString("utf-8");
}
}
@@ -1,180 +0,0 @@
package com.cf.imes.module.manage.controller.admin.test;
import com.cf.imes.module.manage.dal.mysql.test.TestMapper;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.jetbrains.annotations.TestOnly;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import javax.annotation.security.PermitAll;
import javax.sound.sampled.AudioInputStream;
import com.jacob.activeX.ActiveXComponent;
import com.jacob.com.Dispatch;
import com.jacob.com.Variant;
import java.io.*;
import java.util.List;
import java.util.Random;
/**
* @author there
* 测试 controller
*/
@RestController
@RequestMapping("/manage/test")
@Tag(name = "测试")
public class TestController {
@Resource
private TestMapper testMapper;
@GetMapping("/get")
@PermitAll
@Operation(summary = "测试")
public Object get() {
return testMapper.selectList();
}
public class JacobTestController {
/* *
* 语音转文字并播放
*
* @param text
*/
private static void convertTextToSpeech(String text) {
try {
//jacob.dll没成功安装,执行这一步会出错
//构建音频格式 调用注册表应用
Dispatch spAudioFormat = new ActiveXComponent("Sapi.SpAudioFormat").getObject();
//音频文件输出流
Dispatch spFileStream = new ActiveXComponent("Sapi.SpFileStream").getObject();
//构建音频对象
Dispatch spVoice = new ActiveXComponent("Sapi.SpVoice").getObject();
//设置spAudioFormat音频流格式类型22
Dispatch.put(spAudioFormat, "Type", new Variant(22));
//设置spFileStream文件输出流的音频格式
Dispatch.putRef(spFileStream, "Format", spAudioFormat);
//设置spFileStream文件输出流参数地址等
Dispatch.call(spFileStream, "Open", new Variant("E:AAAAA\48641486.wav"), new Variant(3), new Variant(true));
//设置spVoice声音对象的音频输出流为输出文件对象
Dispatch.putRef(spVoice, "AudioOutputStream", spFileStream);
//设置spVoice声音对象的音量大小100
Dispatch.put(spVoice, "Volume", new Variant(100));
//设置spVoice声音对象的速度 0为正常速度,范围【..-2 -1 0 1 2..】
Dispatch.put(spVoice, "Rate", new Variant(0));
//设置spVoice声音对象中的文本内容
Dispatch.call(spVoice, "Speak", new Variant(text));
//关闭spFileStream输出文件
Dispatch.call(spFileStream, "Close");
//释放资源
spVoice.safeRelease();
spAudioFormat.safeRelease();
spFileStream.safeRelease();
} catch (Exception e) {
System.out.println(e.getMessage());
}
}
/* private static XxlJobProperties aabb(){
XxlJobParameter xxlJobParameter = new XxlJobParameter();
xxlJobParameter.setEnabled(false);
xxlJobParameter.setAccessToken("1122");
xxlJobParameter.setAddresses("五阿里乌");
xxlJobParameter.setAppName("aaappn");
XxlJobProperties bean = BeanUtils.toBean(xxlJobParameter, XxlJobProperties.class);
return bean;
}*/
}
public static void deleteFiles(List<String> filePaths) {
// 检查文件路径集合是否为空
if (filePaths == null || filePaths.isEmpty()) {
System.out.println("文件路径集合为空");
return;
}
for (String filePath : filePaths) {
// 检查文件路径是否为空
if (filePath == null || filePath.isEmpty()) {
System.out.println("文件路径为空");
continue;
}
File file = new File(filePath);
// 检查文件是否存在
if (!file.exists()) {
System.out.println("文件不存在:" + filePath);
continue;
}
// 检查是否是文件
if (!file.isFile()) {
System.out.println("路径指向的不是文件:" + filePath);
continue;
}
// 尝试删除文件
if (file.delete()) {
System.out.println("文件删除成功:" + filePath);
} else {
System.out.println("文件删除失败:" + filePath);
}
}
}
public static Integer aacc() {
RedisTemplate<Object, Object> re = new RedisTemplate<>();
int randomInt = new Random(System.currentTimeMillis()).nextInt(900) + 100;// 生成100到999之间的随机数
return randomInt;
}
@TestOnly
public static void main(String[] args) {
// test main
}
}
@@ -1,71 +0,0 @@
package com.cf.imes.module.manage.controller.admin.voice;
import com.cf.imes.framework.common.pojo.CommonResult;
import com.cf.imes.module.manage.controller.admin.voice.vo.VoiceReqVO;
import com.cf.imes.module.manage.service.voice.VoiceService;
import com.jacob.com.Dispatch;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.core.io.ByteArrayResource;
import org.springframework.core.io.InputStreamResource;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.validation.Valid;
import org.springframework.web.bind.annotation.RestController;
import java.io.ByteArrayInputStream;
import java.sql.Blob;
@Tag(name = "管理后台 - 语音播报")
@RestController
@RequestMapping("/manage/voice")
@Validated
public class VoiceController {
@Resource
private VoiceService voiceService;
@PostMapping()
@Operation(summary = "语音播报")
@PreAuthorize("@ss.hasPermission('manage:voice:insert')")
public CommonResult<ResponseEntity<byte[]>> voiceAnnouncements(@Valid @RequestBody VoiceReqVO reqVO ) throws Exception {
String sourceFile = voiceService.voiceAnnouncements(reqVO.getData());
ResponseEntity<byte[]> voice = voiceService.getVoice(sourceFile);
// 删除生成的 mp3 文件
voiceService.deleteFiles(sourceFile);
return CommonResult.success(voice);
// String gzipFile = sourceFile+".zip";
//
// // 压缩语音文件
// voiceService.zipFiles(sourceFile, gzipFile);
//
}
}
@@ -1,20 +0,0 @@
package com.cf.imes.module.manage.controller.admin.voice.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import java.util.List;
@Schema(description = "管理后台 - 语音播报 Request VO")
@Data
@ToString(callSuper = true)
public class VoiceReqVO {
@Schema(description = "语音数据", requiredMode = Schema.RequiredMode.REQUIRED)
private String data;
}

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