Merge remote-tracking branch 'origin/dev' into test
This commit is contained in:
@@ -65,7 +65,7 @@ public interface ErrorCodeConstants {
|
|||||||
ErrorCode PROCESSING_INFOMATION_OPERATION_NOT_EXISTS = new ErrorCode(1_027_101_006, "工艺工序不存在");
|
ErrorCode PROCESSING_INFOMATION_OPERATION_NOT_EXISTS = new ErrorCode(1_027_101_006, "工艺工序不存在");
|
||||||
ErrorCode PROCESSING_OPERATION_NOT_EXISTS = new ErrorCode(1_027_101_007, "工序不存在");
|
ErrorCode PROCESSING_OPERATION_NOT_EXISTS = new ErrorCode(1_027_101_007, "工序不存在");
|
||||||
ErrorCode PROCESSING_OPERATION_MATERIAL_NOT_EXISTS = new ErrorCode(1_027_101_008, "工艺工序物料不存在");
|
ErrorCode PROCESSING_OPERATION_MATERIAL_NOT_EXISTS = new ErrorCode(1_027_101_008, "工艺工序物料不存在");
|
||||||
|
ErrorCode PLAN_DATE_NOT_EXISTS = new ErrorCode(1_027_101_009, "计划数据不存在");
|
||||||
// ========== 主数据同步 ==========
|
// ========== 主数据同步 ==========
|
||||||
ErrorCode MASTER_DATA_SYNC_DISABLED = new ErrorCode(1_027_900_001, "主数据同步功能已禁用");
|
ErrorCode MASTER_DATA_SYNC_DISABLED = new ErrorCode(1_027_900_001, "主数据同步功能已禁用");
|
||||||
ErrorCode MASTER_DATA_SYNC_BATCH_SIZE_TOO_LARGE = new ErrorCode(1_027_900_002, "最大批次不得超过 1000");
|
ErrorCode MASTER_DATA_SYNC_BATCH_SIZE_TOO_LARGE = new ErrorCode(1_027_900_002, "最大批次不得超过 1000");
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package com.zt.plat.module.base.enums;
|
||||||
|
|
||||||
|
public class PlanConstants {
|
||||||
|
private PlanConstants() {
|
||||||
|
}
|
||||||
|
public static final Long ROOT_PARENT_ID = 0L;
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,78 @@
|
|||||||
|
package com.zt.plat.module.base.controller.admin.plandate.vo;
|
||||||
|
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import com.zt.plat.framework.common.pojo.PageParam;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import static com.zt.plat.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 计划数据分页 Request VO")
|
||||||
|
@Data
|
||||||
|
public class PlanDatePageReqVO extends PageParam {
|
||||||
|
|
||||||
|
@Schema(description = "计划名称", example = "王五")
|
||||||
|
private String planName;
|
||||||
|
|
||||||
|
@Schema(description = "计划编码")
|
||||||
|
private String planCoding;
|
||||||
|
|
||||||
|
@Schema(description = "父级ID", example = "6059")
|
||||||
|
private Long parentId;
|
||||||
|
|
||||||
|
@Schema(description = "年份")
|
||||||
|
private String year;
|
||||||
|
|
||||||
|
@Schema(description = "初始值")
|
||||||
|
private BigDecimal initialValue;
|
||||||
|
|
||||||
|
@Schema(description = "平均值")
|
||||||
|
private BigDecimal averageValue;
|
||||||
|
|
||||||
|
@Schema(description = "合计值")
|
||||||
|
private BigDecimal sumValue;
|
||||||
|
|
||||||
|
@Schema(description = "一月")
|
||||||
|
private BigDecimal january;
|
||||||
|
|
||||||
|
@Schema(description = "二月")
|
||||||
|
private BigDecimal february;
|
||||||
|
|
||||||
|
@Schema(description = "三月")
|
||||||
|
private BigDecimal march;
|
||||||
|
|
||||||
|
@Schema(description = "四月")
|
||||||
|
private BigDecimal april;
|
||||||
|
|
||||||
|
@Schema(description = "五月")
|
||||||
|
private BigDecimal may;
|
||||||
|
|
||||||
|
@Schema(description = "六月")
|
||||||
|
private BigDecimal june;
|
||||||
|
|
||||||
|
@Schema(description = "七月")
|
||||||
|
private BigDecimal july;
|
||||||
|
|
||||||
|
@Schema(description = "八月")
|
||||||
|
private BigDecimal august;
|
||||||
|
|
||||||
|
@Schema(description = "九月")
|
||||||
|
private BigDecimal september;
|
||||||
|
|
||||||
|
@Schema(description = "十月")
|
||||||
|
private BigDecimal october;
|
||||||
|
|
||||||
|
@Schema(description = "十一月")
|
||||||
|
private BigDecimal november;
|
||||||
|
|
||||||
|
@Schema(description = "十二月")
|
||||||
|
private BigDecimal december;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间")
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
private LocalDateTime[] createTime;
|
||||||
|
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,78 @@
|
|||||||
|
package com.zt.plat.module.base.controller.admin.plandate.vo;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 计划数据新增/修改 Request VO")
|
||||||
|
@Data
|
||||||
|
public class PlanDateSaveReqVO {
|
||||||
|
|
||||||
|
@Schema(description = "主键 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "10584")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "计划名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
|
||||||
|
@NotEmpty(message = "计划名称不能为空")
|
||||||
|
private String planName;
|
||||||
|
|
||||||
|
@Schema(description = "计划编码", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotEmpty(message = "计划编码不能为空")
|
||||||
|
private String planCoding;
|
||||||
|
|
||||||
|
@Schema(description = "父级ID", example = "6059")
|
||||||
|
private Long parentId;
|
||||||
|
|
||||||
|
@Schema(description = "年份")
|
||||||
|
private String year;
|
||||||
|
|
||||||
|
@Schema(description = "初始值")
|
||||||
|
private BigDecimal initialValue;
|
||||||
|
|
||||||
|
@Schema(description = "平均值")
|
||||||
|
private BigDecimal averageValue;
|
||||||
|
|
||||||
|
@Schema(description = "合计值")
|
||||||
|
private BigDecimal sumValue;
|
||||||
|
|
||||||
|
@Schema(description = "一月")
|
||||||
|
private BigDecimal january;
|
||||||
|
|
||||||
|
@Schema(description = "二月")
|
||||||
|
private BigDecimal february;
|
||||||
|
|
||||||
|
@Schema(description = "三月")
|
||||||
|
private BigDecimal march;
|
||||||
|
|
||||||
|
@Schema(description = "四月")
|
||||||
|
private BigDecimal april;
|
||||||
|
|
||||||
|
@Schema(description = "五月")
|
||||||
|
private BigDecimal may;
|
||||||
|
|
||||||
|
@Schema(description = "六月")
|
||||||
|
private BigDecimal june;
|
||||||
|
|
||||||
|
@Schema(description = "七月")
|
||||||
|
private BigDecimal july;
|
||||||
|
|
||||||
|
@Schema(description = "八月")
|
||||||
|
private BigDecimal august;
|
||||||
|
|
||||||
|
@Schema(description = "九月")
|
||||||
|
private BigDecimal september;
|
||||||
|
|
||||||
|
@Schema(description = "十月")
|
||||||
|
private BigDecimal october;
|
||||||
|
|
||||||
|
@Schema(description = "十一月")
|
||||||
|
private BigDecimal november;
|
||||||
|
|
||||||
|
@Schema(description = "十二月")
|
||||||
|
private BigDecimal december;
|
||||||
|
|
||||||
|
@Schema(description = "子节点")
|
||||||
|
private List<PlanDateSaveReqVO> children;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
package com.zt.plat.module.base.dal.dao.plandate;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
import com.zt.plat.framework.common.pojo.PageResult;
|
||||||
|
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||||
|
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
|
||||||
|
|
||||||
|
import com.zt.plat.module.base.controller.admin.plandate.vo.PlanDatePageReqVO;
|
||||||
|
import com.zt.plat.module.base.dal.dataobject.plandate.PlanDateDO;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划数据 Mapper
|
||||||
|
*
|
||||||
|
* @author 后台管理-1
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface PlanDateMapper extends BaseMapperX<PlanDateDO> {
|
||||||
|
|
||||||
|
default PageResult<PlanDateDO> selectPage(PlanDatePageReqVO reqVO) {
|
||||||
|
return selectPage(reqVO, new LambdaQueryWrapperX<PlanDateDO>()
|
||||||
|
.likeIfPresent(PlanDateDO::getPlanName, reqVO.getPlanName())
|
||||||
|
.eqIfPresent(PlanDateDO::getPlanCoding, reqVO.getPlanCoding())
|
||||||
|
.eqIfPresent(PlanDateDO::getParentId, reqVO.getParentId())
|
||||||
|
.eqIfPresent(PlanDateDO::getYear, reqVO.getYear())
|
||||||
|
.eqIfPresent(PlanDateDO::getInitialValue, reqVO.getInitialValue())
|
||||||
|
.eqIfPresent(PlanDateDO::getAverageValue, reqVO.getAverageValue())
|
||||||
|
.eqIfPresent(PlanDateDO::getSumValue, reqVO.getSumValue())
|
||||||
|
.eqIfPresent(PlanDateDO::getJanuary, reqVO.getJanuary())
|
||||||
|
.eqIfPresent(PlanDateDO::getFebruary, reqVO.getFebruary())
|
||||||
|
.eqIfPresent(PlanDateDO::getMarch, reqVO.getMarch())
|
||||||
|
.eqIfPresent(PlanDateDO::getApril, reqVO.getApril())
|
||||||
|
.eqIfPresent(PlanDateDO::getMay, reqVO.getMay())
|
||||||
|
.eqIfPresent(PlanDateDO::getJune, reqVO.getJune())
|
||||||
|
.eqIfPresent(PlanDateDO::getJuly, reqVO.getJuly())
|
||||||
|
.eqIfPresent(PlanDateDO::getAugust, reqVO.getAugust())
|
||||||
|
.eqIfPresent(PlanDateDO::getSeptember, reqVO.getSeptember())
|
||||||
|
.eqIfPresent(PlanDateDO::getOctober, reqVO.getOctober())
|
||||||
|
.eqIfPresent(PlanDateDO::getNovember, reqVO.getNovember())
|
||||||
|
.eqIfPresent(PlanDateDO::getDecember, reqVO.getDecember())
|
||||||
|
.betweenIfPresent(PlanDateDO::getCreateTime, reqVO.getCreateTime())
|
||||||
|
.orderByDesc(PlanDateDO::getId));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,78 @@
|
|||||||
|
package com.zt.plat.module.base.service.plandate;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
import com.zt.plat.module.base.controller.admin.plandate.vo.PlanDatePageReqVO;
|
||||||
|
import com.zt.plat.module.base.controller.admin.plandate.vo.PlanDateRespVO;
|
||||||
|
import com.zt.plat.module.base.controller.admin.plandate.vo.PlanDateSaveReqVO;
|
||||||
|
import com.zt.plat.module.base.dal.dataobject.plandate.PlanDateDO;
|
||||||
|
import jakarta.validation.*;
|
||||||
|
|
||||||
|
import com.zt.plat.framework.common.pojo.PageResult;
|
||||||
|
import com.zt.plat.framework.common.pojo.PageParam;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划数据 Service 接口
|
||||||
|
*
|
||||||
|
* @author 后台管理-1
|
||||||
|
*/
|
||||||
|
public interface PlanDateService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建计划数据
|
||||||
|
*
|
||||||
|
* @param createReqVO 创建信息
|
||||||
|
* @return 编号
|
||||||
|
*/
|
||||||
|
PlanDateRespVO createPlanDate(@Valid PlanDateSaveReqVO createReqVO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新计划数据
|
||||||
|
*
|
||||||
|
* @param updateReqVO 更新信息
|
||||||
|
*/
|
||||||
|
void updatePlanDate(@Valid PlanDateSaveReqVO updateReqVO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除计划数据
|
||||||
|
*
|
||||||
|
* @param id 编号
|
||||||
|
*/
|
||||||
|
void deletePlanDate(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除计划数据
|
||||||
|
*
|
||||||
|
* @param ids 编号
|
||||||
|
*/
|
||||||
|
void deletePlanDateListByIds(List<Long> ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得计划数据
|
||||||
|
*
|
||||||
|
* @param id 编号
|
||||||
|
* @return 计划数据
|
||||||
|
*/
|
||||||
|
PlanDateDO getPlanDate(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得计划数据分页
|
||||||
|
*
|
||||||
|
* @param pageReqVO 分页查询
|
||||||
|
* @return 计划数据分页
|
||||||
|
*/
|
||||||
|
PageResult<PlanDateDO> getPlanDatePage(PlanDatePageReqVO pageReqVO);
|
||||||
|
/**
|
||||||
|
* 创建计划数据
|
||||||
|
*
|
||||||
|
* @param createReqVO 创建信息
|
||||||
|
* @return 编号
|
||||||
|
*/
|
||||||
|
PlanDateRespVO createPlanDateWithChildren(PlanDateSaveReqVO createReqVO);
|
||||||
|
/**
|
||||||
|
* 获得计划数据树
|
||||||
|
*
|
||||||
|
* @return 计划数据树
|
||||||
|
*/
|
||||||
|
List<PlanDateRespVO> listPlanDateTree();
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user