合并 mes 代码
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
FROM openjdk:17-jre-slim
|
||||
FROM 172.16.46.66:10043/base-service/eclipse-temurin:21-jre
|
||||
|
||||
# 设置应用目录
|
||||
WORKDIR /app
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>cn.iocoder.cloud</groupId>
|
||||
<artifactId>yudao</artifactId>
|
||||
<artifactId>dsc-mes</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
@@ -27,7 +27,7 @@
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.cloud</groupId>
|
||||
<artifactId>yudao-module-indicator</artifactId>
|
||||
<artifactId>yudao-module-indicator-server</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
||||
@@ -2,6 +2,7 @@ package cn.iocoder.yudao.mes;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
|
||||
/**
|
||||
* Mes 服务器的启动类
|
||||
@@ -9,6 +10,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
* @author ZT
|
||||
*/
|
||||
@SuppressWarnings("SpringComponentScan") // 忽略 IDEA 无法识别 ${yudao.info.base-package}
|
||||
@EnableFeignClients(basePackages = {"${yudao.info.base-package}.mes", "${yudao.info.base-package}.module"})
|
||||
@SpringBootApplication(scanBasePackages = {"${yudao.info.base-package}.mes", "${yudao.info.base-package}.module"},
|
||||
excludeName = {})
|
||||
public class MesServerApplication {
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
package cn.iocoder.yudao.mes.controller.mes;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
/**
|
||||
|
||||
@@ -104,7 +104,7 @@ xxl:
|
||||
yudao:
|
||||
info:
|
||||
version: 1.0.0
|
||||
base-package: cn.iocoder.yudao.module
|
||||
base-package: cn.iocoder.yudao
|
||||
web:
|
||||
admin-ui:
|
||||
url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
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">
|
||||
<parent>
|
||||
<artifactId>yudao</artifactId>
|
||||
<artifactId>dsc-mes</artifactId>
|
||||
<groupId>cn.iocoder.cloud</groupId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
|
||||
@@ -5,7 +5,7 @@ import cn.iocoder.yudao.framework.common.exception.ErrorCode;
|
||||
/**
|
||||
* energy 错误码枚举类
|
||||
*
|
||||
* energy 系统,使用 1-xxx-xxx-xxx 段
|
||||
* 1-030-000-000 ~ 1-030-199-999
|
||||
*
|
||||
* @author ZT
|
||||
*/
|
||||
|
||||
@@ -131,21 +131,21 @@
|
||||
<build>
|
||||
<!-- 设置构建的 jar 包名 -->
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<!-- 打包 -->
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>${spring.boot.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal> <!-- 将引入的 jar 打入其中 -->
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<!-- <plugins>-->
|
||||
<!-- <!– 打包 –>-->
|
||||
<!-- <plugin>-->
|
||||
<!-- <groupId>org.springframework.boot</groupId>-->
|
||||
<!-- <artifactId>spring-boot-maven-plugin</artifactId>-->
|
||||
<!-- <version>${spring.boot.version}</version>-->
|
||||
<!-- <executions>-->
|
||||
<!-- <execution>-->
|
||||
<!-- <goals>-->
|
||||
<!-- <goal>repackage</goal> <!– 将引入的 jar 打入其中 –>-->
|
||||
<!-- </goals>-->
|
||||
<!-- </execution>-->
|
||||
<!-- </executions>-->
|
||||
<!-- </plugin>-->
|
||||
<!-- </plugins>-->
|
||||
</build>
|
||||
|
||||
</project>
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
*
|
||||
* @author ZT
|
||||
*/
|
||||
@SpringBootApplication
|
||||
//@SpringBootApplication
|
||||
public class EnergyServerApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
package cn.iocoder.yudao.module.energy.controller.admin.energy;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,7 +13,7 @@ import org.springframework.security.config.annotation.web.configurers.AuthorizeH
|
||||
*
|
||||
* @author ZT
|
||||
*/
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@Configuration("energySecurityConfiguration")
|
||||
public class SecurityConfiguration {
|
||||
|
||||
@Bean
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
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">
|
||||
<parent>
|
||||
<artifactId>yudao</artifactId>
|
||||
<artifactId>dsc-mes</artifactId>
|
||||
<groupId>cn.iocoder.cloud</groupId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
|
||||
@@ -5,7 +5,7 @@ import cn.iocoder.yudao.framework.common.exception.ErrorCode;
|
||||
/**
|
||||
* indicator 错误码枚举类
|
||||
*
|
||||
* indicator 系统,使用 1-xxx-xxx-xxx 段
|
||||
* 1-030-200-000 ~ 1-030-399-999
|
||||
*
|
||||
* @author ZT
|
||||
*/
|
||||
|
||||
@@ -131,21 +131,21 @@
|
||||
<build>
|
||||
<!-- 设置构建的 jar 包名 -->
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<!-- 打包 -->
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>${spring.boot.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal> <!-- 将引入的 jar 打入其中 -->
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<!-- <plugins>-->
|
||||
<!-- <!– 打包 –>-->
|
||||
<!-- <plugin>-->
|
||||
<!-- <groupId>org.springframework.boot</groupId>-->
|
||||
<!-- <artifactId>spring-boot-maven-plugin</artifactId>-->
|
||||
<!-- <version>${spring.boot.version}</version>-->
|
||||
<!-- <executions>-->
|
||||
<!-- <execution>-->
|
||||
<!-- <goals>-->
|
||||
<!-- <goal>repackage</goal> <!– 将引入的 jar 打入其中 –>-->
|
||||
<!-- </goals>-->
|
||||
<!-- </execution>-->
|
||||
<!-- </executions>-->
|
||||
<!-- </plugin>-->
|
||||
<!-- </plugins>-->
|
||||
</build>
|
||||
|
||||
</project>
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
*
|
||||
* @author ZT
|
||||
*/
|
||||
@SpringBootApplication
|
||||
//@SpringBootApplication
|
||||
public class IndicatorServerApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
package cn.iocoder.yudao.module.indicator.controller.admin.indicator;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,7 +13,7 @@ import org.springframework.security.config.annotation.web.configurers.AuthorizeH
|
||||
*
|
||||
* @author ZT
|
||||
*/
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@Configuration("indicatorSecurityConfiguration")
|
||||
public class SecurityConfiguration {
|
||||
|
||||
@Bean
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
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">
|
||||
<parent>
|
||||
<artifactId>yudao</artifactId>
|
||||
<artifactId>dsc-mes</artifactId>
|
||||
<groupId>cn.iocoder.cloud</groupId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
|
||||
@@ -4,14 +4,87 @@ import cn.iocoder.yudao.framework.common.exception.ErrorCode;
|
||||
|
||||
/**
|
||||
* product 错误码枚举类
|
||||
*
|
||||
* product 系统,使用 1-xxx-xxx-xxx 段
|
||||
* <p>
|
||||
* 1-030-400-000 ~ 1-030-599-999
|
||||
* <p>
|
||||
* 1-030-400(公共)-xxx
|
||||
* --------------------plan-----------------------
|
||||
* 1-030-411(plan-template)-xxx
|
||||
* 1-030-412(plan-template-column)-xxx
|
||||
* 1-030-413(plan-template-column-data)-xxx
|
||||
* 1-030-414(plan-template-item)-xxx
|
||||
* 1-030-415(factory_plan)-xxx
|
||||
* 1-030-416(factory_plan-column)-xxx
|
||||
* 1-030-417(factory_plan-column-data)-xxx
|
||||
* 1-030-418(factory_plan-item)-xxx
|
||||
* 1-030-419(factory_plan-item-data)-xxx
|
||||
* 1-030-420(company_plan)-xxx
|
||||
* 1-030-421(company_plan-column)-xxx
|
||||
* 1-030-422(company_plan-column-data)-xxx
|
||||
* 1-030-423(company_plan-item)-xxx
|
||||
* 1-030-424(company_plan-item-data)-xxx
|
||||
* -------------------------------------------
|
||||
* -----------------factory-------------------
|
||||
* 1-030-424 工厂模型(factory-model)
|
||||
* -------------------------------------------
|
||||
* -----------------schedule------------------
|
||||
* 1-030-425 排班配置(schedule-config)
|
||||
* 1-030-426 排班班组(schedule-team)
|
||||
* 1-030-427 排班班次(schedule-shift)
|
||||
* 1-030-428 排班规则(schedule-rule)
|
||||
* 1-030-429 排班数据(schedule-data)
|
||||
* -------------------------------------------
|
||||
*
|
||||
* @author ZT
|
||||
*/
|
||||
public interface ErrorCodeConstants {
|
||||
//通用
|
||||
ErrorCode CODE_GENERATION_SERVICE_CALL_FAILED = new ErrorCode(1_030_400_001, "编码生成服务调用失败");
|
||||
|
||||
//计划模板(plan-template)
|
||||
ErrorCode PLAN_TEMPLATE_NOT_EXISTS = new ErrorCode(1_030_411_001, "计划模板不存在");
|
||||
ErrorCode PLAN_TEMPLATE_PLAN_TYPE_IS_NULL = new ErrorCode(1_030_411_002, "计划模板类型为空");
|
||||
ErrorCode PLAN_TEMPLATE_PLAN_TYPE_NOT_EXISTS = new ErrorCode(1_030_411_003, "计划模板类型不存在");
|
||||
ErrorCode PLAN_TEMPLATE_PLAN_FAILED_TO_RETRIEVE_ENCODING = new ErrorCode(1_030_411_004, "计划模板编号获取失败");
|
||||
|
||||
//计划模板动态列(plan-template-column)
|
||||
ErrorCode PLAN_TEMPLATE_COLUMN_NOT_EXISTS = new ErrorCode(1_030_412_001, "计划模板动态列不存在");
|
||||
ErrorCode PLAN_TEMPLATE_COLUMN_OPERATION_ID_IS_NULL = new ErrorCode(1_030_412_002, "计划模板动态列操作标识为空");
|
||||
ErrorCode PLAN_TEMPLATE_COLUMN_ENCODING_INFORMATION_ALREADY_EXISTS = new ErrorCode(1_030_412_003, "计划模板动态列编码不能重复");
|
||||
|
||||
//计划模板动态列数据(plan-template-column-data)
|
||||
ErrorCode PLAN_TEMPLATE_COLUMN_DATA_NOT_EXISTS = new ErrorCode(1_030_413_001, "计划模板动态列结果不存在");
|
||||
|
||||
//计划模板项目(plan-template-item)
|
||||
ErrorCode PLAN_TEMPLATE_ITEM_NOT_EXISTS = new ErrorCode(1_030_414_001, "计划模板项目不存在");
|
||||
ErrorCode PLAN_TEMPLATE_ITEM_OPERATION_ID_IS_NULL = new ErrorCode(1_030_414_002, "计划模板动态列操作标识为空");
|
||||
|
||||
//1_030_424 工厂模型(factory-model)
|
||||
ErrorCode FACTORY_MODEL_NOT_EXISTS = new ErrorCode(1_030_424_001, "工厂模型不存在");
|
||||
ErrorCode FACTORY_MODEL_NODE_CODE_EXISTS = new ErrorCode(1_030_424_002, "节点编码已存在");
|
||||
ErrorCode FACTORY_MODEL_NODE_NAME_EXISTS = new ErrorCode(1_030_424_003, "节点名称已存在");
|
||||
|
||||
//1_030_425 排班配置(schedule-config)
|
||||
ErrorCode SCHEDULE_CONFIG_NOT_EXISTS = new ErrorCode(1_030_425_001, "排班配置不存在");
|
||||
ErrorCode SCHEDULE_CONFIG_CODE_EXISTS = new ErrorCode(1_030_425_002, "排班编码已存在");
|
||||
ErrorCode SCHEDULE_CONFIG_NAME_EXISTS = new ErrorCode(1_030_425_003, "排班名称已存在");
|
||||
|
||||
//1_030_426 排班班组(schedule-team)
|
||||
ErrorCode SCHEDULE_TEAM_NOT_EXISTS = new ErrorCode(1_030_426_001, "排班班组不存在");
|
||||
ErrorCode SCHEDULE_TEAM_NAME_EXISTS = new ErrorCode(1_030_426_002, "排班班组名称重复");
|
||||
ErrorCode SCHEDULE_TEAM_NOT_CREATE = new ErrorCode(1_030_426_003, "排班班组信息未创建");
|
||||
|
||||
//1_030_427 排班班次(schedule-shift)
|
||||
ErrorCode SCHEDULE_SHIFT_NOT_EXISTS = new ErrorCode(1_030_427_001, "排班班次不存在");
|
||||
ErrorCode SCHEDULE_SHIFT_NAME_EXISTS = new ErrorCode(1_030_427_002, "排班班次名称重复");
|
||||
ErrorCode SCHEDULE_SHIFT_NOT_CREATE = new ErrorCode(1_030_427_003, "排班班次信息未创建");
|
||||
|
||||
//1_030_428 排班规则(schedule-rule)
|
||||
ErrorCode SCHEDULE_RULE_NOT_EXISTS = new ErrorCode(1_030_428_001, "排班规则不存在");
|
||||
ErrorCode SCHEDULE_RULE_DATE_EXISTS = new ErrorCode(1_030_428_002, "排班日期重复");
|
||||
|
||||
//1_030_429 排班数据(schedule-data)
|
||||
ErrorCode SCHEDULE_DATA_NOT_EXISTS = new ErrorCode(1_030_429_001, "排班数据不存在");
|
||||
|
||||
// ========== 示例模块 1-001-000-000 ==========
|
||||
ErrorCode EXAMPLE_NOT_EXISTS = new ErrorCode(1_001_000_001, "示例不存在");
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
package cn.iocoder.yudao.module.product.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 计划模板状态
|
||||
*
|
||||
* @author ZT
|
||||
*/
|
||||
@Getter
|
||||
public enum PlanTemplateTypeEnums {
|
||||
Month("M", "月计划", "PLN_TMPL_M"),
|
||||
Day("D", "日计划", "PLN_TMPL_D");
|
||||
|
||||
private final String type;
|
||||
private final String name;
|
||||
private final String codeRule;
|
||||
|
||||
PlanTemplateTypeEnums(String type, String name, String codeRule) {
|
||||
this.type = type;
|
||||
this.name = name;
|
||||
this.codeRule = codeRule;
|
||||
}
|
||||
|
||||
// 根据code获取枚举
|
||||
public static String getCodeRuleByType(String type) {
|
||||
for (PlanTemplateTypeEnums templateTypeEnums : values()) {
|
||||
if (templateTypeEnums.type.equals(type)) {
|
||||
return templateTypeEnums.codeRule;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -131,21 +131,21 @@
|
||||
<build>
|
||||
<!-- 设置构建的 jar 包名 -->
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<!-- 打包 -->
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>${spring.boot.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal> <!-- 将引入的 jar 打入其中 -->
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<!-- <plugins>-->
|
||||
<!-- <!– 打包 –>-->
|
||||
<!-- <plugin>-->
|
||||
<!-- <groupId>org.springframework.boot</groupId>-->
|
||||
<!-- <artifactId>spring-boot-maven-plugin</artifactId>-->
|
||||
<!-- <version>${spring.boot.version}</version>-->
|
||||
<!-- <executions>-->
|
||||
<!-- <execution>-->
|
||||
<!-- <goals>-->
|
||||
<!-- <goal>repackage</goal> <!– 将引入的 jar 打入其中 –>-->
|
||||
<!-- </goals>-->
|
||||
<!-- </execution>-->
|
||||
<!-- </executions>-->
|
||||
<!-- </plugin>-->
|
||||
<!-- </plugins>-->
|
||||
</build>
|
||||
|
||||
</project>
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
*
|
||||
* @author ZT
|
||||
*/
|
||||
@SpringBootApplication
|
||||
//@SpringBootApplication
|
||||
public class ProductServerApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.factory.model;
|
||||
|
||||
import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.factory.model.vo.*;
|
||||
import cn.iocoder.yudao.module.product.convert.factory.model.FactoryModelConvert;
|
||||
import cn.iocoder.yudao.module.product.dal.dataobject.factory.model.FactoryModelDO;
|
||||
import cn.iocoder.yudao.module.product.service.factory.model.FactoryModelService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
|
||||
@Tag(name = "管理后台 - 工厂模型")
|
||||
@RestController
|
||||
@RequestMapping("/mes/factory-model")
|
||||
@Validated
|
||||
public class FactoryModelController implements BusinessControllerMarker {
|
||||
|
||||
|
||||
@Resource
|
||||
private FactoryModelService factoryModelService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建工厂模型")
|
||||
@PreAuthorize("@ss.hasPermission('mes:factory-model:create')")
|
||||
public CommonResult<FactoryModelRespVO> createFactoryModel(@Valid @RequestBody FactoryModelCreateReqVO createReqVO) {
|
||||
return success(factoryModelService.createFactoryModel(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新工厂模型")
|
||||
@PreAuthorize("@ss.hasPermission('mes:factory-model:update')")
|
||||
public CommonResult<Boolean> updateFactoryModel(@Valid @RequestBody FactoryModelUpdateReqVO updateReqVO) {
|
||||
factoryModelService.updateFactoryModel(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除工厂模型")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('mes:factory-model:delete')")
|
||||
public CommonResult<Boolean> deleteFactoryModel(@RequestParam("id") Long id) {
|
||||
factoryModelService.deleteFactoryModel(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除工厂模型")
|
||||
@PreAuthorize("@ss.hasPermission('mes:factory-model:delete')")
|
||||
public CommonResult<Boolean> deleteFactoryModelList(@RequestBody BatchDeleteReqVO req) {
|
||||
factoryModelService.deleteFactoryModelListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得工厂模型")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('mes:factory-model:query')")
|
||||
public CommonResult<FactoryModelRespVO> getFactoryModel(@RequestParam("id") Long id) {
|
||||
FactoryModelDO factoryModel = factoryModelService.getFactoryModel(id);
|
||||
return success(FactoryModelConvert.INSTANCE.convert(factoryModel));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得工厂模型分页")
|
||||
@PreAuthorize("@ss.hasPermission('mes:factory-model:query')")
|
||||
public CommonResult<PageResult<FactoryModelRespVO>> getFactoryModelPage(@Valid FactoryModelPageReqVO pageReqVO) {
|
||||
PageResult<FactoryModelDO> pageResult = factoryModelService.getFactoryModelPage(pageReqVO);
|
||||
return success(FactoryModelConvert.INSTANCE.convertPage(pageResult));
|
||||
}
|
||||
|
||||
@PutMapping("/process/bind")
|
||||
@Operation(summary = "绑定ERP工序")
|
||||
@PreAuthorize("@ss.hasPermission('mes:factory-model:update')")
|
||||
public CommonResult<Boolean> processBind(@Valid @RequestBody FactoryModelProcessBindReqVO processBindReqVO) {
|
||||
factoryModelService.processBind(processBindReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@PutMapping("/process/unbind")
|
||||
@Operation(summary = "解绑ERP工序")
|
||||
@PreAuthorize("@ss.hasPermission('mes:factory-model:update')")
|
||||
public CommonResult<Boolean> processUnbind(@Valid @RequestBody FactoryModelProcessUnbindReqVO processUnbindReqVO) {
|
||||
factoryModelService.processUnbind(processUnbindReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@PutMapping("/status")
|
||||
@Operation(summary = "启/停用模型")
|
||||
@PreAuthorize("@ss.hasPermission('mes:factory-model:update')")
|
||||
public CommonResult<Boolean> changeStatus(@Valid @RequestBody FactoryModelChangeStatusReqVO changeStatusReqVO) {
|
||||
factoryModelService.changeStatus(changeStatusReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/tree")
|
||||
@Operation(summary = "工厂模型树")
|
||||
@PreAuthorize("@ss.hasPermission('mes:factory-model:query')")
|
||||
public CommonResult<List<FactoryModeTreeRespVO>> tree(@RequestParam("parentId") Long parentId) {
|
||||
List<FactoryModelDO> data = factoryModelService.tree(parentId);
|
||||
return success(FactoryModelConvert.INSTANCE.convertList(data));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.factory.model.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 工厂模型 Tree Response VO")
|
||||
@Data
|
||||
public class FactoryModeTreeRespVO {
|
||||
@Schema(description = "节点id")
|
||||
private Long id;
|
||||
@Schema(description = "节点编码")
|
||||
private String nodeCoding;
|
||||
@Schema(description = "节点名称")
|
||||
private String nodeName;
|
||||
@Schema(description = "节点类型")
|
||||
private String nodeType;
|
||||
@Schema(description = "父级id")
|
||||
private Long parentId;
|
||||
@Schema(description = "父级编码")
|
||||
private String parentCoding;
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.factory.model.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 工厂模型Base VO")
|
||||
@Data
|
||||
public class FactoryModelBaseVO {
|
||||
@Schema(description = "父级id", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "父级id不能为空")
|
||||
private Long parentId;
|
||||
|
||||
@Schema(description = "父级编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "父级编码不能为空")
|
||||
private String parentCoding;
|
||||
|
||||
@Schema(description = "节点编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "节点编码不能为空")
|
||||
private String nodeCoding;
|
||||
|
||||
@Schema(description = "节点名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "节点名称不能为空")
|
||||
private String nodeName;
|
||||
|
||||
@Schema(description = "节点类型", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "节点类型不能为空")
|
||||
private String nodeType;
|
||||
|
||||
@Schema(description = "排序")
|
||||
private Integer sort;
|
||||
|
||||
@Schema(description = "ERP工艺路线编码")
|
||||
private String erpProcessRouteCoding;
|
||||
|
||||
@Schema(description = "ERP工序编码")
|
||||
private String erpProcessCoding;
|
||||
|
||||
@Schema(description = "ERP工序名称")
|
||||
private String erpProcessName;
|
||||
|
||||
@Schema(description = "状态")
|
||||
private String nodeStatus;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.factory.model.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 工厂模型修改 Request VO")
|
||||
@Data
|
||||
public class FactoryModelChangeStatusReqVO {
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "工厂模型主键不能为空")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "状态",requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "状态不能为空")
|
||||
private String nodeStatus;
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.factory.model.vo;
|
||||
|
||||
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 FactoryModelCreateReqVO extends FactoryModelBaseVO{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.factory.model.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 工厂模型分页 Request VO")
|
||||
@Data
|
||||
public class FactoryModelPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "父级id")
|
||||
private Long parentId;
|
||||
|
||||
@Schema(description = "节点编码")
|
||||
private String nodeCoding;
|
||||
|
||||
@Schema(description = "节点名称")
|
||||
private String nodeName;
|
||||
|
||||
@Schema(description = "节点类型")
|
||||
private String nodeType;
|
||||
|
||||
@Schema(description = "ERP工序编码")
|
||||
private String erpProcessCoding;
|
||||
|
||||
@Schema(description = "ERP工序名称")
|
||||
private String erpProcessName;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.factory.model.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 工厂模型修改 Request VO")
|
||||
@Data
|
||||
public class FactoryModelProcessBindReqVO {
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "工厂模型主键不能为空")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "ERP工艺路线编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "ERP工艺路线编码不能为空")
|
||||
private String erpProcessRouteCoding;
|
||||
|
||||
@Schema(description = "ERP工序编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "ERP工序编码不能为空")
|
||||
private String erpProcessCoding;
|
||||
|
||||
@Schema(description = "ERP工序名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "ERP工序名称不能为空")
|
||||
private String erpProcessName;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.factory.model.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 工厂模型修改 Request VO")
|
||||
@Data
|
||||
public class FactoryModelProcessUnbindReqVO {
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "工厂模型主键不能为空")
|
||||
private Long id;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.factory.model.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 工厂模型 Response VO")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Data
|
||||
public class FactoryModelRespVO extends FactoryModelBaseVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.factory.model.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
@Schema(description = "管理后台 - 工厂模型修改 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class FactoryModelUpdateReqVO extends FactoryModelBaseVO {
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "工厂模型主键不能为空")
|
||||
private Long id;
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.plan.template;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.plan.template.vo.PlanTemplateCopyReqVO;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.plan.template.vo.PlanTemplatePageReqVO;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.plan.template.vo.PlanTemplateRespVO;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.plan.template.vo.PlanTemplateSaveReqVO;
|
||||
import cn.iocoder.yudao.module.product.dal.dataobject.plan.template.PlanTemplateDO;
|
||||
import cn.iocoder.yudao.module.product.service.plan.template.PlanTemplateService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "管理后台 - 生产计划模板")
|
||||
@RestController
|
||||
@RequestMapping("/mes/product/plan/plan-template")
|
||||
@Validated
|
||||
public class PlanTemplateController implements BusinessControllerMarker {
|
||||
|
||||
@Resource
|
||||
private PlanTemplateService planTemplateService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建生产计划模板")
|
||||
@PreAuthorize("@ss.hasPermission('product:plan:plan-template:create')")
|
||||
public CommonResult<PlanTemplateRespVO> createPlanTemplate(@Valid @RequestBody PlanTemplateSaveReqVO createReqVO) {
|
||||
return success(planTemplateService.createPlanTemplate(createReqVO));
|
||||
}
|
||||
|
||||
@PostMapping("/copy")
|
||||
@Operation(summary = "复制生产计划模板")
|
||||
@PreAuthorize("@ss.hasPermission('product:plan:plan-template:copy')")
|
||||
public CommonResult<PlanTemplateRespVO> copyPlanTemplate(@Valid @RequestBody PlanTemplateCopyReqVO copyReqVO) {
|
||||
return success(planTemplateService.copyPlanTemplate(copyReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新生产计划模板")
|
||||
@PreAuthorize("@ss.hasPermission('product:plan:plan-template:update')")
|
||||
public CommonResult<Boolean> updatePlanTemplate(@Valid @RequestBody PlanTemplateSaveReqVO updateReqVO) {
|
||||
planTemplateService.updatePlanTemplate(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除生产计划模板")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('product:plan:plan-template:delete')")
|
||||
public CommonResult<Boolean> deletePlanTemplate(@RequestParam("id") Long id) {
|
||||
planTemplateService.deletePlanTemplate(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除生产计划模板")
|
||||
@PreAuthorize("@ss.hasPermission('product:plan:plan-template:delete')")
|
||||
public CommonResult<Boolean> deletePlanTemplateList(@RequestBody BatchDeleteReqVO req) {
|
||||
planTemplateService.deletePlanTemplateListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得生产计划模板")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('product:plan-template:query')")
|
||||
public CommonResult<PlanTemplateRespVO> getPlanTemplate(@RequestParam("id") Long id) {
|
||||
PlanTemplateDO planTemplate = planTemplateService.getPlanTemplate(id);
|
||||
return success(BeanUtils.toBean(planTemplate, PlanTemplateRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得生产计划模板分页")
|
||||
@PreAuthorize("@ss.hasPermission('product:plan:plan-template:query')")
|
||||
public CommonResult<PageResult<PlanTemplateRespVO>> getPlanTemplatePage(@Valid PlanTemplatePageReqVO pageReqVO) {
|
||||
PageResult<PlanTemplateDO> pageResult = planTemplateService.getPlanTemplatePage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, PlanTemplateRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出生产计划模板 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('product:plan:plan-template:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportPlanTemplateExcel(@Valid PlanTemplatePageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<PlanTemplateDO> list = planTemplateService.getPlanTemplatePage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "生产计划模板.xls", "数据", PlanTemplateRespVO.class,
|
||||
BeanUtils.toBean(list, PlanTemplateRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.plan.template.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 生产计划模板复制 Request VO")
|
||||
@Data
|
||||
public class PlanTemplateCopyReqVO {
|
||||
|
||||
@NotNull(message = "id不能为空")
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "16514")
|
||||
private Long id;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.plan.template.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 生产计划模板分页 Request VO")
|
||||
@Data
|
||||
public class PlanTemplatePageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "模板编码")
|
||||
private String templateCoding;
|
||||
|
||||
@Schema(description = "模板名称", example = "XX公司XX月计划模板")
|
||||
private String templateName;
|
||||
|
||||
@Schema(description = "模板类型(M:月计划,D:日计划)", example = "M", allowableValues = {"M", "D"})
|
||||
private String planType;
|
||||
|
||||
@Schema(description = "公司编码")
|
||||
private String belongCompanyCoding;
|
||||
|
||||
@Schema(description = "公司名称")
|
||||
private String belongCompanyName;
|
||||
|
||||
@Schema(description = "版本")
|
||||
private Integer templateVersion;
|
||||
|
||||
@Schema(description = "状态(0:未启用,1:启用)", example = "0", allowableValues = {"0", "1"})
|
||||
private String templateStatus;
|
||||
|
||||
@Schema(description = "创建时间(时间戳)")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.plan.template.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.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 生产计划模板 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class PlanTemplateRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "16514")
|
||||
@ExcelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "模板编码")
|
||||
@ExcelProperty("模板编码")
|
||||
private String templateCoding;
|
||||
|
||||
@Schema(description = "模板名称")
|
||||
@ExcelProperty("模板名称")
|
||||
private String templateName;
|
||||
|
||||
@Schema(description = "模板类型(M:月计划,D:日计划)", example = "M", allowableValues = {"M", "D"})
|
||||
@ExcelProperty("模板类型")
|
||||
private String planType;
|
||||
|
||||
@Schema(description = "公司编码")
|
||||
@ExcelProperty("公司编码")
|
||||
private String belongCompanyCoding;
|
||||
|
||||
@Schema(description = "公司名称")
|
||||
@ExcelProperty("公司名称")
|
||||
private String belongCompanyName;
|
||||
|
||||
@Schema(description = "版本")
|
||||
@ExcelProperty("版本")
|
||||
private Integer templateVersion;
|
||||
|
||||
@Schema(description = "状态(0:未启用,1:启用)", example = "0", allowableValues = {"0", "1"})
|
||||
@ExcelProperty("状态")
|
||||
private String templateStatus;
|
||||
|
||||
@Schema(description = "创建时间(时间戳)")
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.plan.template.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.Pattern;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 生产计划模板新增/修改 Request VO")
|
||||
@Data
|
||||
public class PlanTemplateSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", example = "16514")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "模板编码(后台生成)")
|
||||
private String templateCoding;
|
||||
|
||||
@NotBlank(message = "模板名称不能为空")
|
||||
@Schema(description = "模板名称", example = "XX公司XX月计划模板", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String templateName;
|
||||
|
||||
@NotBlank(message = "模板类型不能为空")
|
||||
@Pattern(regexp = "[MD]", message = "只有M|D两种类型")
|
||||
@Schema(description = "模板类型(M:月计划,D:日计划)", example = "M", allowableValues = {"M", "D"}, requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String planType;
|
||||
|
||||
@NotBlank(message = "公司编码不能为空")
|
||||
@Schema(description = "公司编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String belongCompanyCoding;
|
||||
|
||||
@NotBlank(message = "公司名称不能为空")
|
||||
@Schema(description = "公司名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String belongCompanyName;
|
||||
|
||||
@Schema(description = "版本(后台生成)", example = "1")
|
||||
private Integer templateVersion;
|
||||
|
||||
@NotBlank(message = "状态不能为空")
|
||||
@Pattern(regexp = "[01]", message = "只有0|1两种状态")
|
||||
@Schema(description = "状态(0:未启用,1:启用)", example = "0", allowableValues = {"0", "1"})
|
||||
private String templateStatus;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.plan.templatecolumn;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.plan.templatecolumn.vo.PlanTemplateColumnPageReqVO;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.plan.templatecolumn.vo.PlanTemplateColumnRespVO;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.plan.templatecolumn.vo.PlanTemplateColumnSaveReqVO;
|
||||
import cn.iocoder.yudao.module.product.dal.dataobject.plan.templatecolumn.PlanTemplateColumnDO;
|
||||
import cn.iocoder.yudao.module.product.service.plan.templatecolumn.PlanTemplateColumnService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "管理后台 - 生产计划模板动态列")
|
||||
@RestController
|
||||
@RequestMapping("/mes/product/plan/plan-template-column")
|
||||
@Validated
|
||||
public class PlanTemplateColumnController implements BusinessControllerMarker {
|
||||
|
||||
|
||||
@Resource
|
||||
private PlanTemplateColumnService planTemplateColumnService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建生产计划模板动态列")
|
||||
@PreAuthorize("@ss.hasPermission('product:plan:plan-template-column:create')")
|
||||
public CommonResult<PlanTemplateColumnRespVO> createPlanTemplateColumn(@Valid @RequestBody PlanTemplateColumnSaveReqVO createReqVO) {
|
||||
return success(planTemplateColumnService.createPlanTemplateColumn(createReqVO));
|
||||
}
|
||||
|
||||
@PostMapping("/saveBatch")
|
||||
@Operation(summary = "创建生产计划模板动态列")
|
||||
@PreAuthorize("@ss.hasPermission('product:plan:plan-template-column:save-batch')")
|
||||
public CommonResult<Boolean> saveBatchPlanTemplateColumn(@Valid @RequestBody List<PlanTemplateColumnSaveReqVO> saveReqVOList) {
|
||||
planTemplateColumnService.saveBatchPlanTemplateColumn(saveReqVOList);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新生产计划模板动态列")
|
||||
@PreAuthorize("@ss.hasPermission('product:plan:plan-template-column:update')")
|
||||
public CommonResult<Boolean> updatePlanTemplateColumn(@Valid @RequestBody PlanTemplateColumnSaveReqVO updateReqVO) {
|
||||
planTemplateColumnService.updatePlanTemplateColumn(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除生产计划模板动态列")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('product:plan:plan-template-column:delete')")
|
||||
public CommonResult<Boolean> deletePlanTemplateColumn(@RequestParam("id") Long id) {
|
||||
planTemplateColumnService.deletePlanTemplateColumn(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除生产计划模板动态列")
|
||||
@PreAuthorize("@ss.hasPermission('product:plan:plan-template-column:delete')")
|
||||
public CommonResult<Boolean> deletePlanTemplateColumnList(@RequestBody BatchDeleteReqVO req) {
|
||||
planTemplateColumnService.deletePlanTemplateColumnListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得生产计划模板动态列")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('product:plan:plan-template-column:query')")
|
||||
public CommonResult<PlanTemplateColumnRespVO> getPlanTemplateColumn(@RequestParam("id") Long id) {
|
||||
PlanTemplateColumnDO planTemplateColumn = planTemplateColumnService.getPlanTemplateColumn(id);
|
||||
return success(BeanUtils.toBean(planTemplateColumn, PlanTemplateColumnRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得生产计划模板动态列分页")
|
||||
@PreAuthorize("@ss.hasPermission('product:plan:plan-template-column:query')")
|
||||
public CommonResult<PageResult<PlanTemplateColumnRespVO>> getPlanTemplateColumnPage(@Valid PlanTemplateColumnPageReqVO pageReqVO) {
|
||||
PageResult<PlanTemplateColumnDO> pageResult = planTemplateColumnService.getPlanTemplateColumnPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, PlanTemplateColumnRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出生产计划模板动态列 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('product:plan:plan-template-column:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportPlanTemplateColumnExcel(@Valid PlanTemplateColumnPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<PlanTemplateColumnDO> list = planTemplateColumnService.getPlanTemplateColumnPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "生产计划模板动态列.xls", "数据", PlanTemplateColumnRespVO.class,
|
||||
BeanUtils.toBean(list, PlanTemplateColumnRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.plan.templatecolumn.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 生产计划模板动态列分页 Request VO")
|
||||
@Data
|
||||
public class PlanTemplateColumnPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "模板id")
|
||||
private Long planTemplateId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.plan.templatecolumn.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.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 生产计划模板动态列 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class PlanTemplateColumnRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "12305")
|
||||
@ExcelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "模板id")
|
||||
@ExcelProperty("模板id")
|
||||
private Long planTemplateId;
|
||||
|
||||
@Schema(description = "模板编码")
|
||||
@ExcelProperty("模板编码")
|
||||
private String planTemplateCoding;
|
||||
|
||||
@Schema(description = "列编码")
|
||||
@ExcelProperty("列编码")
|
||||
private String columnCoding;
|
||||
|
||||
@Schema(description = "列名称")
|
||||
@ExcelProperty("列名称")
|
||||
private String columnName;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.plan.templatecolumn.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Pattern;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 生产计划模板动态列新增/修改 Request VO")
|
||||
@Data
|
||||
public class PlanTemplateColumnSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", example = "12305")
|
||||
private Long id;
|
||||
|
||||
@NotNull(message = "模板id不能为空")
|
||||
@Schema(description = "模板id", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long planTemplateId;
|
||||
|
||||
@NotBlank(message = "模板编码不能为空")
|
||||
@Schema(description = "模板编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String planTemplateCoding;
|
||||
|
||||
@NotBlank(message = "列编码不能为空")
|
||||
@Schema(description = "列编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String columnCoding;
|
||||
|
||||
@NotBlank(message = "列名称不能为空")
|
||||
@Schema(description = "列名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String columnName;
|
||||
|
||||
@NotBlank(message = "数据操作类型不能为空")
|
||||
@Pattern(regexp = "INSERT|UPDATE|DELETE", message = "只能使用INSERT|UPDATE|DELETE三种操作类型")
|
||||
@Schema(description = "操作类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "INSERT", allowableValues = {"INSERT","UPDATE","DELETE"})
|
||||
private String operation;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.plan.templatecolumndata;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.plan.templatecolumndata.vo.PlanTemplateColumnDataPageReqVO;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.plan.templatecolumndata.vo.PlanTemplateColumnDataRespVO;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.plan.templatecolumndata.vo.PlanTemplateColumnDataSaveReqVO;
|
||||
import cn.iocoder.yudao.module.product.dal.dataobject.plan.templatecolumndata.PlanTemplateColumnDataDO;
|
||||
import cn.iocoder.yudao.module.product.service.plan.templatecolumndata.PlanTemplateColumnDataService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "管理后台 - 生产计划模板动态列数据")
|
||||
@RestController
|
||||
@RequestMapping("/mes/product/plan/plan-template-column-data")
|
||||
@Validated
|
||||
public class PlanTemplateColumnDataController implements BusinessControllerMarker {
|
||||
|
||||
|
||||
@Resource
|
||||
private PlanTemplateColumnDataService planTemplateColumnDataService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建生产计划模板动态列数据")
|
||||
@PreAuthorize("@ss.hasPermission('product:plan:plan-template-column-data:create')")
|
||||
public CommonResult<PlanTemplateColumnDataRespVO> createPlanTemplateColumnData(@Valid @RequestBody PlanTemplateColumnDataSaveReqVO createReqVO) {
|
||||
return success(planTemplateColumnDataService.createPlanTemplateColumnData(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新生产计划模板动态列数据")
|
||||
@PreAuthorize("@ss.hasPermission('product:plan:plan-template-column-data:update')")
|
||||
public CommonResult<Boolean> updatePlanTemplateColumnData(@Valid @RequestBody PlanTemplateColumnDataSaveReqVO updateReqVO) {
|
||||
planTemplateColumnDataService.updatePlanTemplateColumnData(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除生产计划模板动态列数据")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('product:plan:plan-template-column-data:delete')")
|
||||
public CommonResult<Boolean> deletePlanTemplateColumnData(@RequestParam("id") Long id) {
|
||||
planTemplateColumnDataService.deletePlanTemplateColumnData(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除生产计划模板动态列数据")
|
||||
@PreAuthorize("@ss.hasPermission('product:plan:plan-template-column-data:delete')")
|
||||
public CommonResult<Boolean> deletePlanTemplateColumnDataList(@RequestBody BatchDeleteReqVO req) {
|
||||
planTemplateColumnDataService.deletePlanTemplateColumnDataListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得生产计划模板动态列数据")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('product:plan:plan-template-column-data:query')")
|
||||
public CommonResult<PlanTemplateColumnDataRespVO> getPlanTemplateColumnData(@RequestParam("id") Long id) {
|
||||
PlanTemplateColumnDataDO planTemplateColumnData = planTemplateColumnDataService.getPlanTemplateColumnData(id);
|
||||
return success(BeanUtils.toBean(planTemplateColumnData, PlanTemplateColumnDataRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得生产计划模板动态列数据分页")
|
||||
@PreAuthorize("@ss.hasPermission('product:plan:plan-template-column-data:query')")
|
||||
public CommonResult<PageResult<PlanTemplateColumnDataRespVO>> getPlanTemplateColumnDataPage(@Valid PlanTemplateColumnDataPageReqVO pageReqVO) {
|
||||
PageResult<PlanTemplateColumnDataDO> pageResult = planTemplateColumnDataService.getPlanTemplateColumnDataPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, PlanTemplateColumnDataRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出生产计划模板动态列数据 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('product:plan:plan-template-column-data:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportPlanTemplateColumnDataExcel(@Valid PlanTemplateColumnDataPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<PlanTemplateColumnDataDO> list = planTemplateColumnDataService.getPlanTemplateColumnDataPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "生产计划模板动态列数据.xls", "数据", PlanTemplateColumnDataRespVO.class,
|
||||
BeanUtils.toBean(list, PlanTemplateColumnDataRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.plan.templatecolumndata.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 生产计划模板动态列数据分页 Request VO")
|
||||
@Data
|
||||
public class PlanTemplateColumnDataPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "模板id")
|
||||
private Long planTemplateTemplateId;
|
||||
|
||||
@Schema(description = "模板动态列id")
|
||||
private Long planTemplateColumnId;
|
||||
|
||||
@Schema(description = "模板明细id")
|
||||
private Long planTemplateItemId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.plan.templatecolumndata.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.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 生产计划模板动态列数据 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class PlanTemplateColumnDataRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "15546")
|
||||
@ExcelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "模板id")
|
||||
@ExcelProperty("模板id")
|
||||
private Long planTemplateTemplateId;
|
||||
|
||||
@Schema(description = "模板动态列id")
|
||||
@ExcelProperty("模板动态列id")
|
||||
private Long planTemplateColumnId;
|
||||
|
||||
@Schema(description = "模板明细id")
|
||||
@ExcelProperty("模板明细id")
|
||||
private Long planTemplateItemId;
|
||||
|
||||
@Schema(description = "动态列编码")
|
||||
@ExcelProperty("动态列编码")
|
||||
private String columnCoding;
|
||||
|
||||
@Schema(description = "动态列值")
|
||||
@ExcelProperty("动态列值")
|
||||
private String columnValue;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.plan.templatecolumndata.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 生产计划模板动态列数据新增/修改 Request VO")
|
||||
@Data
|
||||
public class PlanTemplateColumnDataSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", example = "15546")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "模板id")
|
||||
private Long planTemplateTemplateId;
|
||||
|
||||
@Schema(description = "模板动态列id")
|
||||
private Long planTemplateColumnId;
|
||||
|
||||
@Schema(description = "模板明细id")
|
||||
private Long planTemplateItemId;
|
||||
|
||||
@Schema(description = "动态列编码")
|
||||
private String columnCoding;
|
||||
|
||||
@Schema(description = "动态列值")
|
||||
private String columnValue;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.plan.templateitem;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.plan.templateitem.vo.PlanTemplateItemPageReqVO;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.plan.templateitem.vo.PlanTemplateItemRespVO;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.plan.templateitem.vo.PlanTemplateItemSaveReqVO;
|
||||
import cn.iocoder.yudao.module.product.dal.dataobject.plan.templateitem.PlanTemplateItemDO;
|
||||
import cn.iocoder.yudao.module.product.service.plan.templateitem.PlanTemplateItemService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
@Tag(name = "管理后台 - 生产计划模板项目")
|
||||
@RestController
|
||||
@RequestMapping("/mes/product/plan/plan-template-item")
|
||||
@Validated
|
||||
public class PlanTemplateItemController implements BusinessControllerMarker {
|
||||
|
||||
|
||||
@Resource
|
||||
private PlanTemplateItemService planTemplateItemService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建生产计划模板项目")
|
||||
@PreAuthorize("@ss.hasPermission('product:plan:plan-template-item:create')")
|
||||
public CommonResult<PlanTemplateItemRespVO> createPlanTemplateItem(@Valid @RequestBody PlanTemplateItemSaveReqVO createReqVO) {
|
||||
return success(planTemplateItemService.createPlanTemplateItem(createReqVO));
|
||||
}
|
||||
|
||||
@PostMapping("/saveBatch")
|
||||
@Operation(summary = "创建生产计划模板项目")
|
||||
@PreAuthorize("@ss.hasPermission('product:plan:plan-template-item:save-batch')")
|
||||
public CommonResult<Boolean> saveBatchPlanTemplateItem(@Valid @RequestBody List<PlanTemplateItemSaveReqVO> saveReqVOList) {
|
||||
planTemplateItemService.saveBatchPlanTemplateItem(saveReqVOList);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新生产计划模板项目")
|
||||
@PreAuthorize("@ss.hasPermission('product:plan:plan-template-item:update')")
|
||||
public CommonResult<Boolean> updatePlanTemplateItem(@Valid @RequestBody PlanTemplateItemSaveReqVO updateReqVO) {
|
||||
planTemplateItemService.updatePlanTemplateItem(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除生产计划模板项目")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('product:plan:plan-template-item:delete')")
|
||||
public CommonResult<Boolean> deletePlanTemplateItem(@RequestParam("id") Long id) {
|
||||
planTemplateItemService.deletePlanTemplateItem(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除生产计划模板项目")
|
||||
@PreAuthorize("@ss.hasPermission('product:plan:plan-template-item:delete')")
|
||||
public CommonResult<Boolean> deletePlanTemplateItemList(@RequestBody BatchDeleteReqVO req) {
|
||||
planTemplateItemService.deletePlanTemplateItemListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得生产计划模板项目")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('product:plan:plan-template-item:query')")
|
||||
public CommonResult<PlanTemplateItemRespVO> getPlanTemplateItem(@RequestParam("id") Long id) {
|
||||
PlanTemplateItemDO planTemplateItem = planTemplateItemService.getPlanTemplateItem(id);
|
||||
return success(BeanUtils.toBean(planTemplateItem, PlanTemplateItemRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得生产计划模板项目分页")
|
||||
@PreAuthorize("@ss.hasPermission('product:plan:plan-template-item:query')")
|
||||
public CommonResult<PageResult<PlanTemplateItemRespVO>> getPlanTemplateItemPage(@Valid PlanTemplateItemPageReqVO pageReqVO) {
|
||||
return success(planTemplateItemService.getPlanTemplateItemPage(pageReqVO));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出生产计划模板项目 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('product:plan:plan-template-item:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportPlanTemplateItemExcel(@Valid @RequestBody PlanTemplateItemPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<PlanTemplateItemRespVO> list = planTemplateItemService.getPlanTemplateItemPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "生产计划模板项目.xls", "数据", PlanTemplateItemRespVO.class,
|
||||
list);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.plan.templateitem.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 生产计划模板项目分页 Request VO")
|
||||
@Data
|
||||
public class PlanTemplateItemPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "模板id", example = "26659")
|
||||
private Long planTemplateId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.plan.templateitem.vo;
|
||||
|
||||
import cn.iocoder.yudao.module.product.controller.admin.plan.templatecolumndata.vo.PlanTemplateColumnDataRespVO;
|
||||
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.time.LocalDateTime;
|
||||
import java.util.Map;
|
||||
|
||||
@Schema(description = "管理后台 - 生产计划模板项目 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class PlanTemplateItemRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "23213")
|
||||
@ExcelProperty("主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "模板id")
|
||||
@ExcelProperty("模板id")
|
||||
private Long planTemplateId;
|
||||
|
||||
@Schema(description = "模板编码")
|
||||
@ExcelProperty("模板编码")
|
||||
private String planTemplateCoding;
|
||||
|
||||
@Schema(description = "计量单位(数据字典)")
|
||||
@ExcelProperty("计量单位")
|
||||
private String unit;
|
||||
|
||||
@Schema(description = "是否生成订单(0:不生成,1:生成)")
|
||||
@ExcelProperty("是否生成订单")
|
||||
private String generateOrder;
|
||||
|
||||
@Schema(description = "录入方式", example = "1")
|
||||
@ExcelProperty("录入方式")
|
||||
private String writeType;
|
||||
|
||||
@Schema(description = "物料编码")
|
||||
@ExcelProperty("物料编码")
|
||||
private String materialCoding;
|
||||
|
||||
@Schema(description = "物料名称")
|
||||
@ExcelProperty("物料名称")
|
||||
private String materialName;
|
||||
|
||||
@Schema(description = "指标id")
|
||||
@ExcelProperty("指标id")
|
||||
private Long indicatorId;
|
||||
|
||||
@Schema(description = "指标编码")
|
||||
@ExcelProperty("指标编码")
|
||||
private String indicatorCoding;
|
||||
|
||||
@Schema(description = "所属公司")
|
||||
@ExcelProperty("所属公司")
|
||||
private String belongCompanyCoding;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "动态列")
|
||||
private Map<String, PlanTemplateColumnDataRespVO> columns;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.plan.templateitem.vo;
|
||||
|
||||
import cn.iocoder.yudao.module.product.controller.admin.plan.templatecolumndata.vo.PlanTemplateColumnDataRespVO;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Schema(description = "管理后台 - 生产计划模板项目新增/修改 Request VO")
|
||||
@Data
|
||||
public class PlanTemplateItemSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", example = "23213")
|
||||
private Long id;
|
||||
|
||||
@NotNull(message = "模板id不能为空")
|
||||
@Schema(description = "模板id", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long planTemplateId;
|
||||
|
||||
@NotBlank(message = "模板编码不能为空")
|
||||
@Schema(description = "模板编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String planTemplateCoding;
|
||||
|
||||
@Schema(description = "计量单位(数据字典)")
|
||||
private String unit;
|
||||
|
||||
@NotBlank(message = "是否生成订单不能为空")
|
||||
@Schema(description = "是否生成订单(0:不生成,1:生成)", example = "1", allowableValues = {"0","1",""}, requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String generateOrder;
|
||||
|
||||
@Schema(description = "录入方式", example = "1")
|
||||
private String writeType;
|
||||
|
||||
@NotBlank(message = "物料编码不能为空")
|
||||
@Schema(description = "物料编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String materialCoding;
|
||||
|
||||
@NotBlank(message = "物料名称不能为空")
|
||||
@Schema(description = "物料名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String materialName;
|
||||
|
||||
@NotNull(message = "指标id不能为空")
|
||||
@Schema(description = "指标id", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long indicatorId;
|
||||
|
||||
@NotBlank(message = "指标编码不能为空")
|
||||
@Schema(description = "指标编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String indicatorCoding;
|
||||
|
||||
@Schema(description = "所属公司")
|
||||
private String belongCompanyCoding;
|
||||
|
||||
@Schema(description = "动态列")
|
||||
private Map<String, PlanTemplateColumnDataRespVO> columns;
|
||||
|
||||
@NotBlank(message = "操作类型不能为空")
|
||||
@Schema(description = "操作类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "INSERT", allowableValues = {"INSERT","UPDATE","DELETE"})
|
||||
private String operation;
|
||||
|
||||
}
|
||||
@@ -1,12 +1,13 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.product;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.schedule.config;
|
||||
|
||||
import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.vo.BatchDeleteReqVO;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.schedule.config.vo.ScheduleConfigPageReqVO;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.schedule.config.vo.ScheduleConfigRespVO;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.schedule.config.vo.ScheduleCreateReqVO;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.schedule.config.vo.ScheduleUpdateReqVO;
|
||||
import cn.iocoder.yudao.module.product.convert.schedule.config.ScheduleConfigConvert;
|
||||
import cn.iocoder.yudao.module.product.dal.dataobject.schedule.config.ScheduleConfigDO;
|
||||
import cn.iocoder.yudao.module.product.service.schedule.config.ScheduleConfigService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
|
||||
@Tag(name = "管理后台 - 排班配置")
|
||||
@RestController
|
||||
@RequestMapping("/mes/schedule-config")
|
||||
@Validated
|
||||
public class ScheduleConfigController implements BusinessControllerMarker {
|
||||
|
||||
|
||||
@Resource
|
||||
private ScheduleConfigService scheduleConfigService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建排班配置")
|
||||
@PreAuthorize("@ss.hasPermission('mes:schedule-config:create')")
|
||||
public CommonResult<Long> createScheduleConfig(@Valid @RequestBody ScheduleCreateReqVO createReqVO) {
|
||||
return success(scheduleConfigService.createScheduleConfig(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新排班配置")
|
||||
@PreAuthorize("@ss.hasPermission('mes:schedule-config:update')")
|
||||
public CommonResult<Boolean> updateScheduleConfig(@Valid @RequestBody ScheduleUpdateReqVO updateReqVO) {
|
||||
scheduleConfigService.updateScheduleConfig(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除排班配置")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('mes:schedule-config:delete')")
|
||||
public CommonResult<Boolean> deleteScheduleConfig(@RequestParam("id") Long id) {
|
||||
scheduleConfigService.deleteScheduleConfig(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除排班配置")
|
||||
@PreAuthorize("@ss.hasPermission('mes:schedule-config:delete')")
|
||||
public CommonResult<Boolean> deleteScheduleConfigList(@RequestBody BatchDeleteReqVO req) {
|
||||
scheduleConfigService.deleteScheduleConfigListByIds(req.getIds());
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得排班配置")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('mes:schedule-config:query')")
|
||||
public CommonResult<ScheduleConfigRespVO> getScheduleConfig(@RequestParam("id") Long id) {
|
||||
ScheduleConfigDO scheduleConfig = scheduleConfigService.getScheduleConfig(id);
|
||||
return success(ScheduleConfigConvert.INSTANCE.convert(scheduleConfig));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得排班配置分页")
|
||||
@PreAuthorize("@ss.hasPermission('mes:schedule-config:query')")
|
||||
public CommonResult<PageResult<ScheduleConfigRespVO>> getScheduleConfigPage(@Valid ScheduleConfigPageReqVO pageReqVO) {
|
||||
PageResult<ScheduleConfigDO> pageResult = scheduleConfigService.getScheduleConfigPage(pageReqVO);
|
||||
return success(ScheduleConfigConvert.INSTANCE.convertPage(pageResult));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.schedule.config.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 排班配置Base VO")
|
||||
@Data
|
||||
public class ScheduleConfigBaseVO {
|
||||
|
||||
@Schema(description = "工厂模型id", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "工厂模型id不能为空")
|
||||
private Long factoryModelId;
|
||||
|
||||
@Schema(description = "工厂模型编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "工厂模型编码不能为空")
|
||||
private String factoryModelCoding;
|
||||
|
||||
@Schema(description = "排班编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "排班编码不能为空")
|
||||
private String configCoding;
|
||||
|
||||
@Schema(description = "排班名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "排班名称不能为空")
|
||||
private String configName;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.schedule.config.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
@Schema(description = "管理后台 - 排班配置新增 Request VO")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Data
|
||||
public class ScheduleConfigCreateReqVO extends ScheduleConfigBaseVO {
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.schedule.config.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 排班配置分页 Request VO")
|
||||
@Data
|
||||
public class ScheduleConfigPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "工厂模型id")
|
||||
private Long factoryModelId;
|
||||
|
||||
@Schema(description = "工厂模型编码")
|
||||
private String factoryModelCoding;
|
||||
|
||||
@Schema(description = "排班编码")
|
||||
private String configCoding;
|
||||
|
||||
@Schema(description = "排班名称")
|
||||
private String configName;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.schedule.config.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 排班配置 Response VO")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Data
|
||||
public class ScheduleConfigRespVO extends ScheduleConfigBaseVO{
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.schedule.config.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
@Schema(description = "管理后台 - 排班配置修改 Request VO")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Data
|
||||
public class ScheduleConfigUpdateReqVO extends ScheduleConfigBaseVO{
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "排班配置主键不能为空")
|
||||
private Long id;
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.schedule.config.vo;
|
||||
|
||||
import cn.iocoder.yudao.module.product.controller.admin.schedule.rule.vo.ScheduleRuleCreateReqVO;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.schedule.shift.vo.ScheduleShiftCreateReqVO;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.schedule.team.vo.ScheduleTeamCreateReqVO;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 排班新增 Request VO")
|
||||
@Data
|
||||
public class ScheduleCreateReqVO {
|
||||
|
||||
@Schema(description = "基本信息", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "基本信息不能为空")
|
||||
@Valid
|
||||
private ScheduleConfigCreateReqVO scheduleConfig;
|
||||
|
||||
@Schema(description = "排班班组信息")
|
||||
@Valid
|
||||
private List<ScheduleTeamCreateReqVO> scheduleTeams;
|
||||
|
||||
@Schema(description = "排班班次信息")
|
||||
@Valid
|
||||
private List<ScheduleShiftCreateReqVO> scheduleShifts;
|
||||
|
||||
@Schema(description = "排班规则信息")
|
||||
@Valid
|
||||
private List<ScheduleRuleCreateReqVO> scheduleRules;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.schedule.config.vo;
|
||||
|
||||
import cn.iocoder.yudao.module.product.controller.admin.schedule.rule.vo.ScheduleRuleUpdateReqVO;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.schedule.shift.vo.ScheduleShiftUpdateReqVO;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.schedule.team.vo.ScheduleTeamUpdateReqVO;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "管理后台 - 排班修改 Request VO")
|
||||
@Data
|
||||
public class ScheduleUpdateReqVO {
|
||||
|
||||
@Schema(description = "基本信息", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "基本信息不能为空")
|
||||
@Valid
|
||||
private ScheduleConfigUpdateReqVO scheduleConfig;
|
||||
|
||||
@Schema(description = "排班班组信息")
|
||||
@Valid
|
||||
private List<ScheduleTeamUpdateReqVO> scheduleTeams;
|
||||
|
||||
@Schema(description = "排班班次信息")
|
||||
@Valid
|
||||
private List<ScheduleShiftUpdateReqVO> scheduleShifts;
|
||||
|
||||
@Schema(description = "排班规则信息")
|
||||
@Valid
|
||||
private List<ScheduleRuleUpdateReqVO> scheduleRules;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.schedule.data;
|
||||
|
||||
import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.schedule.data.vo.ScheduleDataGenerateReqVO;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.schedule.data.vo.ScheduleDataListReqVO;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.schedule.data.vo.ScheduleDataRespVO;
|
||||
import cn.iocoder.yudao.module.product.convert.schedule.data.ScheduleDataConvert;
|
||||
import cn.iocoder.yudao.module.product.dal.dataobject.schedule.data.ScheduleDataDO;
|
||||
import cn.iocoder.yudao.module.product.service.schedule.data.ScheduleDataService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
|
||||
@Tag(name = "管理后台 - 排班数据")
|
||||
@RestController
|
||||
@RequestMapping("/mes/schedule-data")
|
||||
@Validated
|
||||
public class ScheduleDataController implements BusinessControllerMarker {
|
||||
|
||||
@Resource
|
||||
private ScheduleDataService scheduleDataService;
|
||||
|
||||
@GetMapping("/list")
|
||||
@Operation(summary = "获得排班数据列表")
|
||||
@PreAuthorize("@ss.hasPermission('mes:schedule-data:query')")
|
||||
public CommonResult<List<ScheduleDataRespVO>> getScheduleDataList(ScheduleDataListReqVO reqVO) {
|
||||
List<ScheduleDataDO> scheduleDataList = scheduleDataService.getScheduleDataList(reqVO);
|
||||
return success(ScheduleDataConvert.INSTANCE.convertList(scheduleDataList));
|
||||
}
|
||||
|
||||
@PostMapping("/generate")
|
||||
@Operation(summary = "生成排班数据")
|
||||
@PreAuthorize("@ss.hasPermission('mes:schedule-data:create')")
|
||||
public CommonResult<Boolean> generateScheduleData(@Valid @RequestBody ScheduleDataGenerateReqVO generateReqVO) {
|
||||
scheduleDataService.generateScheduleData(generateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.schedule.data.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY;
|
||||
|
||||
@Schema(description = "管理后台 - 排班数据生成 Request VO")
|
||||
@Data
|
||||
public class ScheduleDataGenerateReqVO {
|
||||
@Schema(description = "排班配置id", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "排班配置id不能为空")
|
||||
private Long scheduleConfigId;
|
||||
|
||||
@Schema(description = "开始时间", example = "2025-09-01")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
|
||||
private LocalDate startTime;
|
||||
|
||||
@Schema(description = "结束时间", example = "2025-09-30")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
|
||||
private LocalDate endTime;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.schedule.data.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY;
|
||||
|
||||
@Schema(description = "管理后台 - 排班数据列表 Request VO")
|
||||
@Data
|
||||
public class ScheduleDataListReqVO {
|
||||
|
||||
@Schema(description = "班组配置id")
|
||||
private Long scheduleConfigId;
|
||||
|
||||
@Schema(description = "开始时间", example = "2025-09-01")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
|
||||
private LocalDate startTime;
|
||||
|
||||
@Schema(description = "结束时间", example = "2025-10-01")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
|
||||
private LocalDate endTime;
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.schedule.data.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY;
|
||||
|
||||
@Schema(description = "管理后台 - 排班数据 Response VO")
|
||||
@Data
|
||||
public class ScheduleDataRespVO {
|
||||
|
||||
@Schema(description = "主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "班组配置id")
|
||||
private Long scheduleConfigId;
|
||||
|
||||
@Schema(description = "班组配置编码")
|
||||
private String scheduleConfigCoding;
|
||||
|
||||
@Schema(description = "排班日期")
|
||||
@JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY)
|
||||
private LocalDate scheduleDate;
|
||||
|
||||
@Schema(description = "班次id")
|
||||
private Long scheduleShiftId;
|
||||
|
||||
@Schema(description = "班组id")
|
||||
private Long scheduleTeamId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.schedule.rule;
|
||||
|
||||
import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.schedule.rule.vo.ScheduleRulePageReqVO;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.schedule.rule.vo.ScheduleRuleRespVO;
|
||||
import cn.iocoder.yudao.module.product.convert.schedule.rule.ScheduleRuleConvert;
|
||||
import cn.iocoder.yudao.module.product.dal.dataobject.schedule.rule.ScheduleRuleDO;
|
||||
import cn.iocoder.yudao.module.product.service.schedule.rule.ScheduleRuleService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.Valid;
|
||||
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 static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
|
||||
@Tag(name = "管理后台 - 排班规则")
|
||||
@RestController
|
||||
@RequestMapping("/mes/schedule-rule")
|
||||
@Validated
|
||||
public class ScheduleRuleController implements BusinessControllerMarker {
|
||||
|
||||
|
||||
@Resource
|
||||
private ScheduleRuleService scheduleRuleService;
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得排班规则")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('mes:schedule-rule:query')")
|
||||
public CommonResult<ScheduleRuleRespVO> getScheduleRule(@RequestParam("id") Long id) {
|
||||
ScheduleRuleDO scheduleRule = scheduleRuleService.getScheduleRule(id);
|
||||
return success(ScheduleRuleConvert.INSTANCE.convert(scheduleRule));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得排班规则分页")
|
||||
@PreAuthorize("@ss.hasPermission('mes:schedule-rule:query')")
|
||||
public CommonResult<PageResult<ScheduleRuleRespVO>> getScheduleRulePage(@Valid ScheduleRulePageReqVO pageReqVO) {
|
||||
PageResult<ScheduleRuleDO> pageResult = scheduleRuleService.getScheduleRulePage(pageReqVO);
|
||||
return success(ScheduleRuleConvert.INSTANCE.convertPage(pageResult));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.schedule.rule.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY;
|
||||
|
||||
@Schema(description = "管理后台 - 排班规则新增Request VO")
|
||||
@Data
|
||||
public class ScheduleRuleCreateReqVO {
|
||||
|
||||
@Schema(description = "排班日期", requiredMode = Schema.RequiredMode.REQUIRED, example = "2025-06-14")
|
||||
@NotNull(message = "排班日期不能为空")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
|
||||
private LocalDate scheduleDate;
|
||||
|
||||
@Schema(description = "班次名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "班次名称不能为空")
|
||||
private String scheduleShiftName;
|
||||
|
||||
@Schema(description = "班组名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "班组名称不能为空")
|
||||
private String scheduleTeamName;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.schedule.rule.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 排班规则分页 Request VO")
|
||||
@Data
|
||||
public class ScheduleRulePageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "班组配置id")
|
||||
private Long scheduleConfigId;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.schedule.rule.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 排班规则 Response VO")
|
||||
@Data
|
||||
public class ScheduleRuleRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "排班日期", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "排班日期不能为空")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime scheduleDate;
|
||||
|
||||
@Schema(description = "班次id", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "班次id不能为空")
|
||||
private Long scheduleShiftId;
|
||||
|
||||
@Schema(description = "班组id", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "班组id不能为空")
|
||||
private Long scheduleTeamId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.schedule.rule.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY;
|
||||
|
||||
@Schema(description = "管理后台 - 排班规则修改Request VO")
|
||||
@Data
|
||||
public class ScheduleRuleUpdateReqVO{
|
||||
@Schema(description = "排班规则主键,修改的项目赋值,新建的项目不赋值")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "排班日期", requiredMode = Schema.RequiredMode.REQUIRED, example = "2025-06-14")
|
||||
@NotNull(message = "排班日期不能为空")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
|
||||
private LocalDate scheduleDate;
|
||||
|
||||
@Schema(description = "班次名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "班次名称不能为空")
|
||||
private String scheduleShiftName;
|
||||
|
||||
@Schema(description = "班组名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "班组名称不能为空")
|
||||
private String scheduleTeamName;
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.schedule.shift;
|
||||
|
||||
import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.schedule.shift.vo.ScheduleShiftPageReqVO;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.schedule.shift.vo.ScheduleShiftRespVO;
|
||||
import cn.iocoder.yudao.module.product.convert.schedule.shift.ScheduleShiftConvert;
|
||||
import cn.iocoder.yudao.module.product.dal.dataobject.schedule.shift.ScheduleShiftDO;
|
||||
import cn.iocoder.yudao.module.product.service.schedule.shift.ScheduleShiftService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.Valid;
|
||||
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 static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
|
||||
@Tag(name = "管理后台 - 排班班次")
|
||||
@RestController
|
||||
@RequestMapping("/mes/schedule-shift")
|
||||
@Validated
|
||||
public class ScheduleShiftController implements BusinessControllerMarker {
|
||||
|
||||
|
||||
@Resource
|
||||
private ScheduleShiftService scheduleShiftService;
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得排班班次")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('mes:schedule-shift:query')")
|
||||
public CommonResult<ScheduleShiftRespVO> getScheduleShift(@RequestParam("id") Long id) {
|
||||
ScheduleShiftDO scheduleShift = scheduleShiftService.getScheduleShift(id);
|
||||
return success(ScheduleShiftConvert.INSTANCE.convert(scheduleShift));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得排班班次分页")
|
||||
@PreAuthorize("@ss.hasPermission('mes:schedule-shift:query')")
|
||||
public CommonResult<PageResult<ScheduleShiftRespVO>> getScheduleShiftPage(@Valid ScheduleShiftPageReqVO pageReqVO) {
|
||||
PageResult<ScheduleShiftDO> pageResult = scheduleShiftService.getScheduleShiftPage(pageReqVO);
|
||||
return success(ScheduleShiftConvert.INSTANCE.convertPage(pageResult));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.schedule.shift.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalTime;
|
||||
|
||||
@Schema(description = "管理后台 - 排班班次新增 Request VO")
|
||||
@Data
|
||||
public class ScheduleShiftCreateReqVO {
|
||||
|
||||
@Schema(description = "班次名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "班次名称不能为空")
|
||||
private String shiftName;
|
||||
|
||||
@Schema(description = "开始时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "08:00:00")
|
||||
@NotNull(message = "开始时间不能为空")
|
||||
private LocalTime beginTime;
|
||||
|
||||
@Schema(description = "结束时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "08:00:00")
|
||||
@NotNull(message = "结束时间不能为空")
|
||||
private LocalTime endTime;
|
||||
|
||||
@Schema(description = "是否跨天", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "是否跨天不能为空")
|
||||
private String crossDay;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.schedule.shift.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 排班班次分页 Request VO")
|
||||
@Data
|
||||
public class ScheduleShiftPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "班组配置id")
|
||||
private Long scheduleConfigId;
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.schedule.shift.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
|
||||
@Schema(description = "管理后台 - 排班班次 Response VO")
|
||||
@Data
|
||||
public class ScheduleShiftRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "班次名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String shiftName;
|
||||
|
||||
@Schema(description = "开始时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@JsonFormat(pattern = "HH:mm:ss", timezone = "GMT+8")
|
||||
private LocalTime beginTime;
|
||||
|
||||
@Schema(description = "结束时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@JsonFormat(pattern = "HH:mm:ss", timezone = "GMT+8")
|
||||
private LocalTime endTime;
|
||||
|
||||
@Schema(description = "是否跨天", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String crossDay;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.schedule.shift.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalTime;
|
||||
|
||||
@Schema(description = "管理后台 - 排班班次修改 Request VO")
|
||||
@Data
|
||||
public class ScheduleShiftUpdateReqVO{
|
||||
|
||||
@Schema(description = "排班班次主键,修改的项目赋值,新建的项目不赋值")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "班次名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "班次名称不能为空")
|
||||
private String shiftName;
|
||||
|
||||
@Schema(description = "开始时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "08:00:00")
|
||||
@NotNull(message = "开始时间不能为空")
|
||||
private LocalTime beginTime;
|
||||
|
||||
@Schema(description = "结束时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "08:00:00")
|
||||
@NotNull(message = "结束时间不能为空")
|
||||
private LocalTime endTime;
|
||||
|
||||
@Schema(description = "是否跨天", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "是否跨天不能为空")
|
||||
private String crossDay;
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.schedule.team;
|
||||
|
||||
import cn.iocoder.yudao.framework.business.interceptor.BusinessControllerMarker;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.schedule.team.vo.ScheduleTeamPageReqVO;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.schedule.team.vo.ScheduleTeamRespVO;
|
||||
import cn.iocoder.yudao.module.product.convert.schedule.team.ScheduleTeamConvert;
|
||||
import cn.iocoder.yudao.module.product.dal.dataobject.schedule.team.ScheduleTeamDO;
|
||||
import cn.iocoder.yudao.module.product.service.schedule.team.ScheduleTeamService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.Valid;
|
||||
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 static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
|
||||
@Tag(name = "管理后台 - 排班班组")
|
||||
@RestController
|
||||
@RequestMapping("/mes/schedule-team")
|
||||
@Validated
|
||||
public class ScheduleTeamController implements BusinessControllerMarker {
|
||||
|
||||
|
||||
@Resource
|
||||
private ScheduleTeamService scheduleTeamService;
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得排班班组")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('mes:schedule-team:query')")
|
||||
public CommonResult<ScheduleTeamRespVO> getScheduleTeam(@RequestParam("id") Long id) {
|
||||
ScheduleTeamDO scheduleTeam = scheduleTeamService.getScheduleTeam(id);
|
||||
return success(ScheduleTeamConvert.INSTANCE.convert(scheduleTeam));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得排班班组分页")
|
||||
@PreAuthorize("@ss.hasPermission('mes:schedule-team:query')")
|
||||
public CommonResult<PageResult<ScheduleTeamRespVO>> getScheduleTeamPage(@Valid ScheduleTeamPageReqVO pageReqVO) {
|
||||
PageResult<ScheduleTeamDO> pageResult = scheduleTeamService.getScheduleTeamPage(pageReqVO);
|
||||
return success(ScheduleTeamConvert.INSTANCE.convertPage(pageResult));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.schedule.team.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 排班班组新增 Request VO")
|
||||
@Data
|
||||
public class ScheduleTeamCreateReqVO{
|
||||
|
||||
@Schema(description = "班组名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "班组名称不能为空")
|
||||
private String teamName;
|
||||
|
||||
@Schema(description = "班组用户", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "班组用户不能为空")
|
||||
private String userId;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.schedule.team.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 排班班组分页 Request VO")
|
||||
@Data
|
||||
public class ScheduleTeamPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "班组配置id")
|
||||
private Long scheduleConfigId;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.schedule.team.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 排班班组 Response VO")
|
||||
@Data
|
||||
public class ScheduleTeamRespVO {
|
||||
|
||||
@Schema(description = "主键")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "班组名称")
|
||||
private String teamName;
|
||||
|
||||
@Schema(description = "班组用户")
|
||||
private String userId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.schedule.team.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
|
||||
@Schema(description = "管理后台 - 排班班组修改 Request VO")
|
||||
@Data
|
||||
public class ScheduleTeamUpdateReqVO {
|
||||
@Schema(description = "排班班组主键,修改的项目赋值,新建的项目不赋值")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "班组名称", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "班组名称不能为空")
|
||||
private String teamName;
|
||||
|
||||
@Schema(description = "班组用户", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotBlank(message = "班组用户不能为空")
|
||||
private String userId;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package cn.iocoder.yudao.module.product.convert.factory.model;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.factory.model.vo.FactoryModeTreeRespVO;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.factory.model.vo.FactoryModelCreateReqVO;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.factory.model.vo.FactoryModelRespVO;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.factory.model.vo.FactoryModelUpdateReqVO;
|
||||
import cn.iocoder.yudao.module.product.dal.dataobject.factory.model.FactoryModelDO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 工厂模型 Convert
|
||||
*/
|
||||
@Mapper
|
||||
public interface FactoryModelConvert {
|
||||
FactoryModelConvert INSTANCE = Mappers.getMapper(FactoryModelConvert.class);
|
||||
|
||||
FactoryModelDO convert(FactoryModelCreateReqVO bean);
|
||||
FactoryModelDO convert(FactoryModelUpdateReqVO bean);
|
||||
FactoryModelRespVO convert(FactoryModelDO bean);
|
||||
List<FactoryModeTreeRespVO> convertList(List<FactoryModelDO> beans);
|
||||
PageResult<FactoryModelRespVO> convertPage(PageResult<FactoryModelDO> page);
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package cn.iocoder.yudao.module.product.convert.schedule.config;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.schedule.config.vo.ScheduleConfigCreateReqVO;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.schedule.config.vo.ScheduleConfigRespVO;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.schedule.config.vo.ScheduleConfigUpdateReqVO;
|
||||
import cn.iocoder.yudao.module.product.dal.dataobject.schedule.config.ScheduleConfigDO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
@Mapper
|
||||
public interface ScheduleConfigConvert {
|
||||
ScheduleConfigConvert INSTANCE = Mappers.getMapper(ScheduleConfigConvert.class);
|
||||
|
||||
ScheduleConfigDO convert(ScheduleConfigCreateReqVO bean);
|
||||
ScheduleConfigDO convert(ScheduleConfigUpdateReqVO bean);
|
||||
ScheduleConfigRespVO convert(ScheduleConfigDO bean);
|
||||
PageResult<ScheduleConfigRespVO> convertPage(PageResult<ScheduleConfigDO> page);
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package cn.iocoder.yudao.module.product.convert.schedule.data;
|
||||
|
||||
import cn.iocoder.yudao.module.product.controller.admin.schedule.data.vo.ScheduleDataRespVO;
|
||||
import cn.iocoder.yudao.module.product.dal.dataobject.schedule.data.ScheduleDataDO;
|
||||
import cn.iocoder.yudao.module.product.dal.dataobject.schedule.rule.ScheduleRuleDO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.Mapping;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface ScheduleDataConvert {
|
||||
ScheduleDataConvert INSTANCE = Mappers.getMapper(ScheduleDataConvert.class);
|
||||
|
||||
ScheduleDataRespVO convert(ScheduleDataDO bean);
|
||||
@Mapping(target="id", ignore = true)
|
||||
ScheduleDataDO convert(ScheduleRuleDO bean);
|
||||
List<ScheduleDataRespVO> convertList(List<ScheduleDataDO> beans);
|
||||
List<ScheduleDataDO> convertListByRule(List<ScheduleRuleDO> beans);
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package cn.iocoder.yudao.module.product.convert.schedule.rule;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.schedule.rule.vo.ScheduleRuleCreateReqVO;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.schedule.rule.vo.ScheduleRuleRespVO;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.schedule.rule.vo.ScheduleRuleUpdateReqVO;
|
||||
import cn.iocoder.yudao.module.product.dal.dataobject.schedule.rule.ScheduleRuleDO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
@Mapper
|
||||
public interface ScheduleRuleConvert {
|
||||
ScheduleRuleConvert INSTANCE = Mappers.getMapper(ScheduleRuleConvert.class);
|
||||
|
||||
ScheduleRuleDO convert(ScheduleRuleCreateReqVO bean);
|
||||
ScheduleRuleDO convert(ScheduleRuleUpdateReqVO bean);
|
||||
ScheduleRuleRespVO convert(ScheduleRuleDO bean);
|
||||
PageResult<ScheduleRuleRespVO> convertPage(PageResult<ScheduleRuleDO> page);
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package cn.iocoder.yudao.module.product.convert.schedule.shift;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.schedule.shift.vo.ScheduleShiftCreateReqVO;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.schedule.shift.vo.ScheduleShiftRespVO;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.schedule.shift.vo.ScheduleShiftUpdateReqVO;
|
||||
import cn.iocoder.yudao.module.product.dal.dataobject.schedule.shift.ScheduleShiftDO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface ScheduleShiftConvert {
|
||||
|
||||
ScheduleShiftConvert INSTANCE = Mappers.getMapper(ScheduleShiftConvert.class);
|
||||
|
||||
ScheduleShiftDO convert(ScheduleShiftCreateReqVO bean);
|
||||
ScheduleShiftDO convert(ScheduleShiftUpdateReqVO bean);
|
||||
ScheduleShiftRespVO convert(ScheduleShiftDO bean);
|
||||
List<ScheduleShiftDO> convertListByCreateReqVO(List<ScheduleShiftCreateReqVO> beans);
|
||||
List<ScheduleShiftDO> convertListByUpdateReqVO(List<ScheduleShiftUpdateReqVO> beans);
|
||||
PageResult<ScheduleShiftRespVO> convertPage(PageResult<ScheduleShiftDO> page);
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package cn.iocoder.yudao.module.product.convert.schedule.team;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.schedule.team.vo.ScheduleTeamCreateReqVO;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.schedule.team.vo.ScheduleTeamRespVO;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.schedule.team.vo.ScheduleTeamUpdateReqVO;
|
||||
import cn.iocoder.yudao.module.product.dal.dataobject.schedule.team.ScheduleTeamDO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface ScheduleTeamConvert {
|
||||
|
||||
ScheduleTeamConvert INSTANCE = Mappers.getMapper(ScheduleTeamConvert.class);
|
||||
|
||||
ScheduleTeamDO convert(ScheduleTeamCreateReqVO bean);
|
||||
|
||||
ScheduleTeamDO convert(ScheduleTeamUpdateReqVO bean);
|
||||
|
||||
ScheduleTeamRespVO convert(ScheduleTeamDO bean);
|
||||
|
||||
List<ScheduleTeamDO> convertListByCreateReqVO(List<ScheduleTeamCreateReqVO> beans);
|
||||
List<ScheduleTeamDO> convertListByUpdateReqVO(List<ScheduleTeamUpdateReqVO> beans);
|
||||
|
||||
PageResult<ScheduleTeamRespVO> convertPage(PageResult<ScheduleTeamDO> page);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
package cn.iocoder.yudao.module.product.dal.dataobject.factory.model;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.*;
|
||||
|
||||
/**
|
||||
* 工厂模型 DO
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@TableName("MES_FACT_MDL")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class FactoryModelDO extends BusinessBaseDO {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* 父级id
|
||||
*/
|
||||
@TableField("PRN_ID")
|
||||
private Long parentId;
|
||||
/**
|
||||
* 父级编码
|
||||
*/
|
||||
@TableField("PRN_CDG")
|
||||
private String parentCoding;
|
||||
/**
|
||||
* 节点编码
|
||||
*/
|
||||
@TableField("NDE_CDG")
|
||||
private String nodeCoding;
|
||||
/**
|
||||
* 节点名称
|
||||
*/
|
||||
@TableField("NDE_NAME")
|
||||
private String nodeName;
|
||||
/**
|
||||
* 节点类型
|
||||
*/
|
||||
@TableField("NDE_TP")
|
||||
private String nodeType;
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@TableField("SRT")
|
||||
private Integer sort;
|
||||
/**
|
||||
* ERP工艺路线编码
|
||||
*/
|
||||
@TableField("ERP_PRCS_RUT_CDG")
|
||||
private String erpProcessRouteCoding;
|
||||
/**
|
||||
* ERP工序编码
|
||||
*/
|
||||
@TableField("ERP_PRCS_CDG")
|
||||
private String erpProcessCoding;
|
||||
/**
|
||||
* ERP工序名称
|
||||
*/
|
||||
@TableField("ERP_PRCS_NAME")
|
||||
private String erpProcessName;
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@TableField("NDE_STS")
|
||||
private String nodeStatus;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package cn.iocoder.yudao.module.product.dal.dataobject.plan.template;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.*;
|
||||
/**
|
||||
* 生产计划模板 DO
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@TableName("mes_pln_tmpl")
|
||||
@KeySequence("mes_pln_tmpl_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class PlanTemplateDO extends BusinessBaseDO {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* 模板编码
|
||||
*/
|
||||
@TableField("TMPL_CDG")
|
||||
private String templateCoding;
|
||||
/**
|
||||
* 模板名称
|
||||
*/
|
||||
@TableField("TMPL_NAME")
|
||||
private String templateName;
|
||||
/**
|
||||
* 模板类型
|
||||
*/
|
||||
@TableField("PLN_TP")
|
||||
private String planType;
|
||||
/**
|
||||
* 公司编码
|
||||
*/
|
||||
@TableField("BLG_CPN_CDG")
|
||||
private String belongCompanyCoding;
|
||||
/**
|
||||
* 公司名称
|
||||
*/
|
||||
@TableField("BLG_CPN_NAME")
|
||||
private String belongCompanyName;
|
||||
/**
|
||||
* 版本
|
||||
*/
|
||||
@TableField("TMPL_VER")
|
||||
private Integer templateVersion;
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@TableField("TMPL_STS")
|
||||
private String templateStatus;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package cn.iocoder.yudao.module.product.dal.dataobject.plan.templatecolumn;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.*;
|
||||
/**
|
||||
* 生产计划模板动态列 DO
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@TableName("mes_pln_tmpl_coln")
|
||||
@KeySequence("mes_pln_tmpl_coln_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class PlanTemplateColumnDO extends BusinessBaseDO {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* 模板id
|
||||
*/
|
||||
@TableField("PLN_TMPL_ID")
|
||||
private Long planTemplateId;
|
||||
/**
|
||||
* 模板编码
|
||||
*/
|
||||
@TableField("PLN_TMPL_CDG")
|
||||
private String planTemplateCoding;
|
||||
/**
|
||||
* 列编码
|
||||
*/
|
||||
@TableField("COLN_CDG")
|
||||
private String columnCoding;
|
||||
/**
|
||||
* 列名称
|
||||
*/
|
||||
@TableField("COLN_NAME")
|
||||
private String columnName;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package cn.iocoder.yudao.module.product.dal.dataobject.plan.templatecolumndata;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.*;
|
||||
/**
|
||||
* 生产计划模板动态列数据 DO
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@TableName("mes_pln_tmpl_coln_dat")
|
||||
@KeySequence("mes_pln_tmpl_coln_dat_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class PlanTemplateColumnDataDO extends BusinessBaseDO {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* 模板id
|
||||
*/
|
||||
@TableField("PLN_TMPL_ID")
|
||||
private Long planTemplateId;
|
||||
/**
|
||||
* 模板动态列id
|
||||
*/
|
||||
@TableField("PLN_TMPL_COLN_ID")
|
||||
private Long planTemplateColumnId;
|
||||
/**
|
||||
* 模板明细id
|
||||
*/
|
||||
@TableField("PLN_TMPL_ITM_ID")
|
||||
private Long planTemplateItemId;
|
||||
/**
|
||||
* 动态列编码
|
||||
*/
|
||||
@TableField("COLN_CDG")
|
||||
private String columnCoding;
|
||||
/**
|
||||
* 动态列值
|
||||
*/
|
||||
@TableField("COLN_VAL")
|
||||
private String columnValue;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
package cn.iocoder.yudao.module.product.dal.dataobject.plan.templateitem;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.*;
|
||||
/**
|
||||
* 生产计划模板项目 DO
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@TableName("mes_pln_tmpl_itm")
|
||||
@KeySequence("mes_pln_tmpl_itm_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class PlanTemplateItemDO extends BusinessBaseDO {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* 模板id
|
||||
*/
|
||||
@TableField("PLN_TMPL_ID")
|
||||
private Long planTemplateId;
|
||||
/**
|
||||
* 模板编码
|
||||
*/
|
||||
@TableField("PLN_TMPL_CDG")
|
||||
private String planTemplateCoding;
|
||||
/**
|
||||
* 计量单位
|
||||
*/
|
||||
@TableField("UNT")
|
||||
private String unit;
|
||||
/**
|
||||
* 是否生成订单
|
||||
*/
|
||||
@TableField("GEN_ORD")
|
||||
private String generateOrder;
|
||||
/**
|
||||
* 录入方式
|
||||
*/
|
||||
@TableField("WR_TP")
|
||||
private String writeType;
|
||||
/**
|
||||
* 物料编码
|
||||
*/
|
||||
@TableField("MTRL_CDG")
|
||||
private String materialCoding;
|
||||
/**
|
||||
* 物料名称
|
||||
*/
|
||||
@TableField("MTRL_NAME")
|
||||
private String materialName;
|
||||
/**
|
||||
* 指标id
|
||||
*/
|
||||
@TableField("IND_ID")
|
||||
private Long indicatorId;
|
||||
/**
|
||||
* 指标编码
|
||||
*/
|
||||
@TableField("IND_CDG")
|
||||
private String indicatorCoding;
|
||||
/**
|
||||
* 所属公司
|
||||
*/
|
||||
@TableField("BLG_CPN_CDG")
|
||||
private String belongCompanyCoding;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package cn.iocoder.yudao.module.product.dal.dataobject.schedule.config;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.*;
|
||||
|
||||
/**
|
||||
* 排班配置 DO
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@TableName("mes_schd_cfg")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class ScheduleConfigDO extends BusinessBaseDO {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* 工厂模型id
|
||||
*/
|
||||
@TableField("FACT_MDL_ID")
|
||||
private Long factoryModelId;
|
||||
/**
|
||||
* 工厂模型编码
|
||||
*/
|
||||
@TableField("FACT_MDL_CDG")
|
||||
private String factoryModelCoding;
|
||||
/**
|
||||
* 排班编码
|
||||
*/
|
||||
@TableField("CFG_CDG")
|
||||
private String configCoding;
|
||||
/**
|
||||
* 排班名称
|
||||
*/
|
||||
@TableField("CFG_NAME")
|
||||
private String configName;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package cn.iocoder.yudao.module.product.dal.dataobject.schedule.data;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* 排班数据 DO
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@TableName("mes_schd_dat")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class ScheduleDataDO extends BusinessBaseDO {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* 班组配置id
|
||||
*/
|
||||
@TableField("SCHD_CFG_ID")
|
||||
private Long scheduleConfigId;
|
||||
/**
|
||||
* 班组配置编码
|
||||
*/
|
||||
@TableField("SCHD_CFG_CDG")
|
||||
private String scheduleConfigCoding;
|
||||
/**
|
||||
* 排班日期
|
||||
*/
|
||||
@TableField("SCHD_DT")
|
||||
private LocalDate scheduleDate;
|
||||
/**
|
||||
* 班次id
|
||||
*/
|
||||
@TableField("SCHD_SHFT_ID")
|
||||
private Long scheduleShiftId;
|
||||
/**
|
||||
* 班组id
|
||||
*/
|
||||
@TableField("SCHD_TAM_ID")
|
||||
private Long scheduleTeamId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package cn.iocoder.yudao.module.product.dal.dataobject.schedule.rule;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* 排班规则 DO
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@TableName("mes_schd_rul")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class ScheduleRuleDO extends BusinessBaseDO {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* 班组配置id
|
||||
*/
|
||||
@TableField("SCHD_CFG_ID")
|
||||
private Long scheduleConfigId;
|
||||
/**
|
||||
* 班组配置编码
|
||||
*/
|
||||
@TableField("SCHD_CFG_CDG")
|
||||
private String scheduleConfigCoding;
|
||||
/**
|
||||
* 排班日期
|
||||
*/
|
||||
@TableField("SCHD_DT")
|
||||
private LocalDate scheduleDate;
|
||||
/**
|
||||
* 班次id
|
||||
*/
|
||||
@TableField("SCHD_SHFT_ID")
|
||||
private Long scheduleShiftId;
|
||||
/**
|
||||
* 班组id
|
||||
*/
|
||||
@TableField("SCHD_TAM_ID")
|
||||
private Long scheduleTeamId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package cn.iocoder.yudao.module.product.dal.dataobject.schedule.shift;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalTime;
|
||||
|
||||
/**
|
||||
* 排班班次 DO
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@TableName("mes_schd_shft")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class ScheduleShiftDO extends BusinessBaseDO {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* 班组配置id
|
||||
*/
|
||||
@TableField("SCHD_CFG_ID")
|
||||
private Long scheduleConfigId;
|
||||
/**
|
||||
* 班组配置编码
|
||||
*/
|
||||
@TableField("SCHD_CFG_CDG")
|
||||
private String scheduleConfigCoding;
|
||||
/**
|
||||
* 班次名称
|
||||
*/
|
||||
@TableField("SHFT_NAME")
|
||||
private String shiftName;
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
@TableField("BGN_TM")
|
||||
private LocalTime beginTime;
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
@TableField("END_TM")
|
||||
private LocalTime endTime;
|
||||
/**
|
||||
* 是否跨天
|
||||
*/
|
||||
@TableField("CRS_DY")
|
||||
private String crossDay;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package cn.iocoder.yudao.module.product.dal.dataobject.schedule.team;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.*;
|
||||
|
||||
/**
|
||||
* 排班班组 DO
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@TableName("mes_schd_tam")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class ScheduleTeamDO extends BusinessBaseDO {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
/**
|
||||
* 班组配置id
|
||||
*/
|
||||
@TableField("SCHD_CFG_ID")
|
||||
private Long scheduleConfigId;
|
||||
/**
|
||||
* 班组配置编码
|
||||
*/
|
||||
@TableField("SCHD_CFG_CDG")
|
||||
private String scheduleConfigCoding;
|
||||
/**
|
||||
* 班组名称
|
||||
*/
|
||||
@TableField("TAM_NAME")
|
||||
private String teamName;
|
||||
/**
|
||||
* 班组用户
|
||||
*/
|
||||
@TableField("USER_ID")
|
||||
private String userId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package cn.iocoder.yudao.module.product.dal.mysql.factory.model;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.factory.model.vo.FactoryModelPageReqVO;
|
||||
import cn.iocoder.yudao.module.product.dal.dataobject.factory.model.FactoryModelDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 工厂模型 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface FactoryModelMapper extends BaseMapperX<FactoryModelDO> {
|
||||
|
||||
default PageResult<FactoryModelDO> selectPage(FactoryModelPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<FactoryModelDO>()
|
||||
.eqIfPresent(FactoryModelDO::getParentId, reqVO.getParentId())
|
||||
.likeIfPresent(FactoryModelDO::getNodeCoding, reqVO.getNodeCoding())
|
||||
.likeIfPresent(FactoryModelDO::getNodeName, reqVO.getNodeName())
|
||||
.eqIfPresent(FactoryModelDO::getNodeType, reqVO.getNodeType())
|
||||
.likeIfPresent(FactoryModelDO::getErpProcessCoding, reqVO.getErpProcessCoding())
|
||||
.likeIfPresent(FactoryModelDO::getErpProcessName, reqVO.getErpProcessName())
|
||||
.orderByAsc(FactoryModelDO::getSort)
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package cn.iocoder.yudao.module.product.dal.mysql.plan.template;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.product.dal.dataobject.plan.template.PlanTemplateDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.plan.template.vo.*;
|
||||
|
||||
/**
|
||||
* 生产计划模板 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface PlanTemplateMapper extends BaseMapperX<PlanTemplateDO> {
|
||||
|
||||
default PageResult<PlanTemplateDO> selectPage(PlanTemplatePageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<PlanTemplateDO>()
|
||||
.eqIfPresent(PlanTemplateDO::getTemplateCoding, reqVO.getTemplateCoding())
|
||||
.likeIfPresent(PlanTemplateDO::getTemplateName, reqVO.getTemplateName())
|
||||
.eqIfPresent(PlanTemplateDO::getPlanType, reqVO.getPlanType())
|
||||
.eqIfPresent(PlanTemplateDO::getBelongCompanyCoding, reqVO.getBelongCompanyCoding())
|
||||
.likeIfPresent(PlanTemplateDO::getBelongCompanyName, reqVO.getBelongCompanyName())
|
||||
.eqIfPresent(PlanTemplateDO::getTemplateVersion, reqVO.getTemplateVersion())
|
||||
.eqIfPresent(PlanTemplateDO::getTemplateStatus, reqVO.getTemplateStatus())
|
||||
.betweenIfPresent(PlanTemplateDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(PlanTemplateDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package cn.iocoder.yudao.module.product.dal.mysql.plan.templatecolumn;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.product.dal.dataobject.plan.templatecolumn.PlanTemplateColumnDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.plan.templatecolumn.vo.*;
|
||||
|
||||
/**
|
||||
* 生产计划模板动态列 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface PlanTemplateColumnMapper extends BaseMapperX<PlanTemplateColumnDO> {
|
||||
|
||||
default PageResult<PlanTemplateColumnDO> selectPage(PlanTemplateColumnPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<PlanTemplateColumnDO>()
|
||||
.eqIfPresent(PlanTemplateColumnDO::getPlanTemplateId, reqVO.getPlanTemplateId())
|
||||
.orderByDesc(PlanTemplateColumnDO::getId));
|
||||
}
|
||||
|
||||
default void deleteByTemplateId(Long templateId) {
|
||||
delete(new LambdaQueryWrapperX<PlanTemplateColumnDO>()
|
||||
.eq(PlanTemplateColumnDO::getPlanTemplateId, templateId));
|
||||
}
|
||||
|
||||
default void deleteByTemplateIds(List<Long> templateIds) {
|
||||
delete(new LambdaQueryWrapperX<PlanTemplateColumnDO>()
|
||||
.in(PlanTemplateColumnDO::getPlanTemplateId, templateIds));
|
||||
}
|
||||
|
||||
default List<PlanTemplateColumnDO> selectByTemplateId(Long templateId) {
|
||||
return selectList(new LambdaQueryWrapperX<PlanTemplateColumnDO>()
|
||||
.eq(PlanTemplateColumnDO::getPlanTemplateId, templateId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package cn.iocoder.yudao.module.product.dal.mysql.plan.templatecolumndata;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.product.dal.dataobject.plan.templatecolumndata.PlanTemplateColumnDataDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.plan.templatecolumndata.vo.*;
|
||||
|
||||
/**
|
||||
* 生产计划模板动态列数据 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface PlanTemplateColumnDataMapper extends BaseMapperX<PlanTemplateColumnDataDO> {
|
||||
|
||||
default PageResult<PlanTemplateColumnDataDO> selectPage(PlanTemplateColumnDataPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<PlanTemplateColumnDataDO>()
|
||||
.eqIfPresent(PlanTemplateColumnDataDO::getPlanTemplateColumnId, reqVO.getPlanTemplateColumnId())
|
||||
.eqIfPresent(PlanTemplateColumnDataDO::getPlanTemplateItemId, reqVO.getPlanTemplateItemId())
|
||||
.orderByDesc(PlanTemplateColumnDataDO::getId));
|
||||
}
|
||||
|
||||
default void deleteByTemplateId(Long templateId) {
|
||||
delete(new LambdaQueryWrapperX<PlanTemplateColumnDataDO>()
|
||||
.eq(PlanTemplateColumnDataDO::getPlanTemplateId, templateId));
|
||||
}
|
||||
|
||||
default void deleteByTemplateIds(List<Long> templateIds) {
|
||||
delete(new LambdaQueryWrapperX<PlanTemplateColumnDataDO>()
|
||||
.in(PlanTemplateColumnDataDO::getPlanTemplateId, templateIds));
|
||||
}
|
||||
|
||||
default void deleteByTemplateColumnId(Long templateColumnId) {
|
||||
delete(new LambdaQueryWrapperX<PlanTemplateColumnDataDO>()
|
||||
.eq(PlanTemplateColumnDataDO::getPlanTemplateId, templateColumnId));
|
||||
}
|
||||
|
||||
default void deleteByTemplateColumnIds(List<Long> templateColumnIds) {
|
||||
delete(new LambdaQueryWrapperX<PlanTemplateColumnDataDO>()
|
||||
.in(PlanTemplateColumnDataDO::getPlanTemplateColumnId, templateColumnIds));
|
||||
}
|
||||
|
||||
default void deleteByTemplateItemId(Long templateItemId) {
|
||||
delete(new LambdaQueryWrapperX<PlanTemplateColumnDataDO>()
|
||||
.eq(PlanTemplateColumnDataDO::getPlanTemplateItemId, templateItemId));
|
||||
}
|
||||
|
||||
default void deleteByTemplateItemIds(List<Long> templateItemIds) {
|
||||
delete(new LambdaQueryWrapperX<PlanTemplateColumnDataDO>()
|
||||
.in(PlanTemplateColumnDataDO::getPlanTemplateItemId, templateItemIds));
|
||||
}
|
||||
|
||||
default List<PlanTemplateColumnDataDO> selectByTemplateId(Long templateId) {
|
||||
return selectList(new LambdaQueryWrapperX<PlanTemplateColumnDataDO>()
|
||||
.eq(PlanTemplateColumnDataDO::getPlanTemplateId, templateId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package cn.iocoder.yudao.module.product.dal.mysql.plan.templateitem;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.product.dal.dataobject.plan.templateitem.PlanTemplateItemDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.plan.templateitem.vo.*;
|
||||
|
||||
/**
|
||||
* 生产计划模板项目 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface PlanTemplateItemMapper extends BaseMapperX<PlanTemplateItemDO> {
|
||||
|
||||
default PageResult<PlanTemplateItemDO> selectPage(PlanTemplateItemPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<PlanTemplateItemDO>()
|
||||
.eqIfPresent(PlanTemplateItemDO::getPlanTemplateId, reqVO.getPlanTemplateId())
|
||||
.orderByDesc(PlanTemplateItemDO::getId));
|
||||
}
|
||||
|
||||
default void deleteByTemplateId(Long templateId){
|
||||
delete(new LambdaQueryWrapperX<PlanTemplateItemDO>()
|
||||
.eq(PlanTemplateItemDO::getPlanTemplateId, templateId));
|
||||
}
|
||||
|
||||
default void deleteByTemplateIds(List<Long> templateIds){
|
||||
delete(new LambdaQueryWrapperX<PlanTemplateItemDO>()
|
||||
.in(PlanTemplateItemDO::getPlanTemplateId, templateIds));
|
||||
}
|
||||
|
||||
default List<PlanTemplateItemDO> selectByTemplateId(Long templateId) {
|
||||
return selectList(new LambdaQueryWrapperX<PlanTemplateItemDO>()
|
||||
.eq(PlanTemplateItemDO::getPlanTemplateId, templateId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package cn.iocoder.yudao.module.product.dal.mysql.schedule.config;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.module.product.controller.admin.schedule.config.vo.ScheduleConfigPageReqVO;
|
||||
import cn.iocoder.yudao.module.product.dal.dataobject.schedule.config.ScheduleConfigDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 排班配置 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface ScheduleConfigMapper extends BaseMapperX<ScheduleConfigDO> {
|
||||
|
||||
default PageResult<ScheduleConfigDO> selectPage(ScheduleConfigPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<ScheduleConfigDO>()
|
||||
.eqIfPresent(ScheduleConfigDO::getFactoryModelId, reqVO.getFactoryModelId())
|
||||
.likeIfPresent(ScheduleConfigDO::getFactoryModelCoding, reqVO.getFactoryModelCoding())
|
||||
.likeIfPresent(ScheduleConfigDO::getConfigCoding, reqVO.getConfigCoding())
|
||||
.likeIfPresent(ScheduleConfigDO::getConfigName, reqVO.getConfigName())
|
||||
.orderByDesc(ScheduleConfigDO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package cn.iocoder.yudao.module.product.dal.mysql.schedule.data;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.product.dal.dataobject.schedule.data.ScheduleDataDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 排班数据 Mapper
|
||||
*
|
||||
* @author 后台管理
|
||||
*/
|
||||
@Mapper
|
||||
public interface ScheduleDataMapper extends BaseMapperX<ScheduleDataDO> {
|
||||
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user