Compare commits

..

No commits in common. 'master' and 'release_1.3.0' have entirely different histories.

@ -17,9 +17,6 @@ public final class PageResult<T> implements Serializable {
@Schema(description = "总量", requiredMode = Schema.RequiredMode.REQUIRED)
private Long total;
@Schema(description = "总页数")
private Integer totalPages;
public PageResult() {
}
@ -28,12 +25,6 @@ public final class PageResult<T> implements Serializable {
this.total = total;
}
public PageResult(List<T> list, Long total, Integer totalPages) {
this.list = list;
this.total = total;
this.totalPages = totalPages;
}
public PageResult(Long total) {
this.list = new ArrayList<>();
this.total = total;

@ -31,7 +31,7 @@ public class BeanUtils {
if (source == null) {
return null;
}
return new PageResult<>(toBean(source.getList(), targetType), source.getTotal(), source.getTotalPages());
return new PageResult<>(toBean(source.getList(), targetType), source.getTotal());
}
}
}

@ -20,12 +20,36 @@ public class BannerApplicationRunner implements ApplicationRunner {
public void run(ApplicationArguments args) {
ThreadUtil.execute(() -> {
ThreadUtil.sleep(1, TimeUnit.SECONDS); // 延迟 1 秒,保证输出到结尾
log.info("\n----------------------------------------------------------\n" +
"项目启动成功!\n" +
"\n" +
"{} \n" +
log.info("\n----------------------------------------------------------\n\t" +
"项目启动成功!\n\t" +
"接口文档: \t{} \n\t" +
"开发文档: \t{} \n\t" +
"视频教程: \t{} \n" +
"----------------------------------------------------------",
"Copyright ©上海长江云息数字科技有限公司,All Rights Reserved.");
"https://doc.iocoder.cn/api-doc/",
"https://doc.iocoder.cn",
"https://t.zsxq.com/02Yf6M7Qn");
// 数据报表
if (isNotPresent("com.chanko.yunxi.mes.module.report.framework.security.config.SecurityConfiguration")) {
System.out.println("[报表模块 mes-module-report - 已禁用][参考 https://doc.iocoder.cn/report/ 开启]");
}
// 工作流
if (isNotPresent("com.chanko.yunxi.mes.framework.flowable.config.MesFlowableConfiguration")) {
System.out.println("[工作流模块 mes-module-bpm - 已禁用][参考 https://doc.iocoder.cn/bpm/ 开启]");
}
// 微信公众号
if (isNotPresent("com.chanko.yunxi.mes.module.mp.framework.mp.config.MpConfiguration")) {
System.out.println("[微信公众号 mes-module-mp - 已禁用][参考 https://doc.iocoder.cn/mp/build/ 开启]");
}
// 商城系统
if (isNotPresent("com.chanko.yunxi.mes.module.trade.framework.web.config.TradeWebConfiguration")) {
System.out.println("[商城系统 mes-module-mall - 已禁用][参考 https://doc.iocoder.cn/mall/build/ 开启]");
}
// 支付平台
if (isNotPresent("com.chanko.yunxi.mes.module.pay.framework.pay.config.PayConfiguration")) {
System.out.println("[支付系统 mes-module-pay - 已禁用][参考 https://doc.iocoder.cn/pay/build/ 开启]");
}
});
}

@ -80,10 +80,6 @@ public enum OperateTypeEnum {
*
* */
CANCEL_SUBMIT(16),
/*
*
* */
CANCEL(17),
/**
*
*

@ -1,6 +1,9 @@
package com.chanko.yunxi.mes.framework.mybatis.core.mapper;
import cn.hutool.core.collection.CollUtil;
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
import com.chanko.yunxi.mes.framework.mybatis.core.util.MyBatisUtils;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@ -8,14 +11,10 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
import com.baomidou.mybatisplus.extension.toolkit.Db;
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
import com.chanko.yunxi.mes.framework.mybatis.core.util.MyBatisUtils;
import com.github.yulichang.base.MPJBaseMapper;
import com.github.yulichang.interfaces.MPJBaseJoin;
import org.apache.ibatis.annotations.Param;
import java.math.BigDecimal;
import java.util.Collection;
import java.util.List;
@ -38,7 +37,7 @@ public interface BaseMapperX<T> extends MPJBaseMapper<T> {
IPage<T> mpPage = MyBatisUtils.buildPage(pageParam);
selectPage(mpPage, queryWrapper);
// 转换返回
return new PageResult<>(mpPage.getRecords(), mpPage.getTotal(), new BigDecimal(mpPage.getTotal()).divide(new BigDecimal(pageParam.getPageSize()),0, BigDecimal.ROUND_CEILING).intValue());
return new PageResult<>(mpPage.getRecords(), mpPage.getTotal());
}
default <DTO> PageResult<DTO> selectJoinPage(PageParam pageParam, Class<DTO> resultTypeClass, MPJBaseJoin<T> joinQueryWrapper) {

@ -1,23 +0,0 @@
package com.chanko.yunxi.mes.module.heli.enums;
import lombok.Getter;
/**
*
* @author chenxi
* @date 2024-02-01 04:42
*/
@Getter
public enum BoomDetailTypeEnum {
MATERIAL("1", "原材料"),
OTHER("2", "加工件");
private String code;
private String description;
BoomDetailTypeEnum(String code, String description) {
this.code = code;
this.description = description;
}
}

@ -14,16 +14,6 @@ public enum BusinesTypeEnum {
PROJECT_ORDER_SNAPSHOT("销售订单快照"),
DELIVER_ORDER("发货订单"),
PROCESS_BOM("工艺BOM"),
TASK_DISPATCH("派工单"),
TASK_DISPATCH_PRODUCTION("生产任务派工单"),
TASK_DISPATCH_ASSEMBLE("装配任务派工单"),
INSPECTION_REPORT("检测报告"),
UNQUALIFIED_NOTIFICATION("品质异常通知单"),
PLAN_TASK("生产任务单"),
FINANCE_MAKE_INVOICE("财务开票"),
FINANCE_RECEIVE_INVOICE("发票接收"),
FINANCE_INVOICE("财务发票"),
MATERIAL("物料"),
;
private String description;

@ -12,13 +12,7 @@ public enum BusinessFileTypeEnum {
CONTRACT("合同"),
TECHNOLOGY_PROTOCOL("技术协议"),
ID_CARD("身份证照片"),
COMPOSITION_REPORT("材质报告"),
HEAT_TREATMENT_REPORT("热处理报告"),
SCAN_REPORT("扫描报告"),
TRI_LINEAR_COORDINATES_MEASURING("三坐标检测报告"),
CERTIFICATE_OF_QUALIFICATION("合格证"),
;
ID_CARD("身份证照片");
private String description;

@ -44,13 +44,8 @@ public enum CodeEnum {
PROJECT_ORDER("业务订单", 3, "yyyyMM"),
PROJECT_DELIVERY_ORDER("发货单", "HL", 3, "yyyyMM"),
PROJECT_PLAN("生产计划", "PP",3, "yyyyMM"),
PROJECT_PLAN_TASK("生产计划任务单", "PT",3, "yyyyMMdd"),
MATERIAL_PLAN("物料需求计划", "PR",4, "yyyyMMdd"),
PURCHASE_ORDER("采购订单", "PO",4, "yyyyMMdd"),
TASK_DISPATCH_PRODUCTION("生产任务派工单", "PTD", 3, "yyyyMMdd"),
TASK_DISPATCH_ASSEMBLE("装配任务派工单", "ATD", 3, "yyyyMMdd"),
UNQUALIFIED_NOTIFICATION("品质异常通知单", "RN", 4, "yyyyMMdd"),
MATERIAL("物料", 6),
;
@ -61,13 +56,6 @@ public enum CodeEnum {
private int sequenceArgsLength;
private String dateFormat;
CodeEnum(String description, int sequenceLength){
this.description = description;
this.sequenceLength = sequenceLength;
this.sequenceArgsLength = 2;
this.sequenceTemplate = "%s%0"+sequenceLength+"d";
}
CodeEnum(String description, String prefix, int sequenceLength) {
this.description = description;
this.prefix = prefix;

@ -1,18 +0,0 @@
package com.chanko.yunxi.mes.module.heli.enums;
import lombok.Getter;
@Getter
public enum DictTypeConstants {
MATERIAL_TYPE("heli_material_type", "物料类型"),
MATERIAL_UNIT("heli_material_unit", "物料单位");
private String code;
private String description;
DictTypeConstants(String code, String description) {
this.code = code;
this.description = description;
}
}

@ -20,16 +20,13 @@ import com.chanko.yunxi.mes.framework.common.exception.ErrorCode;
* 007
* 008
* 009
* 010
* 011
* 3
*/
public interface ErrorCodeConstants {
ErrorCode CODE_REPEAT = new ErrorCode(1_000_001, "编码不能重复");
ErrorCode INVALID_OPERATE = new ErrorCode(1_000_002, "无效操作");
ErrorCode IMPORT_ERROR = new ErrorCode(1_000_003, "导入失败:{}");
ErrorCode DICT_TYPE_ERROR = new ErrorCode(1_000_003, "无法识别枚举类型");
/************基础信息**********/
ErrorCode MATERIAL_NOT_EXISTS = new ErrorCode(1_001_001, "物料不存在");
ErrorCode COMPOSITION_NOT_EXISTS = new ErrorCode(1_001_002, "材质不存在");
@ -39,10 +36,6 @@ public interface ErrorCodeConstants {
ErrorCode PROCEDURE_NOT_EXISTS = new ErrorCode(1_001_006, "工序不存在");
ErrorCode SERIAL_NUMBER_NOT_EXISTS = new ErrorCode(1_001_007, "序列号记录不存在");
ErrorCode EQUIP_NOT_EXISTS = new ErrorCode(1_001_008, "设备信息不存在");
ErrorCode MATERIAL_IMPORT_LIST_IS_EMPTY = new ErrorCode(1_001_009, "导入物料数据不能为空");
ErrorCode MATERIAL_IMPORT_CODE_REPEAT = new ErrorCode(1_001_010, "导入物料数据存在重复编码: {}");
ErrorCode EQUIP_MANUFACTURE_NOT_EXISTS = new ErrorCode(1_001_011, "制造设备不存在");
ErrorCode MATERIAL_IMPORT_CODE_NOT_STANDARD = new ErrorCode(1_001_012, "物料编码不符合标准");
/*********组织架构************/
ErrorCode WORKSHOP_NOT_EXISTS = new ErrorCode(1_002_001, "车间不存在");
@ -72,25 +65,11 @@ public interface ErrorCodeConstants {
/************生产计划管理***********/
ErrorCode PLAN_NOT_EXISTS = new ErrorCode(1_007_001, "生产计划不存在");
ErrorCode PLAN_SUB_NOT_EXISTS = new ErrorCode(1_007_002, "生产计划子项目不存在");
ErrorCode PLAN_TASK_NOT_EXISTS = new ErrorCode(1_007_003, "生产计划任务不存在");
ErrorCode PLAN_TASK_BOM_NOT_EXISTS = new ErrorCode(1_007_004, "生产计划任务Bom不存在");
/************采购管理***********/
ErrorCode MATERIAL_PLAN_NOT_EXISTS = new ErrorCode(1_008_001, "物料需求计划不存在");
ErrorCode MATERIAL_PLAN_DETAIL_NOT_EXISTS = new ErrorCode(1_008_002, "物料需求计划物料详情不存在");
ErrorCode PURCHASE_ORDER_NOT_EXISTS = new ErrorCode(1_008_003, "采购订单不存在");
ErrorCode PURCHASE_ORDER_MATERIAL_NOT_EXISTS = new ErrorCode(1_008_004, "采购单物料不存在");
ErrorCode MATERIAL_PLAN_BOOM_NOT_EXISTS = new ErrorCode(1_008_005, "物料需求计划加工件明细不存在");
ErrorCode PURCHASE_ORDER_BOOM_NOT_EXISTS = new ErrorCode(1_008_006, "采购订单加工件明细不存在");
/************生产管理***********/
ErrorCode TASK_DISPATCH_NOT_EXISTS = new ErrorCode(1_009_001, "派工单不存在");
ErrorCode TASK_REPORT_NOT_EXISTS = new ErrorCode(1_009_002, "任务报工不存在");
ErrorCode TASK_REPORT_PARAMS_ERROR = new ErrorCode(1_009_003, "报工数量或报工工时不能为空");
ErrorCode TASK_DISPATCH_TASK_NOT_EXISTS = new ErrorCode(1_009_004, "任务不存在或已完成");
ErrorCode TASK_DISPATCH_TASK_NO_PERMISSION_FOR_OPERATE = new ErrorCode(1_009_005, "任务不满足操作条件");
ErrorCode TASK_DISPATCH_TASK_REPORT_AMOUNT_EXCESS = new ErrorCode(1_009_006, "无法超额报工");
/*************质量管理***********/
ErrorCode UNQUALIFIED_NOTIFICATION_NOT_EXISTS = new ErrorCode(1_010_001, "品质异常通知单审核不存在");
ErrorCode QUALITY_FEEDBACK_NOT_EXISTS = new ErrorCode(1_010_002, "客户反馈质量不存在");
/*************应收应付管理***********/
ErrorCode INVOICE_NOT_EXISTS = new ErrorCode(1_011_001, "财务发票不存在");
}

@ -1,24 +0,0 @@
package com.chanko.yunxi.mes.module.heli.enums;
import lombok.Getter;
/**
*
* @author chenxi
* @date 2024-02-26 11:25
*/
@Getter
public enum InvoiceStatusEnum {
SAVE(1, "已保存"),
SUBMIT(2, "已提交"),
CANCEL(3, "已作废");
private int code;
private String description;
InvoiceStatusEnum(int code, String description) {
this.code = code;
this.description = description;
}
}

@ -2,8 +2,6 @@ package com.chanko.yunxi.mes.module.heli.enums;
import lombok.Getter;
import java.util.Arrays;
/**
*
* @author chenxi
@ -12,24 +10,18 @@ import java.util.Arrays;
@Getter
public enum MaterialTypeEnum {
RAW("1", "原材料", "2"),
ACCESSORY("2", "副资材", "4"),
OFFICE("3", "办公/劳保", "3"),
GIVING("4", "赠送物品", "5"),
STANDARD("5", "标准件", "1"),
VIRTUAL("6", "虚拟物料", "0");
RAW("1", "原材料"),
ACCESSORY("2", "副资材"),
OFFICE("3", "办公/劳保"),
GIVING("4", "赠送物品"),
STANDARD("5", "标准件"),
VIRTUAL("6", "虚拟物料");
private String code;
private String description;
private String prefix;
MaterialTypeEnum(String code, String description, String prefix) {
MaterialTypeEnum(String code, String description) {
this.code = code;
this.description = description;
this.prefix = prefix;
}
public static MaterialTypeEnum getMaterialType(String code){
return Arrays.stream(MaterialTypeEnum.values()).filter(materialTypeEnum -> materialTypeEnum.code.equals(code)).findFirst().get();
}
}

@ -1,27 +0,0 @@
package com.chanko.yunxi.mes.module.heli.enums;
import lombok.Getter;
/**
*
* @author chenxi
* @date 2024-02-01 02:31
*/
@Getter
public enum StockInTypeEnum {
RECEIVE(1, "采购入库"),
GAIN(2, "盘盈入库"),
PRODUCTION(3, "生产入库"),
OTHER(4, "其他入库"),
RETURN(5, "车间退料")
;
private int code;
private String description;
StockInTypeEnum(int code, String description) {
this.code = code;
this.description = description;
}
}

@ -1,24 +0,0 @@
package com.chanko.yunxi.mes.module.heli.enums;
import lombok.Getter;
/**
*
* @author chenxi
* @date 2024-03-04 04:44
*/
@Getter
public enum TaskDispatchProcedureStatusEnum {
DEFAULT(0, "默认"),
SUBMITTED(1, "已提交"),
COMPLETED(2, "已完成");
private int code;
private String description;
TaskDispatchProcedureStatusEnum(int code, String description) {
this.code = code;
this.description = description;
}
}

@ -1,25 +0,0 @@
package com.chanko.yunxi.mes.module.heli.enums;
import lombok.Getter;
/**
*
* @author chenxi
* @date 2024-02-26 11:25
*/
@Getter
public enum TaskDispatchStatusEnum {
SAVE(1, "已保存"),
SUBMIT(2, "已提交"),
CANCEL_SUBMIT(1, "取消提交"),
TERMINATE(3, "已终止");
private int code;
private String description;
TaskDispatchStatusEnum(int code, String description) {
this.code = code;
this.description = description;
}
}

@ -1,28 +0,0 @@
package com.chanko.yunxi.mes.module.heli.enums;
import lombok.Getter;
import static com.chanko.yunxi.mes.module.heli.enums.CodeEnum.TASK_DISPATCH_ASSEMBLE;
import static com.chanko.yunxi.mes.module.heli.enums.CodeEnum.TASK_DISPATCH_PRODUCTION;
/**
*
* @author chenxi
* @date 2024-03-12 02:28
*/
@Getter
public enum TaskDispatchTypeEnum {
PRODUCTION(BusinesTypeEnum.TASK_DISPATCH_PRODUCTION, TASK_DISPATCH_PRODUCTION, "生产任务"),
ASSEMBLE(BusinesTypeEnum.TASK_DISPATCH_ASSEMBLE, TASK_DISPATCH_ASSEMBLE, "装配任务");
private BusinesTypeEnum businesTypeEnum;
private CodeEnum codeEnum;
private String description;
TaskDispatchTypeEnum(BusinesTypeEnum businesTypeEnum, CodeEnum codeEnum, String description) {
this.businesTypeEnum = businesTypeEnum;
this.codeEnum = codeEnum;
this.description = description;
}
}

@ -1,23 +0,0 @@
package com.chanko.yunxi.mes.module.heli.enums;
import lombok.Getter;
/**
*
* @author chenxi
* @date 2024-03-08 10:03
*/
@Getter
public enum TaskReportOperateEnum {
START("开始"),
END("结束"),
SUBMIT("提交"),
FINISH("完成")
;
private String description;
TaskReportOperateEnum(String description) {
this.description = description;
}
}

@ -1,24 +0,0 @@
package com.chanko.yunxi.mes.module.heli.enums;
import lombok.Getter;
/**
*
* @author chenxi
* @date 2024-02-26 11:25
*/
@Getter
public enum UnqualifiedNotificationStatusEnum {
SAVE(1, "已保存"),
SUBMIT(2, "已送审"),
AUDIT(3, "已审核");
private int code;
private String description;
UnqualifiedNotificationStatusEnum(int code, String description) {
this.code = code;
this.description = description;
}
}

@ -1,24 +0,0 @@
package com.chanko.yunxi.mes.module.heli.config;
import com.chanko.yunxi.mes.framework.swagger.config.MesSwaggerAutoConfiguration;
import org.springdoc.core.GroupedOpenApi;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* system web Configuration
*
* @author
*/
@Configuration(proxyBeanMethods = false)
public class HeliWebConfiguration {
/**
* system API
*/
@Bean
public GroupedOpenApi heliGroupedOpenApi() {
return MesSwaggerAutoConfiguration.buildGroupedOpenApi("heli");
}
}

@ -1,13 +1,10 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.composition.vo;
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
import lombok.*;
import java.util.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import static com.chanko.yunxi.mes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@ -38,6 +35,6 @@ public class CompositionPageReqVO extends PageParam {
private String original;
@Schema(description = "密度")
private BigDecimal density;
private String density;
}
}

@ -1,14 +1,14 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.composition.vo;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.chanko.yunxi.mes.framework.excel.core.annotations.DictFormat;
import com.chanko.yunxi.mes.framework.excel.core.convert.DictConvert;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.math.BigDecimal;
import lombok.*;
import java.util.*;
import java.util.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
import com.chanko.yunxi.mes.framework.excel.core.annotations.DictFormat;
import com.chanko.yunxi.mes.framework.excel.core.convert.DictConvert;
@Schema(description = "管理后台 - 材质 Response VO")
@Data
@ -46,6 +46,6 @@ public class CompositionRespVO {
@Schema(description = "密度")
@ExcelProperty("密度")
private BigDecimal density;
private String density;
}
}

@ -1,38 +1,37 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.composition.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
@Schema(description = "管理后台 - 材质新增/修改 Request VO")
@Data
public class CompositionSaveReqVO {
@Schema(description = "自增字段,唯一", requiredMode = Schema.RequiredMode.REQUIRED, example = "457")
private Long id;
@Schema(description = "材质名", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
@NotEmpty(message = "材质名不能为空")
private String name;
@Schema(description = "材质代号")
private String code;
@Schema(description = "描述", example = "随便")
private String description;
@Schema(description = "状态,1表示正常2表示禁用", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
@NotNull(message = "状态,1表示正常2表示禁用不能为空")
private Integer status;
@Schema(description = "来源", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "来源不能为空")
private String original;
@Schema(description = "密度")
private BigDecimal density;
}
package com.chanko.yunxi.mes.module.heli.controller.admin.composition.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import javax.validation.constraints.*;
import java.util.*;
@Schema(description = "管理后台 - 材质新增/修改 Request VO")
@Data
public class CompositionSaveReqVO {
@Schema(description = "自增字段,唯一", requiredMode = Schema.RequiredMode.REQUIRED, example = "457")
private Long id;
@Schema(description = "材质名", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
@NotEmpty(message = "材质名不能为空")
private String name;
@Schema(description = "材质代号")
private String code;
@Schema(description = "描述", example = "随便")
private String description;
@Schema(description = "状态,1表示正常2表示禁用", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
@NotNull(message = "状态,1表示正常2表示禁用不能为空")
private Integer status;
@Schema(description = "来源", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "来源不能为空")
private String original;
@Schema(description = "密度")
private String density;
}

@ -21,15 +21,12 @@ public class CustomerPageReqVO extends PageParam {
@Schema(description = "客户编码")
private String code;
@Schema(description = "简码")
@Schema(description = "客户简称")
private String brief;
@Schema(description = "客户简称")
@Schema(description = "客户全称", example = "赵六")
private String name;
@Schema(description = "客户全称")
private String fullName;
@Schema(description = "所属行业")
private String industry;

@ -23,17 +23,13 @@ public class CustomerRespVO {
@ExcelProperty("客户编码")
private String code;
@Schema(description = "简码", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("简码")
private String brief;
@Schema(description = "客户简称", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("客户简称")
private String name;
private String brief;
@Schema(description = "客户全称", requiredMode = Schema.RequiredMode.REQUIRED)
@Schema(description = "客户全称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
@ExcelProperty("客户全称")
private String fullName;
private String name;
@Schema(description = "所属行业")
@ExcelProperty("所属行业")

@ -16,17 +16,13 @@ public class CustomerSaveReqVO {
@Schema(description = "客户编码", requiredMode = Schema.RequiredMode.REQUIRED)
private String code;
@Schema(description = "简码", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "简码不能为空")
private String brief;
@Schema(description = "客户简称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
@Schema(description = "客户简称", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "客户简称不能为空")
private String name;
private String brief;
@Schema(description = "客户全称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
@NotEmpty(message = "客户全称不能为空")
private String fullName;
private String name;
@Schema(description = "所属行业")
private String industry;

@ -1,95 +0,0 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.equipmanufacture;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import javax.validation.constraints.*;
import javax.validation.*;
import javax.servlet.http.*;
import java.util.*;
import java.io.IOException;
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
import static com.chanko.yunxi.mes.framework.common.pojo.CommonResult.success;
import com.chanko.yunxi.mes.framework.excel.core.util.ExcelUtils;
import com.chanko.yunxi.mes.framework.operatelog.core.annotations.OperateLog;
import static com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum.*;
import com.chanko.yunxi.mes.module.heli.controller.admin.equipmanufacture.vo.*;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.equipmanufacture.EquipManufactureDO;
import com.chanko.yunxi.mes.module.heli.service.equipmanufacture.EquipManufactureService;
@Tag(name = "管理后台 - 制造设备")
@RestController
@RequestMapping("/heli/equip-manufacture")
@Validated
public class EquipManufactureController {
@Resource
private EquipManufactureService equipManufactureService;
@PostMapping("/create")
@Operation(summary = "创建制造设备")
@PreAuthorize("@ss.hasPermission('heli:equip-manufacture:create')")
public CommonResult<Long> createEquipManufacture(@Valid @RequestBody EquipManufactureSaveReqVO createReqVO) {
return success(equipManufactureService.createEquipManufacture(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新制造设备")
@PreAuthorize("@ss.hasPermission('heli:equip-manufacture:update')")
public CommonResult<Boolean> updateEquipManufacture(@Valid @RequestBody EquipManufactureSaveReqVO updateReqVO) {
equipManufactureService.updateEquipManufacture(updateReqVO);
return success(true);
}
@DeleteMapping("/delete")
@Operation(summary = "删除制造设备")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('heli:equip-manufacture:delete')")
public CommonResult<Boolean> deleteEquipManufacture(@RequestParam("id") Long id) {
equipManufactureService.deleteEquipManufacture(id);
return success(true);
}
@GetMapping("/get")
@Operation(summary = "获得制造设备")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('heli:equip-manufacture:query')")
public CommonResult<EquipManufactureRespVO> getEquipManufacture(@RequestParam("id") Long id) {
EquipManufactureDO equipManufacture = equipManufactureService.getEquipManufacture(id);
return success(BeanUtils.toBean(equipManufacture, EquipManufactureRespVO.class));
}
@GetMapping("/page")
@Operation(summary = "获得制造设备分页")
@PreAuthorize("@ss.hasPermission('heli:equip-manufacture:query')")
public CommonResult<PageResult<EquipManufactureRespVO>> getEquipManufacturePage(@Valid EquipManufacturePageReqVO pageReqVO) {
PageResult<EquipManufactureDO> pageResult = equipManufactureService.getEquipManufacturePage(pageReqVO);
return success(BeanUtils.toBean(pageResult, EquipManufactureRespVO.class));
}
@GetMapping("/export-excel")
@Operation(summary = "导出制造设备 Excel")
@PreAuthorize("@ss.hasPermission('heli:equip-manufacture:export')")
@OperateLog(type = EXPORT)
public void exportEquipManufactureExcel(@Valid EquipManufacturePageReqVO pageReqVO,
HttpServletResponse response) throws IOException {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<EquipManufactureDO> list = equipManufactureService.getEquipManufacturePage(pageReqVO).getList();
// 导出 Excel
ExcelUtils.write(response, "制造设备.xls", "数据", EquipManufactureRespVO.class,
BeanUtils.toBean(list, EquipManufactureRespVO.class));
}
}

@ -1,40 +0,0 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.equipmanufacture.vo;
import lombok.*;
import java.util.*;
import io.swagger.v3.oas.annotations.media.Schema;
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import static com.chanko.yunxi.mes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = "管理后台 - 制造设备分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class EquipManufacturePageReqVO extends PageParam {
@Schema(description = "编码 唯一")
private String code;
@Schema(description = "名称", example = "赵六")
private String name;
@Schema(description = "类型", example = "2")
private String type;
@Schema(description = "型号")
private String model;
@Schema(description = "状态,1表示正常2表示禁用默认是1", example = "2")
private Integer status;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
@Schema(description = "编码或名称")
private String codeOrName;
}

@ -1,44 +0,0 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.equipmanufacture.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.util.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
@Schema(description = "管理后台 - 制造设备 Response VO")
@Data
@ExcelIgnoreUnannotated
public class EquipManufactureRespVO {
@Schema(description = "自增字段,唯一", requiredMode = Schema.RequiredMode.REQUIRED, example = "6775")
@ExcelProperty("自增字段,唯一")
private Long id;
@Schema(description = "编码 唯一", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("编码 唯一")
private String code;
@Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
@ExcelProperty("名称")
private String name;
@Schema(description = "类型", example = "2")
@ExcelProperty("类型")
private String type;
@Schema(description = "型号")
@ExcelProperty("型号")
private String model;
@Schema(description = "状态,1表示正常2表示禁用默认是1", example = "2")
@ExcelProperty("状态,1表示正常2表示禁用默认是1")
private Integer status;
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("创建时间")
private LocalDateTime createTime;
}

@ -1,33 +0,0 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.equipmanufacture.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import javax.validation.constraints.*;
import java.util.*;
@Schema(description = "管理后台 - 制造设备新增/修改 Request VO")
@Data
public class EquipManufactureSaveReqVO {
@Schema(description = "自增字段,唯一", requiredMode = Schema.RequiredMode.REQUIRED, example = "6775")
private Long id;
@Schema(description = "编码 唯一", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "编码 唯一不能为空")
private String code;
@Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
@NotEmpty(message = "名称不能为空")
private String name;
@Schema(description = "类型", example = "2")
private String type;
@Schema(description = "型号")
private String model;
@Schema(description = "状态,1表示正常2表示禁用默认是1", example = "2")
private Integer status;
}

@ -1,103 +0,0 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.invoice;
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
import com.chanko.yunxi.mes.framework.excel.core.util.ExcelUtils;
import com.chanko.yunxi.mes.framework.operatelog.core.annotations.OperateLog;
import com.chanko.yunxi.mes.module.heli.controller.admin.invoice.vo.InvoicePageReqVO;
import com.chanko.yunxi.mes.module.heli.controller.admin.invoice.vo.InvoiceRespVO;
import com.chanko.yunxi.mes.module.heli.controller.admin.invoice.vo.InvoiceSaveReqVO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.invoice.InvoiceDO;
import com.chanko.yunxi.mes.module.heli.service.invoice.InvoiceService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.io.IOException;
import java.util.List;
import static com.chanko.yunxi.mes.framework.common.pojo.CommonResult.success;
import static com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;
@Tag(name = "管理后台 - 财务发票")
@RestController
@RequestMapping("/heli/invoice")
@Validated
public class InvoiceController {
@Resource
private InvoiceService invoiceService;
@PostMapping("/create")
@Operation(summary = "创建财务发票")
@PreAuthorize("@ss.hasPermission('heli:invoice:create')")
public CommonResult<Long> createInvoice(@Valid @RequestBody InvoiceSaveReqVO createReqVO) {
return success(invoiceService.createInvoice(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新财务发票")
@PreAuthorize("@ss.hasPermission('heli:invoice:update')")
public CommonResult<Boolean> updateInvoice(@Valid @RequestBody InvoiceSaveReqVO updateReqVO) {
invoiceService.updateInvoice(updateReqVO);
return success(true);
}
@PostMapping("/operate")
@Operation(summary = "操作发票")
@PreAuthorize("@ss.hasPermission('heli:invoice:update')")
@OperateLog(enable = false)
@Transactional(rollbackFor = Exception.class)
public CommonResult operate(@Valid @RequestBody InvoiceSaveReqVO operateReqVO) {
return success(invoiceService.operate(operateReqVO));
}
@DeleteMapping("/delete")
@Operation(summary = "删除财务发票")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('heli:invoice:delete')")
public CommonResult<Boolean> deleteInvoice(@RequestParam("id") Long id) {
invoiceService.deleteInvoice(id);
return success(true);
}
@GetMapping("/get")
@Operation(summary = "获得财务发票")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('heli:invoice:query')")
public CommonResult<InvoiceRespVO> getInvoice(@RequestParam("id") Long id, @RequestParam("businessType") String businessType) {
InvoiceDO invoice = invoiceService.getInvoice(id, businessType);
return success(BeanUtils.toBean(invoice, InvoiceRespVO.class));
}
@GetMapping("/page")
@Operation(summary = "获得财务发票分页")
@PreAuthorize("@ss.hasPermission('heli:invoice:query')")
public CommonResult<PageResult<InvoiceRespVO>> getInvoicePage(@Valid InvoicePageReqVO pageReqVO) {
PageResult<InvoiceDO> pageResult = invoiceService.getInvoicePage(pageReqVO);
return success(BeanUtils.toBean(pageResult, InvoiceRespVO.class));
}
@GetMapping("/export-excel")
@Operation(summary = "导出财务发票 Excel")
@PreAuthorize("@ss.hasPermission('heli:invoice:export')")
@OperateLog(type = EXPORT)
public void exportInvoiceExcel(@Valid InvoicePageReqVO pageReqVO,
HttpServletResponse response) throws IOException {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<InvoiceDO> list = invoiceService.getInvoicePage(pageReqVO).getList();
// 导出 Excel
ExcelUtils.write(response, "财务发票.xls", "数据", InvoiceRespVO.class,
BeanUtils.toBean(list, InvoiceRespVO.class));
}
}

@ -1,68 +0,0 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.invoice.vo;
import lombok.*;
import java.util.*;
import io.swagger.v3.oas.annotations.media.Schema;
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
import java.math.BigDecimal;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import static com.chanko.yunxi.mes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = "管理后台 - 财务发票分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class InvoicePageReqVO extends PageParam {
@Schema(description = "业务类型 FINANCE_MAKE|FINANCE_RECEIVE 开票|收票", example = "2")
private String businessType;
@Schema(description = "订单id", example = "30302")
private Long orderId;
@Schema(description = "发票号码")
private String number;
@Schema(description = "发票类型", example = "1")
private String type;
@Schema(description = "开票日期")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] billingDate;
@Schema(description = "发票金额")
private BigDecimal amount;
@Schema(description = "税率")
private BigDecimal rate;
@Schema(description = "备注", example = "你说的对")
private String remark;
@Schema(description = "提交人")
private Long submitter;
@Schema(description = "提交时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] submitTime;
@Schema(description = "作废人")
private Long canceller;
@Schema(description = "作废时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] cancelTime;
@Schema(description = "单据状态 已保存|已提交|已作废 1|2|3", example = "1")
private Integer status;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
@Schema(description = "订单编号", example = "30302")
private String orderCode;
}

@ -1,90 +0,0 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.invoice.vo;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.chanko.yunxi.mes.framework.excel.core.annotations.DictFormat;
import com.chanko.yunxi.mes.framework.excel.core.convert.DictConvert;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;
@Schema(description = "管理后台 - 财务发票 Response VO")
@Data
@ExcelIgnoreUnannotated
public class InvoiceRespVO {
@Schema(description = "自增字段,唯一", requiredMode = Schema.RequiredMode.REQUIRED, example = "9244")
@ExcelProperty("自增字段,唯一")
private Long id;
@Schema(description = "业务类型 FINANCE_MAKE|FINANCE_RECEIVE 开票|收票", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
@ExcelProperty("业务类型 FINANCE_MAKE|FINANCE_RECEIVE 开票|收票")
private String businessType;
@Schema(description = "订单id", example = "30302")
@ExcelProperty("订单id")
private Long orderId;
@Schema(description = "发票号码", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("发票号码")
private String number;
@Schema(description = "发票类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@ExcelProperty(value = "发票类型", converter = DictConvert.class)
@DictFormat("heli_invoice_type") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
private String type;
@Schema(description = "开票日期", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("开票日期")
private LocalDateTime billingDate;
@Schema(description = "发票金额", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("发票金额")
private BigDecimal amount;
@Schema(description = "税率", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("税率")
private BigDecimal rate;
@Schema(description = "备注", example = "你说的对")
@ExcelProperty("备注")
private String remark;
@Schema(description = "提交人")
@ExcelProperty("提交人")
private Long submitter;
@Schema(description = "提交时间")
@ExcelProperty("提交时间")
private LocalDateTime submitTime;
@Schema(description = "作废人")
@ExcelProperty("作废人")
private Long canceller;
@Schema(description = "作废时间")
@ExcelProperty("作废时间")
private LocalDateTime cancelTime;
@Schema(description = "单据状态 已保存|已提交|已作废 1|2|3", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@ExcelProperty("单据状态 已保存|已提交|已作废 1|2|3")
private Integer status;
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("创建时间")
private LocalDateTime createTime;
@Schema(description = "提交人名称")
private String submitterName;
@Schema(description = "创建人名称")
private String creatorName;
@Schema(description = "作废人名称")
private String cancellerName;
@Schema(description = "订单编号")
private String orderCode;
}

@ -1,73 +0,0 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.invoice.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;
@Schema(description = "管理后台 - 财务发票新增/修改 Request VO")
@Data
public class InvoiceSaveReqVO {
@Schema(description = "自增字段,唯一", requiredMode = Schema.RequiredMode.REQUIRED, example = "9244")
private Long id;
@Schema(description = "业务类型 FINANCE_MAKE|FINANCE_RECEIVE 开票|收票", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
@NotEmpty(message = "业务类型 FINANCE_MAKE|FINANCE_RECEIVE 开票|收票不能为空")
private String businessType;
@Schema(description = "订单id", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "订单不能为空")
private Long orderId;
@Schema(description = "发票号码", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "发票号码不能为空")
private String number;
@Schema(description = "发票类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotEmpty(message = "发票类型不能为空")
private String type;
@Schema(description = "开票日期", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "开票日期不能为空")
private LocalDateTime billingDate;
@Schema(description = "发票金额", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "发票金额不能为空")
private BigDecimal amount;
@Schema(description = "税率", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "税率不能为空")
private BigDecimal rate;
@Schema(description = "备注", example = "你说的对")
private String remark;
@Schema(description = "提交人")
private Long submitter;
@Schema(description = "提交时间")
private LocalDateTime submitTime;
@Schema(description = "作废人")
private Long canceller;
@Schema(description = "作废时间")
private LocalDateTime cancelTime;
@Schema(description = "单据状态 已保存|已提交|已作废 1|2|3", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "单据状态 已保存|已提交|已作废 1|2|3不能为空")
private Integer status;
@Schema(description = "操作类型")
@NotBlank(message = "操作类型不能为空")
private String active;
@Schema(description = "操作意见")
private String activeOpinion;
}

@ -1,35 +1,33 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.material;
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import javax.validation.constraints.*;
import javax.validation.*;
import javax.servlet.http.*;
import java.util.*;
import java.io.IOException;
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
import static com.chanko.yunxi.mes.framework.common.pojo.CommonResult.success;
import com.chanko.yunxi.mes.framework.excel.core.util.ExcelUtils;
import com.chanko.yunxi.mes.framework.operatelog.core.annotations.OperateLog;
import com.chanko.yunxi.mes.module.heli.controller.admin.material.vo.MaterialExcelVO;
import com.chanko.yunxi.mes.module.heli.controller.admin.material.vo.MaterialPageReqVO;
import com.chanko.yunxi.mes.module.heli.controller.admin.material.vo.MaterialRespVO;
import com.chanko.yunxi.mes.module.heli.controller.admin.material.vo.MaterialSaveReqVO;
import static com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum.*;
import com.chanko.yunxi.mes.module.heli.controller.admin.material.vo.*;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.material.MaterialDO;
import com.chanko.yunxi.mes.module.heli.service.material.MaterialService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Parameters;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.io.IOException;
import java.util.List;
import java.util.Map;
import static com.chanko.yunxi.mes.framework.common.pojo.CommonResult.success;
import static com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;
@Tag(name = "管理后台 - 物料")
@RestController
@ -109,17 +107,4 @@ public class MaterialController {
// 拼接数据
return success(list);
}
@PostMapping("/import")
@Operation(summary = "导入用户")
@Parameters({
@Parameter(name = "file", description = "Excel 文件", required = true),
@Parameter(name = "updateSupport", description = "是否支持更新,默认为 false", example = "true")
})
public CommonResult<Void> importExcel(@RequestParam("file") MultipartFile file,
@RequestParam(value = "updateSupport", required = false, defaultValue = "false") Boolean updateSupport) throws Exception {
List<MaterialExcelVO> list = ExcelUtils.read(file, MaterialExcelVO.class);
materialService.importExcel(list, updateSupport);
return success(null);
}
}

@ -1,70 +0,0 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.material.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.chanko.yunxi.mes.framework.excel.core.annotations.DictFormat;
import com.chanko.yunxi.mes.framework.excel.core.convert.DictConvert;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
import java.math.BigDecimal;
@Schema(description = "管理后台 - 物料 Response VO")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = false)
public class MaterialExcelVO {
@NotBlank(message = "物料编码 不能为空")
@ExcelProperty("*物料编码")
private String code;
@NotBlank(message = "物料名称 不能为空")
@ExcelProperty("*物料名称")
private String name;
@ExcelProperty(value = "*物料类型", converter = DictConvert.class)
@DictFormat("heli_material_type")
@NotBlank(message = "物料类型 不能为空")
private String materialType;
@NotBlank(message = "系统单位 不能为空")
@ExcelProperty(value = "*系统单位", converter = DictConvert.class)
@DictFormat("heli_material_unit")
private String unit;
@ExcelProperty("物料简称")
private String shortName;
@ExcelProperty("规格/型号")
private String spec;
@ExcelProperty("品牌")
private String brand;
@ExcelProperty(value = "物料主要来源", converter = DictConvert.class)
@DictFormat("heli_material_original")
private Integer mainFrom;
@ExcelProperty("首选供应商")
private String mainSupplierName;
@ExcelProperty("销项/进项税率(%")
private BigDecimal outputInputTaxRate;
@ExcelProperty("安全库存")
private BigDecimal invSafe;
@ExcelProperty("物料条码")
private String barcode;
@ExcelProperty("备注")
private String description;
}

@ -15,6 +15,7 @@ public class MaterialSaveReqVO {
private Long id;
@Schema(description = "物料编码", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "物料编码不能为空")
private String code;
@Schema(description = "物料名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")

@ -1,115 +0,0 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.materialplanboom;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.processbom.ProcessBomDetailDO;
import com.chanko.yunxi.mes.module.heli.service.processbom.ProcessBomService;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import javax.validation.constraints.*;
import javax.validation.*;
import javax.servlet.http.*;
import java.util.*;
import java.io.IOException;
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
import static com.chanko.yunxi.mes.framework.common.pojo.CommonResult.success;
import com.chanko.yunxi.mes.framework.excel.core.util.ExcelUtils;
import com.chanko.yunxi.mes.framework.operatelog.core.annotations.OperateLog;
import static com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum.*;
import com.chanko.yunxi.mes.module.heli.controller.admin.materialplanboom.vo.*;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.materialplanboom.MaterialPlanBoomDO;
import com.chanko.yunxi.mes.module.heli.service.materialplanboom.MaterialPlanBoomService;
@Tag(name = "管理后台 - 物料需求计划加工件明细")
@RestController
@RequestMapping("/heli/material-plan-boom")
@Validated
public class MaterialPlanBoomController {
@Resource
private MaterialPlanBoomService materialPlanBoomService;
@PostMapping("/create")
@Operation(summary = "创建物料需求计划加工件明细")
@PreAuthorize("@ss.hasPermission('heli:material-plan-boom:create')")
public CommonResult<Long> createMaterialPlanBoom(@Valid @RequestBody MaterialPlanBoomSaveReqVO createReqVO) {
return success(materialPlanBoomService.createMaterialPlanBoom(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新物料需求计划加工件明细")
@PreAuthorize("@ss.hasPermission('heli:material-plan-boom:update')")
public CommonResult<Boolean> updateMaterialPlanBoom(@Valid @RequestBody MaterialPlanBoomSaveReqVO updateReqVO) {
materialPlanBoomService.updateMaterialPlanBoom(updateReqVO);
return success(true);
}
@DeleteMapping("/delete")
@Operation(summary = "删除物料需求计划加工件明细")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('heli:material-plan-boom:delete')")
public CommonResult<Boolean> deleteMaterialPlanBoom(@RequestParam("id") Long id) {
materialPlanBoomService.deleteMaterialPlanBoom(id);
return success(true);
}
@GetMapping("/get")
@Operation(summary = "获得物料需求计划加工件明细")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('heli:material-plan-boom:query')")
public CommonResult<MaterialPlanBoomRespVO> getMaterialPlanBoom(@RequestParam("id") Long id) {
MaterialPlanBoomDO materialPlanBoom = materialPlanBoomService.getMaterialPlanBoom(id);
return success(BeanUtils.toBean(materialPlanBoom, MaterialPlanBoomRespVO.class));
}
@GetMapping("/page")
@Operation(summary = "获得物料需求计划加工件明细分页")
@PreAuthorize("@ss.hasPermission('heli:material-plan-boom:query')")
public CommonResult<PageResult<MaterialPlanBoomRespVO>> getMaterialPlanBoomPage(@Valid MaterialPlanBoomPageReqVO pageReqVO) {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
PageResult<MaterialPlanBoomDO> pageResult = materialPlanBoomService.getMaterialPlanBoomPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, MaterialPlanBoomRespVO.class));
}
@GetMapping("/page-sum")
@Operation(summary = "获得物料需求计划加工件明细分页")
@PreAuthorize("@ss.hasPermission('heli:material-plan-boom:query')")
public CommonResult<PageResult<MaterialPlanBoomRespVO>> getMaterialPlanBoomSumPage(@Valid MaterialPlanBoomPageReqVO pageReqVO) {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
PageResult<MaterialPlanBoomDO> pageResult = materialPlanBoomService.getMaterialPlanBoomSumPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, MaterialPlanBoomRespVO.class));
}
@GetMapping("/export-excel")
@Operation(summary = "导出物料需求计划加工件明细 Excel")
@PreAuthorize("@ss.hasPermission('heli:material-plan-boom:export')")
@OperateLog(type = EXPORT)
public void exportMaterialPlanBoomExcel(@Valid MaterialPlanBoomPageReqVO pageReqVO,
HttpServletResponse response) throws IOException {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<MaterialPlanBoomDO> list = materialPlanBoomService.getMaterialPlanBoomPage(pageReqVO).getList();
// 导出 Excel
ExcelUtils.write(response, "物料需求计划加工件明细.xls", "数据", MaterialPlanBoomRespVO.class,
BeanUtils.toBean(list, MaterialPlanBoomRespVO.class));
}
@GetMapping("/boom")
@Operation(summary = "获得物料需求计划加工件明细分页")
@PreAuthorize("@ss.hasPermission('heli:material-plan-boom:query')")
public CommonResult<PageResult<ProcessBomDetailDO>> getBoomByProjectPlanId(@Valid ProcessBoomPageReqVO pageReqVO) {
PageResult<ProcessBomDetailDO> pageResult = materialPlanBoomService.getProcessBoomDetailList(pageReqVO);
return success(BeanUtils.toBean(pageResult, ProcessBomDetailDO.class));
}
}

@ -1,54 +0,0 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.materialplanboom.vo;
import lombok.*;
import java.util.*;
import io.swagger.v3.oas.annotations.media.Schema;
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
import java.math.BigDecimal;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import static com.chanko.yunxi.mes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = "管理后台 - 物料需求计划加工件明细分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class MaterialPlanBoomPageReqVO extends PageParam {
@Schema(description = "自增字段,唯一")
private Long id;
@Schema(description = "物料需求计划id")
private Long projectMaterialPlanId;
@Schema(description = "工艺boom明细id零件类型加工件")
private Long boomDetailId;
@Schema(description = "订单子项目id")
private Long projectPlanSubId;
@Schema(description = "需求数量")
private BigDecimal boomAmount;
@Schema(description = "需求到货日期")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] boomArriveDate;
@Schema(description = "备注")
private String description;
@Schema(description = "零件名称")
private String materialName;
@Schema(description = "规格型号")
private String boomSpec;
@Schema(description = "材质")
private Long compositionId;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
}

@ -1,71 +0,0 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.materialplanboom.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.util.*;
import java.math.BigDecimal;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
@Schema(description = "管理后台 - 物料需求计划加工件明细 Response VO")
@Data
@ExcelIgnoreUnannotated
public class MaterialPlanBoomRespVO extends PageParam {
@Schema(description = "自增字段,唯一", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("自增字段,唯一")
private Long id;
@Schema(description = "物料需求计划id", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("物料需求计划id")
private Long projectMaterialPlanId;
@Schema(description = "工艺boom明细id零件类型加工件", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("工艺boom明细id零件类型加工件")
private Long boomDetailId;
@Schema(description = "订单子项目id", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("订单子项目id")
private Long projectPlanSubId;
@Schema(description = "需求数量")
@ExcelProperty("需求数量")
private BigDecimal boomAmount;
@Schema(description = "需求到货日期")
@ExcelProperty("需求到货日期")
private LocalDateTime boomArriveDate;
@Schema(description = "备注")
@ExcelProperty("备注")
private String description;
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("创建时间")
private LocalDateTime createTime;
@Schema(description = "零件名称")
@ExcelProperty("零件名称")
private String materialName;
@Schema(description = "子项目编号")
@ExcelProperty("子项目编号")
private String projectSubCode;
@Schema(description = "规格型号")
@ExcelProperty("规格型号")
private String boomSpec;
@Schema(description = "系统单位")
@ExcelProperty("系统单位")
private String boomUnit;
@Schema(description = "材质")
@ExcelProperty("材质")
private String compositionName;
@Schema(description = "材质id")
@ExcelProperty("材质id")
private Long compositionId;
}

@ -1,40 +0,0 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.materialplanboom.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import javax.validation.constraints.*;
import java.util.*;
import java.math.BigDecimal;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
@Schema(description = "管理后台 - 物料需求计划加工件明细新增/修改 Request VO")
@Data
public class MaterialPlanBoomSaveReqVO {
@Schema(description = "自增字段,唯一", requiredMode = Schema.RequiredMode.REQUIRED)
private Long id;
@Schema(description = "物料需求计划id", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "物料需求计划id不能为空")
private Long projectMaterialPlanId;
@Schema(description = "工艺boom明细id零件类型加工件", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "工艺boom明细id零件类型加工件不能为空")
private Long boomDetailId;
@Schema(description = "订单子项目id", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "订单子项目id不能为空")
private Long projectPlanSubId;
@Schema(description = "需求数量")
private BigDecimal boomAmount;
@Schema(description = "需求到货日期")
private LocalDateTime boomArriveDate;
@Schema(description = "备注")
private String description;
}

@ -1,30 +0,0 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.materialplanboom.vo;
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import static com.chanko.yunxi.mes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = "管理后台 - 物料需求计划加工件明细分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ProcessBoomPageReqVO extends PageParam {
@Schema(description = "生产计划id")
private Long planId;
@Schema(description = "加工件名称")
private String materialName;
@Schema(description = "生产计划子项目编号")
private String projectSubCode;
}

@ -1,57 +0,0 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.materialplanboom.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.math.BigDecimal;
import java.time.LocalDateTime;
@Schema(description = "管理后台 - 物料需求计划加工件明细 Response VO")
@Data
@ExcelIgnoreUnannotated
public class ProcessBoomRespVO {
@Schema(description = "生产计划Id")
private Long planId;
@Schema(description = "物料Id")
private Long materialId;
@Schema(description = "零件名称")
private String materialName;
@Schema(description = "生产计划子项目id")
private Long projectPlanSubId;
@Schema(description = "子项目编号")
private String projectSubCode;
@Schema(description = "加工件Id")
private Long boomDetailId;
@Schema(description = "需求数量")
private BigDecimal boomAmount;
@Schema(description = "需求到货日期")
private LocalDateTime boomArriveDate;
@Schema(description = "备注")
@ExcelProperty("备注")
private String description;
@Schema(description = "规格型号")
@ExcelProperty("规格型号")
private String boomSpec;
@Schema(description = "系统单位")
@ExcelProperty("系统单位")
private String boomUnit;
@Schema(description = "材质")
@ExcelProperty("材质")
private String compositionName;
}

@ -1,103 +1,95 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.materialplandetail;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import javax.validation.constraints.*;
import javax.validation.*;
import javax.servlet.http.*;
import java.util.*;
import java.io.IOException;
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
import static com.chanko.yunxi.mes.framework.common.pojo.CommonResult.success;
import com.chanko.yunxi.mes.framework.excel.core.util.ExcelUtils;
import com.chanko.yunxi.mes.framework.operatelog.core.annotations.OperateLog;
import static com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum.*;
import com.chanko.yunxi.mes.module.heli.controller.admin.materialplandetail.vo.*;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.materialplandetail.MaterialPlanDetailDO;
import com.chanko.yunxi.mes.module.heli.service.materialplandetail.MaterialPlanDetailService;
@Tag(name = "管理后台 - 物料需求计划物料详情")
@RestController
@RequestMapping("/heli/material-plan-detail")
@Validated
public class MaterialPlanDetailController {
@Resource
private MaterialPlanDetailService materialPlanDetailService;
@PostMapping("/create")
@Operation(summary = "创建物料需求计划物料详情")
@PreAuthorize("@ss.hasPermission('heli:material-plan-detail:create')")
public CommonResult<Long> createMaterialPlanDetail(@Valid @RequestBody MaterialPlanDetailSaveReqVO createReqVO) {
return success(materialPlanDetailService.createMaterialPlanDetail(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新物料需求计划物料详情")
@PreAuthorize("@ss.hasPermission('heli:material-plan-detail:update')")
public CommonResult<Boolean> updateMaterialPlanDetail(@Valid @RequestBody MaterialPlanDetailSaveReqVO updateReqVO) {
materialPlanDetailService.updateMaterialPlanDetail(updateReqVO);
return success(true);
}
@DeleteMapping("/delete")
@Operation(summary = "删除物料需求计划物料详情")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('heli:material-plan-detail:delete')")
public CommonResult<Boolean> deleteMaterialPlanDetail(@RequestParam("id") Long id) {
materialPlanDetailService.deleteMaterialPlanDetail(id);
return success(true);
}
@GetMapping("/get")
@Operation(summary = "获得物料需求计划物料详情")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('heli:material-plan-detail:query')")
public CommonResult<MaterialPlanDetailRespVO> getMaterialPlanDetail(@RequestParam("id") Long id) {
MaterialPlanDetailDO materialPlanDetail = materialPlanDetailService.getMaterialPlanDetail(id);
return success(BeanUtils.toBean(materialPlanDetail, MaterialPlanDetailRespVO.class));
}
@GetMapping("/page")
@Operation(summary = "获得物料需求计划物料详情分页")
@PreAuthorize("@ss.hasPermission('heli:material-plan-detail:query')")
public CommonResult<PageResult<MaterialPlanDetailRespVO>> getMaterialPlanDetailPage(@Valid MaterialPlanDetailPageReqVO pageReqVO) {
PageResult<MaterialPlanDetailDO> pageResult = materialPlanDetailService.getMaterialPlanDetailPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, MaterialPlanDetailRespVO.class));
}
@GetMapping("/page-sum")
@Operation(summary = "获得物料需求计划物料详情分页")
@PreAuthorize("@ss.hasPermission('heli:material-plan-detail:query')")
public CommonResult<PageResult<MaterialPlanDetailRespVO>> getMaterialPlanDetailSumPage(@Valid MaterialPlanDetailPageReqVO pageReqVO) {
PageResult<MaterialPlanDetailDO> pageResult = materialPlanDetailService.getMaterialPlanDetailSumPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, MaterialPlanDetailRespVO.class));
}
@GetMapping("/export-excel")
@Operation(summary = "导出物料需求计划物料详情 Excel")
@PreAuthorize("@ss.hasPermission('heli:material-plan-detail:export')")
@OperateLog(type = EXPORT)
public void exportMaterialPlanDetailExcel(@Valid MaterialPlanDetailPageReqVO pageReqVO,
HttpServletResponse response) throws IOException {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<MaterialPlanDetailDO> list = materialPlanDetailService.getMaterialPlanDetailPage(pageReqVO).getList();
// 导出 Excel
ExcelUtils.write(response, "物料需求计划物料详情.xls", "数据", MaterialPlanDetailRespVO.class,
BeanUtils.toBean(list, MaterialPlanDetailRespVO.class));
}
}
package com.chanko.yunxi.mes.module.heli.controller.admin.materialplandetail;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import javax.validation.constraints.*;
import javax.validation.*;
import javax.servlet.http.*;
import java.util.*;
import java.io.IOException;
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
import static com.chanko.yunxi.mes.framework.common.pojo.CommonResult.success;
import com.chanko.yunxi.mes.framework.excel.core.util.ExcelUtils;
import com.chanko.yunxi.mes.framework.operatelog.core.annotations.OperateLog;
import static com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum.*;
import com.chanko.yunxi.mes.module.heli.controller.admin.materialplandetail.vo.*;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.materialplandetail.MaterialPlanDetailDO;
import com.chanko.yunxi.mes.module.heli.service.materialplandetail.MaterialPlanDetailService;
@Tag(name = "管理后台 - 物料需求计划物料详情")
@RestController
@RequestMapping("/heli/material-plan-detail")
@Validated
public class MaterialPlanDetailController {
@Resource
private MaterialPlanDetailService materialPlanDetailService;
@PostMapping("/create")
@Operation(summary = "创建物料需求计划物料详情")
@PreAuthorize("@ss.hasPermission('heli:material-plan-detail:create')")
public CommonResult<Long> createMaterialPlanDetail(@Valid @RequestBody MaterialPlanDetailSaveReqVO createReqVO) {
return success(materialPlanDetailService.createMaterialPlanDetail(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新物料需求计划物料详情")
@PreAuthorize("@ss.hasPermission('heli:material-plan-detail:update')")
public CommonResult<Boolean> updateMaterialPlanDetail(@Valid @RequestBody MaterialPlanDetailSaveReqVO updateReqVO) {
materialPlanDetailService.updateMaterialPlanDetail(updateReqVO);
return success(true);
}
@DeleteMapping("/delete")
@Operation(summary = "删除物料需求计划物料详情")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('heli:material-plan-detail:delete')")
public CommonResult<Boolean> deleteMaterialPlanDetail(@RequestParam("id") Long id) {
materialPlanDetailService.deleteMaterialPlanDetail(id);
return success(true);
}
@GetMapping("/get")
@Operation(summary = "获得物料需求计划物料详情")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('heli:material-plan-detail:query')")
public CommonResult<MaterialPlanDetailRespVO> getMaterialPlanDetail(@RequestParam("id") Long id) {
MaterialPlanDetailDO materialPlanDetail = materialPlanDetailService.getMaterialPlanDetail(id);
return success(BeanUtils.toBean(materialPlanDetail, MaterialPlanDetailRespVO.class));
}
@GetMapping("/page")
@Operation(summary = "获得物料需求计划物料详情分页")
@PreAuthorize("@ss.hasPermission('heli:material-plan-detail:query')")
public CommonResult<PageResult<MaterialPlanDetailRespVO>> getMaterialPlanDetailPage(@Valid MaterialPlanDetailPageReqVO pageReqVO) {
PageResult<MaterialPlanDetailDO> pageResult = materialPlanDetailService.getMaterialPlanDetailPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, MaterialPlanDetailRespVO.class));
}
@GetMapping("/export-excel")
@Operation(summary = "导出物料需求计划物料详情 Excel")
@PreAuthorize("@ss.hasPermission('heli:material-plan-detail:export')")
@OperateLog(type = EXPORT)
public void exportMaterialPlanDetailExcel(@Valid MaterialPlanDetailPageReqVO pageReqVO,
HttpServletResponse response) throws IOException {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<MaterialPlanDetailDO> list = materialPlanDetailService.getMaterialPlanDetailPage(pageReqVO).getList();
// 导出 Excel
ExcelUtils.write(response, "物料需求计划物料详情.xls", "数据", MaterialPlanDetailRespVO.class,
BeanUtils.toBean(list, MaterialPlanDetailRespVO.class));
}
}

@ -26,15 +26,6 @@ public class MaterialPlanDetailPageReqVO extends PageParam {
@Schema(description = "物料id")
private Long materialId;
@Schema(description = "物料名称")
private String matName;
@Schema(description = "物料编码")
private String matCode;
@Schema(description = "物料类型")
private Long matType;
@Schema(description = "子项目编号")
private Long projectSubId;

@ -35,10 +35,6 @@ public class MaterialPlanDetailRespVO {
@ExcelProperty("需求数量")
private BigDecimal requireAmount;
@Schema(description = "库存数量")
@ExcelProperty("库存数量")
private BigDecimal matRest;
@Schema(description = "需求到货日期")
@ExcelProperty("需求到货日期")
private LocalDateTime requireArriveTime;

@ -62,7 +62,7 @@ public class PlanSaveReqVO {
private String description;
@Schema(description = "状态,1未开始2生产中3已完成4已终止 默认是1", example = "2")
private Integer status;
private Boolean status;
@Schema(description = "项目变更次数")
private Integer changeNum;

@ -73,7 +73,5 @@ public class PlanSubRespVO {
@ExcelProperty("创建时间")
private LocalDateTime createTime;
@Schema(description = "子项目名称")
private String projectSubName;
}
}

@ -1,130 +0,0 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.plantask;
import com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum;
import com.chanko.yunxi.mes.framework.operatelog.core.service.OperateLogFrameworkService;
import com.chanko.yunxi.mes.module.heli.enums.BusinesTypeEnum;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import javax.validation.constraints.*;
import javax.validation.*;
import javax.servlet.http.*;
import java.time.LocalDateTime;
import java.util.*;
import java.io.IOException;
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
import static com.chanko.yunxi.mes.framework.common.pojo.CommonResult.success;
import com.chanko.yunxi.mes.framework.excel.core.util.ExcelUtils;
import com.chanko.yunxi.mes.framework.operatelog.core.annotations.OperateLog;
import static com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum.*;
import com.chanko.yunxi.mes.module.heli.controller.admin.plantask.vo.*;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.plantask.PlanTaskDO;
import com.chanko.yunxi.mes.module.heli.service.plantask.PlanTaskService;
@Tag(name = "管理后台 - 生产计划任务")
@RestController
@RequestMapping("/heli/plan-task")
@Validated
public class PlanTaskController {
@Resource
private PlanTaskService planTaskService;
@Resource
private OperateLogFrameworkService operateLogFrameworkService;
@Resource
private HttpServletRequest request;
@PostMapping("/create")
@Operation(summary = "创建生产计划任务")
@PreAuthorize("@ss.hasPermission('heli:plan-task:create')")
public CommonResult<Long> createPlanTask(@Valid @RequestBody PlanTaskSaveReqVO createReqVO) {
return success(planTaskService.createPlanTask(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新生产计划任务")
@PreAuthorize("@ss.hasPermission('heli:plan-task:update')")
public CommonResult<Boolean> updatePlanTask(@Valid @RequestBody PlanTaskSaveReqVO updateReqVO) {
LocalDateTime startTime = LocalDateTime.now();
planTaskService.updatePlanTask(updateReqVO);
// 手动记录日志
operateLogFrameworkService.createOperateLog(request,
startTime,
BusinesTypeEnum.PLAN_TASK.name(),
updateReqVO.getId(),
OperateTypeEnum.valueOf(updateReqVO.getActive()).getType(),
"");
return success(true);
}
@DeleteMapping("/delete")
@Operation(summary = "删除生产计划任务")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('heli:plan-task:delete')")
public CommonResult<Boolean> deletePlanTask(@RequestParam("id") Long id) {
planTaskService.deletePlanTask(id);
return success(true);
}
@GetMapping("/get")
@Operation(summary = "获得生产计划任务")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('heli:plan-task:query')")
public CommonResult<PlanTaskRespVO> getPlanTask(@RequestParam("id") Long id) {
PlanTaskDO planTask = planTaskService.getPlanTask(id);
return success(BeanUtils.toBean(planTask, PlanTaskRespVO.class));
}
@GetMapping("/page")
@Operation(summary = "获得生产计划任务分页")
@PreAuthorize("@ss.hasPermission('heli:plan-task:query')")
public CommonResult<PageResult<PlanTaskRespVO>> getPlanTaskPage(@Valid PlanTaskPageReqVO pageReqVO) {
PageResult<PlanTaskDO> pageResult = planTaskService.getPlanTaskPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, PlanTaskRespVO.class));
}
@GetMapping("/export-excel")
@Operation(summary = "导出生产计划任务 Excel")
@PreAuthorize("@ss.hasPermission('heli:plan-task:export')")
@OperateLog(type = EXPORT)
public void exportPlanTaskExcel(@Valid PlanTaskPageReqVO pageReqVO,
HttpServletResponse response) throws IOException {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<PlanTaskDO> list = planTaskService.getPlanTaskPage(pageReqVO).getList();
// 导出 Excel
ExcelUtils.write(response, "生产计划任务.xls", "数据", PlanTaskRespVO.class,
BeanUtils.toBean(list, PlanTaskRespVO.class));
}
@GetMapping("/get-version-status")
@Operation(summary = "获得bom需要更新的状态")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('heli:plan-task:query')")
public CommonResult<Integer> getPlanTaskBomStatus(@RequestParam("id") Long id) {
return success(planTaskService.getPlanTaskBomStatus(id));
}
@GetMapping("/refresh")
@Operation(summary = "刷新生产计划任务单最新数据")
@Parameter(name = "id", description = "生产计划id", required = true)
@PreAuthorize("@ss.hasPermission('heli:plan-task:query')")
public CommonResult<Integer> refreshPlanTaskByPlanId(@RequestParam("id") Long id) {
return success(planTaskService.refreshPlanTaskByPlanId(id));
}
}

@ -1,68 +0,0 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.plantask.vo;
import lombok.*;
import java.util.*;
import io.swagger.v3.oas.annotations.media.Schema;
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import static com.chanko.yunxi.mes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = "管理后台 - 生产计划任务分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class PlanTaskPageReqVO extends PageParam {
@Schema(description = "自增字段,唯一")
private Long id;
@Schema(description = "项目id")
private Long projectId;
@Schema(description = "生产计划id")
private Long projectPlanId;
@Schema(description = "生产计划子项目id")
private Long projectPlanSubId;
@Schema(description = "工艺bomid")
private Long processBomId;
@Schema(description = "生产计划编号,唯一")
private String taskNo;
@Schema(description = "bom版本号")
private Integer bomVersion;
@Schema(description = "备注")
private String description;
@Schema(description = "状态,1已保存2已提交3已终止 默认是1")
private Integer status;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
@Schema(description = "客户名称")
private String customerName;
@Schema(description = "项目编号")
private String projectCode;
@Schema(description = "项目名称")
private String projectName;
@Schema(description = "生产计划单号")
private String planNo;
@Schema(description = "子项目编号")
private String projectSubCode;
@Schema(description = "子项目名称")
private String projectSubName;
}

@ -1,88 +0,0 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.plantask.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.util.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
@Schema(description = "管理后台 - 生产计划任务 Response VO")
@Data
@ExcelIgnoreUnannotated
public class PlanTaskRespVO {
@Schema(description = "自增字段,唯一", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("自增字段,唯一")
private Long id;
@Schema(description = "项目id")
@ExcelProperty("项目id")
private Long projectId;
@Schema(description = "生产计划id", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("生产计划id")
private Long projectPlanId;
@Schema(description = "生产计划子项目id")
@ExcelProperty("生产计划子项目id")
private Long projectPlanSubId;
@Schema(description = "工艺bomid")
@ExcelProperty("工艺bomid")
private Long processBomId;
@Schema(description = "生产计划编号,唯一")
@ExcelProperty("生产计划编号,唯一")
private String taskNo;
@Schema(description = "bom版本号")
@ExcelProperty("bom版本号")
private Integer bomVersion;
@Schema(description = "备注")
@ExcelProperty("备注")
private String description;
@Schema(description = "状态,1已保存2已提交3已终止 默认是1")
@ExcelProperty("状态,1已保存2已提交3已终止 默认是1")
private Integer status;
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("创建时间")
private LocalDateTime createTime;
@Schema(description = "客户名称")
@ExcelProperty("客户名称")
private String customerName;
@Schema(description = "项目编号")
@ExcelProperty("项目编号")
private String projectCode;
@Schema(description = "项目名称")
@ExcelProperty("项目名称")
private String projectName;
@Schema(description = "生产计划编号")
@ExcelProperty("生产计划编号")
private String planNo;
@Schema(description = "子项目编号")
@ExcelProperty("子项目编号")
private String projectSubCode;
@Schema(description = "子项目名称")
@ExcelProperty("子项目名称")
private String projectSubName;
@Schema(description = "项目结束时间")
@ExcelProperty("项目结束时间")
private LocalDateTime projectEndTime;
@Schema(description = "bom编号")
@ExcelProperty("bom编号")
private String bomCode;
}

@ -1,49 +0,0 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.plantask.vo;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.plantaskbom.PlanTaskBomDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.processbom.ProcessBomDetailDO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import javax.validation.constraints.*;
import java.util.*;
@Schema(description = "管理后台 - 生产计划任务新增/修改 Request VO")
@Data
public class PlanTaskSaveReqVO {
@Schema(description = "自增字段,唯一", requiredMode = Schema.RequiredMode.REQUIRED)
private Long id;
@Schema(description = "项目id")
private Long projectId;
@Schema(description = "生产计划id", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "生产计划id不能为空")
private Long projectPlanId;
@Schema(description = "生产计划子项目id")
private Long projectPlanSubId;
@Schema(description = "工艺bomid")
private Long processBomId;
@Schema(description = "生产计划编号,唯一")
private String taskNo;
@Schema(description = "bom版本号")
private Integer bomVersion;
@Schema(description = "备注")
private String description;
@Schema(description = "状态,1已保存2已提交3已终止 默认是1")
private Integer status;
@Schema(description = "操作类型")
private String active;
@Schema(description = "工艺bom明细列表")
private List<PlanTaskBomDO> bomDetails;
}

@ -1,95 +0,0 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.plantaskbom;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import javax.validation.constraints.*;
import javax.validation.*;
import javax.servlet.http.*;
import java.util.*;
import java.io.IOException;
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
import static com.chanko.yunxi.mes.framework.common.pojo.CommonResult.success;
import com.chanko.yunxi.mes.framework.excel.core.util.ExcelUtils;
import com.chanko.yunxi.mes.framework.operatelog.core.annotations.OperateLog;
import static com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum.*;
import com.chanko.yunxi.mes.module.heli.controller.admin.plantaskbom.vo.*;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.plantaskbom.PlanTaskBomDO;
import com.chanko.yunxi.mes.module.heli.service.plantaskbom.PlanTaskBomService;
@Tag(name = "管理后台 - 生产计划任务Bom")
@RestController
@RequestMapping("/heli/plan-task-bom")
@Validated
public class PlanTaskBomController {
@Resource
private PlanTaskBomService planTaskBomService;
@PostMapping("/create")
@Operation(summary = "创建生产计划任务Bom")
@PreAuthorize("@ss.hasPermission('heli:plan-task-bom:create')")
public CommonResult<Long> createPlanTaskBom(@Valid @RequestBody PlanTaskBomSaveReqVO createReqVO) {
return success(planTaskBomService.createPlanTaskBom(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新生产计划任务Bom")
@PreAuthorize("@ss.hasPermission('heli:plan-task-bom:update')")
public CommonResult<Boolean> updatePlanTaskBom(@Valid @RequestBody PlanTaskBomSaveReqVO updateReqVO) {
planTaskBomService.updatePlanTaskBom(updateReqVO);
return success(true);
}
@DeleteMapping("/delete")
@Operation(summary = "删除生产计划任务Bom")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('heli:plan-task-bom:delete')")
public CommonResult<Boolean> deletePlanTaskBom(@RequestParam("id") Long id) {
planTaskBomService.deletePlanTaskBom(id);
return success(true);
}
@GetMapping("/get")
@Operation(summary = "获得生产计划任务Bom")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('heli:plan-task-bom:query')")
public CommonResult<PlanTaskBomRespVO> getPlanTaskBom(@RequestParam("id") Long id) {
PlanTaskBomDO planTaskBom = planTaskBomService.getPlanTaskBom(id);
return success(BeanUtils.toBean(planTaskBom, PlanTaskBomRespVO.class));
}
@GetMapping("/page")
@Operation(summary = "获得生产计划任务Bom分页")
@PreAuthorize("@ss.hasPermission('heli:plan-task-bom:query')")
public CommonResult<PageResult<PlanTaskBomRespVO>> getPlanTaskBomPage(@Valid PlanTaskBomPageReqVO pageReqVO) {
PageResult<PlanTaskBomDO> pageResult = planTaskBomService.getPlanTaskBomPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, PlanTaskBomRespVO.class));
}
@GetMapping("/export-excel")
@Operation(summary = "导出生产计划任务Bom Excel")
@PreAuthorize("@ss.hasPermission('heli:plan-task-bom:export')")
@OperateLog(type = EXPORT)
public void exportPlanTaskBomExcel(@Valid PlanTaskBomPageReqVO pageReqVO,
HttpServletResponse response) throws IOException {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<PlanTaskBomDO> list = planTaskBomService.getPlanTaskBomPage(pageReqVO).getList();
// 导出 Excel
ExcelUtils.write(response, "生产计划任务Bom.xls", "数据", PlanTaskBomRespVO.class,
BeanUtils.toBean(list, PlanTaskBomRespVO.class));
}
}

@ -1,51 +0,0 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.plantaskbom.vo;
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import static com.chanko.yunxi.mes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = "管理后台 - 生产计划任务Bom分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class PlanTaskBomPageReqVO extends PageParam {
@Schema(description = "自增字段,唯一")
private Long id;
@Schema(description = "生产任务id")
private Long taskId;
@Schema(description = "bom明细id")
private Long bomDetailId;
@Schema(description = "负责人")
private String owner;
@Schema(description = "要求完成日期")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] requireEndDate;
@Schema(description = "项目id")
private Long projectId;
@Schema(description = "子项目id")
private Long projectSubId;
@Schema(description = "零件类型 1 标准件|2 其它")
private String materialType;
private Long projectPlanId;
private Long projectPlanSubId;
private Boolean sortByBlueprintNo;
}

@ -1,69 +0,0 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.plantaskbom.vo;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
@Schema(description = "管理后台 - 生产计划任务Bom Response VO")
@Data
@ExcelIgnoreUnannotated
public class PlanTaskBomRespVO {
@Schema(description = "自增字段,唯一", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("自增字段,唯一")
private Long id;
@Schema(description = "生产任务id", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("生产任务id")
private Long taskId;
@Schema(description = "bom明细id", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("bom明细id")
private Long bomDetailId;
@Schema(description = "负责人")
@ExcelProperty("负责人")
private String owner;
@Schema(description = "要求完成日期")
@ExcelProperty("要求完成日期")
private LocalDateTime requireEndDate;
@Schema(description = "零件名称")
private String materialName;
@Schema(description = "物料名称")
private String compositionName;
@Schema(description = "图号")
private String blueprintNo;
@Schema(description = "零件类型 1 标准件|2 其它")
private String type;
@Schema(description = "物料id")
private Long materialId;
@Schema(description = "物料编码")
private String materialCode;
@Schema(description = "材质id")
private Long compositionId;
@Schema(description = "规格")
private String spec;
@Schema(description = "单位")
private String unit;
@Schema(description = "数量")
private Integer amount;
@Schema(description = "负责人名称")
private String ownerName;
}

@ -1,32 +0,0 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.plantaskbom.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import javax.validation.constraints.*;
import java.util.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
@Schema(description = "管理后台 - 生产计划任务Bom新增/修改 Request VO")
@Data
public class PlanTaskBomSaveReqVO {
@Schema(description = "自增字段,唯一", requiredMode = Schema.RequiredMode.REQUIRED)
private Long id;
@Schema(description = "生产任务id", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "生产任务id不能为空")
private Long taskId;
@Schema(description = "bom明细id", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "bom明细id不能为空")
private Long bomDetailId;
@Schema(description = "负责人")
private String owner;
@Schema(description = "要求完成日期")
private LocalDateTime requireEndDate;
}

@ -133,12 +133,4 @@ public class ProcessBomController {
return success(processBomService.getProcessBomDetailListByBomId(bomId));
}
@DeleteMapping("/process-bom-detail/delete")
@Operation(summary = "删除工艺bom明细")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('heli:process-bom:delete')")
public CommonResult<Boolean> deleteProcessBomDetail(@RequestParam("id") Long id) {
processBomService.deleteProcessBomDetail(id);
return success(true);
}
}

@ -1,13 +1,14 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.processbom.vo;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.chanko.yunxi.mes.framework.excel.core.annotations.DictFormat;
import com.chanko.yunxi.mes.framework.excel.core.convert.DictConvert;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.*;
import java.util.*;
import java.util.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
import com.chanko.yunxi.mes.framework.excel.core.annotations.DictFormat;
import com.chanko.yunxi.mes.framework.excel.core.convert.DictConvert;
@Schema(description = "管理后台 - 工艺bom Response VO")
@Data
@ -75,7 +76,4 @@ public class ProcessBomRespVO {
@Schema(description = "项目名称")
private String projectName;
@Schema(description = "bom编号")
private String bomCode;
}

@ -123,7 +123,4 @@ public class ProcessDesignRespVO {
@Schema(description = "最新进度")
private BigDecimal progress;
@Schema(description = "项目状态")
private Integer planStatus;
}

@ -8,7 +8,9 @@ import com.chanko.yunxi.mes.framework.excel.core.util.ExcelUtils;
import com.chanko.yunxi.mes.framework.operatelog.core.annotations.OperateLog;
import com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum;
import com.chanko.yunxi.mes.framework.operatelog.core.service.OperateLogFrameworkService;
import com.chanko.yunxi.mes.module.heli.controller.admin.projectorder.vo.*;
import com.chanko.yunxi.mes.module.heli.controller.admin.projectorder.vo.ProjectOrderPageReqVO;
import com.chanko.yunxi.mes.module.heli.controller.admin.projectorder.vo.ProjectOrderRespVO;
import com.chanko.yunxi.mes.module.heli.controller.admin.projectorder.vo.ProjectOrderSaveReqVO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.projectorder.ProjectOrderDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.projectorder.ProjectOrderSubDO;
import com.chanko.yunxi.mes.module.heli.enums.BusinesTypeEnum;
@ -134,8 +136,8 @@ public class ProjectOrderController {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<ProjectOrderDO> list = projectOrderService.getProjectOrderPage(pageReqVO).getList();
// 导出 Excel
ExcelUtils.write(response, "项目订单.xls", "数据", ProjectOrderExportVO.class,
BeanUtils.toBean(list, ProjectOrderExportVO.class));
ExcelUtils.write(response, "项目订单.xls", "数据", ProjectOrderRespVO.class,
BeanUtils.toBean(list, ProjectOrderRespVO.class));
}
// ==================== 子表(项目订单子项目) ====================
@ -148,21 +150,4 @@ public class ProjectOrderController {
return success(projectOrderService.getProjectOrderSubListByProjectOrderId(projectOrderId));
}
@DeleteMapping("/project-order-sub/delete")
@Operation(summary = "删除项目订单子项目")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('heli:project-order:delete')")
public CommonResult<Boolean> deleteProjectOrderSub(@RequestParam("id") Long id) {
projectOrderService.deleteProjectOrderSub(id);
return success(true);
}
@GetMapping("/project-order-sub/page")
@Operation(summary = "获得项目订单子项分页")
@PreAuthorize("@ss.hasPermission('heli:project-order:query')")
public CommonResult<PageResult<ProjectOrderSubRespVO>> getProjectOrderSubPage(@Valid ProjectOrderSubPageReqVO pageReqVO) {
PageResult<ProjectOrderSubDO> pageResult = projectOrderService.getProjectOrderSubPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, ProjectOrderSubRespVO.class));
}
}

@ -1,70 +0,0 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.projectorder.vo;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.chanko.yunxi.mes.framework.excel.core.annotations.DictFormat;
import com.chanko.yunxi.mes.framework.excel.core.convert.DictConvert;
import com.chanko.yunxi.mes.framework.excel.core.convert.TimestampToDateConvert;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.time.LocalDateTime;
@Schema(description = "管理后台 - 项目订单 Export VO")
@Data
@ExcelIgnoreUnannotated
public class ProjectOrderExportVO {
@Schema(description = "项目编号,唯一", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("项目编号")
private String code;
@Schema(description = "订单日期", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty(value = "订单日期", converter = TimestampToDateConvert.class)
private LocalDateTime orderTime;
@Schema(description = "客户名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "27214")
@ExcelProperty("客户名称")
private String customerName;
@Schema(description = "合同编号")
@ExcelProperty("合同编号")
private String contractNo;
@Schema(description = "项目名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
@ExcelProperty("项目名称")
private String projectName;
@Schema(description = "是否有价格", requiredMode = Schema.RequiredMode.REQUIRED, example = "28491")
@ExcelProperty(value = "是否有价格", converter = DictConvert.class)
@DictFormat("heli_common_is_or_not") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
private Integer hasPrice;
@Schema(description = "是否紧急", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty(value = "是否紧急", converter = DictConvert.class)
@DictFormat("heli_common_is_or_not") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
private Integer isUrgency;
@Schema(description = "性质", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty(value = "性质", converter = DictConvert.class)
@DictFormat("heli_project_property") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
private Integer property;
@Schema(description = "项目开始时间", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty(value = "项目开始时间", converter = TimestampToDateConvert.class)
private LocalDateTime projectStartTime;
@Schema(description = "项目结束时间")
@ExcelProperty(value = "项目结束时间", converter = TimestampToDateConvert.class)
private LocalDateTime projectEndTime;
@Schema(description = "单据状态 已保存/已送审/已审核/已启动/已打回/已终止", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@ExcelProperty(value = "单据状态", converter = DictConvert.class)
@DictFormat("heli_project_order_status") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
private Integer orderStatus;
@Schema(description = "发货状态 未发货/部分发货/全部发货", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@ExcelProperty(value = "发货状态", converter = DictConvert.class)
@DictFormat("heli_delivery_status") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
private Integer deliveryStatus;
}

@ -133,7 +133,4 @@ public class ProjectOrderPageReqVO extends PageParam {
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] snapshotOrderTime;
@Schema(description = "id列表")
private List<Long> idList;
}

@ -1,26 +0,0 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.projectorder.vo;
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@Schema(description = "管理后台 - 项目订单分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ProjectOrderSubPageReqVO extends PageParam {
@Schema(description = "项目编号")
private String projectCode;
@Schema(description = "项目名称", example = "赵六")
private String projectName;
@Schema(description = "子项目编号")
private String projectSubCode;
@Schema(description = "子项目名称", example = "赵六")
private String projectSubName;
}

@ -1,32 +0,0 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.projectorder.vo;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Schema(description = "管理后台 - 项目订单子项 Response VO")
@Data
@ExcelIgnoreUnannotated
public class ProjectOrderSubRespVO {
@Schema(description = "项目订单id")
private Long projectId;
@Schema(description = "项目订单子项id")
private Long projectSubId;
@Schema(description = "项目编号")
private String projectCode;
@Schema(description = "项目名称", example = "赵六")
private String projectName;
@Schema(description = "子项目编号")
private String projectSubCode;
@Schema(description = "子项目名称", example = "赵六")
private String projectSubName;
@Schema(description = "客户名称", example = "赵六")
private String customerName;
}

@ -1,95 +0,0 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.purchaseorderboom;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import javax.validation.constraints.*;
import javax.validation.*;
import javax.servlet.http.*;
import java.util.*;
import java.io.IOException;
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
import static com.chanko.yunxi.mes.framework.common.pojo.CommonResult.success;
import com.chanko.yunxi.mes.framework.excel.core.util.ExcelUtils;
import com.chanko.yunxi.mes.framework.operatelog.core.annotations.OperateLog;
import static com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum.*;
import com.chanko.yunxi.mes.module.heli.controller.admin.purchaseorderboom.vo.*;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.purchaseorderboom.PurchaseOrderBoomDO;
import com.chanko.yunxi.mes.module.heli.service.purchaseorderboom.PurchaseOrderBoomService;
@Tag(name = "管理后台 - 采购订单加工件明细")
@RestController
@RequestMapping("/heli/purchase-order-boom")
@Validated
public class PurchaseOrderBoomController {
@Resource
private PurchaseOrderBoomService purchaseOrderBoomService;
@PostMapping("/create")
@Operation(summary = "创建采购订单加工件明细")
@PreAuthorize("@ss.hasPermission('heli:purchase-order-boom:create')")
public CommonResult<Long> createPurchaseOrderBoom(@Valid @RequestBody PurchaseOrderBoomSaveReqVO createReqVO) {
return success(purchaseOrderBoomService.createPurchaseOrderBoom(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新采购订单加工件明细")
@PreAuthorize("@ss.hasPermission('heli:purchase-order-boom:update')")
public CommonResult<Boolean> updatePurchaseOrderBoom(@Valid @RequestBody PurchaseOrderBoomSaveReqVO updateReqVO) {
purchaseOrderBoomService.updatePurchaseOrderBoom(updateReqVO);
return success(true);
}
@DeleteMapping("/delete")
@Operation(summary = "删除采购订单加工件明细")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('heli:purchase-order-boom:delete')")
public CommonResult<Boolean> deletePurchaseOrderBoom(@RequestParam("id") Long id) {
purchaseOrderBoomService.deletePurchaseOrderBoom(id);
return success(true);
}
@GetMapping("/get")
@Operation(summary = "获得采购订单加工件明细")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('heli:purchase-order-boom:query')")
public CommonResult<PurchaseOrderBoomRespVO> getPurchaseOrderBoom(@RequestParam("id") Long id) {
PurchaseOrderBoomDO purchaseOrderBoom = purchaseOrderBoomService.getPurchaseOrderBoom(id);
return success(BeanUtils.toBean(purchaseOrderBoom, PurchaseOrderBoomRespVO.class));
}
@GetMapping("/page")
@Operation(summary = "获得采购订单加工件明细分页")
@PreAuthorize("@ss.hasPermission('heli:purchase-order-boom:query')")
public CommonResult<PageResult<PurchaseOrderBoomRespVO>> getPurchaseOrderBoomPage(@Valid PurchaseOrderBoomPageReqVO pageReqVO) {
PageResult<PurchaseOrderBoomDO> pageResult = purchaseOrderBoomService.getPurchaseOrderBoomPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, PurchaseOrderBoomRespVO.class));
}
@GetMapping("/export-excel")
@Operation(summary = "导出采购订单加工件明细 Excel")
@PreAuthorize("@ss.hasPermission('heli:purchase-order-boom:export')")
@OperateLog(type = EXPORT)
public void exportPurchaseOrderBoomExcel(@Valid PurchaseOrderBoomPageReqVO pageReqVO,
HttpServletResponse response) throws IOException {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<PurchaseOrderBoomDO> list = purchaseOrderBoomService.getPurchaseOrderBoomPage(pageReqVO).getList();
// 导出 Excel
ExcelUtils.write(response, "采购订单加工件明细.xls", "数据", PurchaseOrderBoomRespVO.class,
BeanUtils.toBean(list, PurchaseOrderBoomRespVO.class));
}
}

@ -1,64 +0,0 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.purchaseorderboom.vo;
import lombok.*;
import java.util.*;
import io.swagger.v3.oas.annotations.media.Schema;
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
import java.math.BigDecimal;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import static com.chanko.yunxi.mes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = "管理后台 - 采购订单加工件明细分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class PurchaseOrderBoomPageReqVO extends PageParam {
@Schema(description = "自增字段,唯一")
private Long id;
@Schema(description = "采购单编号")
private Long purchaseOrderId;
@Schema(description = "加工件boom detail id")
private Long boomDetailId;
@Schema(description = "零件名称")
private String boomName;
@Schema(description = "规格型号")
private String boomSpec;
@Schema(description = "系统单位")
private Integer boomUnit;
@Schema(description = "材质")
private String composition;
@Schema(description = "采购数量")
private BigDecimal purchaseAmount;
@Schema(description = "暂估价金额")
private BigDecimal estimatedPrice;
@Schema(description = "实际价金额")
private BigDecimal actualPrice;
@Schema(description = "预计到期日期")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] arriveTime;
@Schema(description = "需求到期日期")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] requireTime;
@Schema(description = "备注")
private String description;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
}

@ -1,77 +0,0 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.purchaseorderboom.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.util.*;
import java.math.BigDecimal;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
@Schema(description = "管理后台 - 采购订单加工件明细 Response VO")
@Data
@ExcelIgnoreUnannotated
public class PurchaseOrderBoomRespVO {
@Schema(description = "自增字段,唯一", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("自增字段,唯一")
private Long id;
@Schema(description = "采购单编号", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("采购单编号")
private Long purchaseOrderId;
@Schema(description = "加工件boom detail id")
@ExcelProperty("加工件boom detail id")
private Long boomDetailId;
@Schema(description = "零件名称")
@ExcelProperty("零件名称")
private String boomName;
@Schema(description = "规格型号")
@ExcelProperty("规格型号")
private String boomSpec;
@Schema(description = "系统单位")
@ExcelProperty("系统单位")
private Integer boomUnit;
@Schema(description = "材质")
@ExcelProperty("材质")
private String composition;
@Schema(description = "采购数量")
@ExcelProperty("采购数量")
private BigDecimal purchaseAmount;
@Schema(description = "需求数量")
@ExcelProperty("需求数量")
private BigDecimal boomAmount;
@Schema(description = "暂估价金额")
@ExcelProperty("暂估价金额")
private BigDecimal estimatedPrice;
@Schema(description = "实际价金额")
@ExcelProperty("实际价金额")
private BigDecimal actualPrice;
@Schema(description = "预计到期日期")
@ExcelProperty("预计到期日期")
private LocalDateTime arriveTime;
@Schema(description = "需求到期日期")
@ExcelProperty("需求到期日期")
private LocalDateTime requireTime;
@Schema(description = "备注")
@ExcelProperty("备注")
private String description;
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("创建时间")
private LocalDateTime createTime;
}

@ -1,59 +0,0 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.purchaseorderboom.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import javax.validation.constraints.*;
import java.util.*;
import java.math.BigDecimal;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
@Schema(description = "管理后台 - 采购订单加工件明细新增/修改 Request VO")
@Data
public class PurchaseOrderBoomSaveReqVO {
@Schema(description = "自增字段,唯一", requiredMode = Schema.RequiredMode.REQUIRED)
private Long id;
@Schema(description = "采购单编号", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "采购单编号不能为空")
private Long purchaseOrderId;
@Schema(description = "加工件boom detail id")
private Long boomDetailId;
@Schema(description = "零件名称")
private String boomName;
@Schema(description = "规格型号")
private String boomSpec;
@Schema(description = "系统单位")
private Integer boomUnit;
@Schema(description = "材质")
private String composition;
@Schema(description = "采购数量")
private BigDecimal purchaseAmount;
@Schema(description = "需求数量")
private BigDecimal boomAmount;
@Schema(description = "暂估价金额")
private BigDecimal estimatedPrice;
@Schema(description = "实际价金额")
private BigDecimal actualPrice;
@Schema(description = "预计到期日期")
private LocalDateTime arriveTime;
@Schema(description = "需求到期日期")
private LocalDateTime requireTime;
@Schema(description = "备注")
private String description;
}

@ -1,99 +1,95 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.purchaseordermaterial;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.purchaseorder.PurchaseOrderDO;
import com.chanko.yunxi.mes.module.heli.service.purchaseorder.PurchaseOrderService;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import javax.validation.constraints.*;
import javax.validation.*;
import javax.servlet.http.*;
import java.util.*;
import java.io.IOException;
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
import static com.chanko.yunxi.mes.framework.common.pojo.CommonResult.success;
import com.chanko.yunxi.mes.framework.excel.core.util.ExcelUtils;
import com.chanko.yunxi.mes.framework.operatelog.core.annotations.OperateLog;
import static com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum.*;
import com.chanko.yunxi.mes.module.heli.controller.admin.purchaseordermaterial.vo.*;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.purchaseordermaterial.PurchaseOrderMaterialDO;
import com.chanko.yunxi.mes.module.heli.service.purchaseordermaterial.PurchaseOrderMaterialService;
@Tag(name = "管理后台 - 采购单物料")
@RestController
@RequestMapping("/heli/purchase-order-material")
@Validated
public class PurchaseOrderMaterialController {
@Resource
private PurchaseOrderMaterialService purchaseOrderMaterialService;
@PostMapping("/create")
@Operation(summary = "创建采购单物料")
@PreAuthorize("@ss.hasPermission('heli:purchase-order-material:create')")
public CommonResult<Long> createPurchaseOrderMaterial(@Valid @RequestBody PurchaseOrderMaterialSaveReqVO createReqVO) {
return success(purchaseOrderMaterialService.createPurchaseOrderMaterial(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新采购单物料")
@PreAuthorize("@ss.hasPermission('heli:purchase-order-material:update')")
public CommonResult<Boolean> updatePurchaseOrderMaterial(@Valid @RequestBody PurchaseOrderMaterialSaveReqVO updateReqVO) {
purchaseOrderMaterialService.updatePurchaseOrderMaterial(updateReqVO);
return success(true);
}
@DeleteMapping("/delete")
@Operation(summary = "删除采购单物料")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('heli:purchase-order-material:delete')")
public CommonResult<Boolean> deletePurchaseOrderMaterial(@RequestParam("id") Long id) {
purchaseOrderMaterialService.deletePurchaseOrderMaterial(id);
return success(true);
}
@GetMapping("/get")
@Operation(summary = "获得采购单物料")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('heli:purchase-order-material:query')")
public CommonResult<PurchaseOrderMaterialRespVO> getPurchaseOrderMaterial(@RequestParam("id") Long id) {
PurchaseOrderMaterialDO purchaseOrderMaterial = purchaseOrderMaterialService.getPurchaseOrderMaterial(id);
return success(BeanUtils.toBean(purchaseOrderMaterial, PurchaseOrderMaterialRespVO.class));
}
@GetMapping("/page")
@Operation(summary = "获得采购单物料分页")
@PreAuthorize("@ss.hasPermission('heli:purchase-order-material:query')")
public CommonResult<PageResult<PurchaseOrderMaterialRespVO>> getPurchaseOrderMaterialPage(@Valid PurchaseOrderMaterialPageReqVO pageReqVO) {
PageResult<PurchaseOrderMaterialDO> pageResult = purchaseOrderMaterialService.getPurchaseOrderMaterialPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, PurchaseOrderMaterialRespVO.class));
}
@GetMapping("/export-excel")
@Operation(summary = "导出采购单物料 Excel")
@PreAuthorize("@ss.hasPermission('heli:purchase-order-material:export')")
@OperateLog(type = EXPORT)
public void exportPurchaseOrderMaterialExcel(@Valid PurchaseOrderMaterialPageReqVO pageReqVO,
HttpServletResponse response) throws IOException {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<PurchaseOrderMaterialDO> list = purchaseOrderMaterialService.getPurchaseOrderMaterialPage(pageReqVO).getList();
// 导出 Excel
ExcelUtils.write(response, "采购单物料.xls", "数据", PurchaseOrderMaterialRespVO.class,
BeanUtils.toBean(list, PurchaseOrderMaterialRespVO.class));
}
}
package com.chanko.yunxi.mes.module.heli.controller.admin.purchaseordermaterial;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import javax.validation.constraints.*;
import javax.validation.*;
import javax.servlet.http.*;
import java.util.*;
import java.io.IOException;
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
import static com.chanko.yunxi.mes.framework.common.pojo.CommonResult.success;
import com.chanko.yunxi.mes.framework.excel.core.util.ExcelUtils;
import com.chanko.yunxi.mes.framework.operatelog.core.annotations.OperateLog;
import static com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum.*;
import com.chanko.yunxi.mes.module.heli.controller.admin.purchaseordermaterial.vo.*;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.purchaseordermaterial.PurchaseOrderMaterialDO;
import com.chanko.yunxi.mes.module.heli.service.purchaseordermaterial.PurchaseOrderMaterialService;
@Tag(name = "管理后台 - 采购单物料")
@RestController
@RequestMapping("/heli/purchase-order-material")
@Validated
public class PurchaseOrderMaterialController {
@Resource
private PurchaseOrderMaterialService purchaseOrderMaterialService;
@PostMapping("/create")
@Operation(summary = "创建采购单物料")
@PreAuthorize("@ss.hasPermission('heli:purchase-order-material:create')")
public CommonResult<Long> createPurchaseOrderMaterial(@Valid @RequestBody PurchaseOrderMaterialSaveReqVO createReqVO) {
return success(purchaseOrderMaterialService.createPurchaseOrderMaterial(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新采购单物料")
@PreAuthorize("@ss.hasPermission('heli:purchase-order-material:update')")
public CommonResult<Boolean> updatePurchaseOrderMaterial(@Valid @RequestBody PurchaseOrderMaterialSaveReqVO updateReqVO) {
purchaseOrderMaterialService.updatePurchaseOrderMaterial(updateReqVO);
return success(true);
}
@DeleteMapping("/delete")
@Operation(summary = "删除采购单物料")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('heli:purchase-order-material:delete')")
public CommonResult<Boolean> deletePurchaseOrderMaterial(@RequestParam("id") Long id) {
purchaseOrderMaterialService.deletePurchaseOrderMaterial(id);
return success(true);
}
@GetMapping("/get")
@Operation(summary = "获得采购单物料")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('heli:purchase-order-material:query')")
public CommonResult<PurchaseOrderMaterialRespVO> getPurchaseOrderMaterial(@RequestParam("id") Long id) {
PurchaseOrderMaterialDO purchaseOrderMaterial = purchaseOrderMaterialService.getPurchaseOrderMaterial(id);
return success(BeanUtils.toBean(purchaseOrderMaterial, PurchaseOrderMaterialRespVO.class));
}
@GetMapping("/page")
@Operation(summary = "获得采购单物料分页")
@PreAuthorize("@ss.hasPermission('heli:purchase-order-material:query')")
public CommonResult<PageResult<PurchaseOrderMaterialRespVO>> getPurchaseOrderMaterialPage(@Valid PurchaseOrderMaterialPageReqVO pageReqVO) {
PageResult<PurchaseOrderMaterialDO> pageResult = purchaseOrderMaterialService.getPurchaseOrderMaterialPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, PurchaseOrderMaterialRespVO.class));
}
@GetMapping("/export-excel")
@Operation(summary = "导出采购单物料 Excel")
@PreAuthorize("@ss.hasPermission('heli:purchase-order-material:export')")
@OperateLog(type = EXPORT)
public void exportPurchaseOrderMaterialExcel(@Valid PurchaseOrderMaterialPageReqVO pageReqVO,
HttpServletResponse response) throws IOException {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<PurchaseOrderMaterialDO> list = purchaseOrderMaterialService.getPurchaseOrderMaterialPage(pageReqVO).getList();
// 导出 Excel
ExcelUtils.write(response, "采购单物料.xls", "数据", PurchaseOrderMaterialRespVO.class,
BeanUtils.toBean(list, PurchaseOrderMaterialRespVO.class));
}
}

@ -75,17 +75,4 @@ public class PurchaseOrderMaterialRespVO {
@ExcelProperty("物料类型")
private String matType;
@Schema(description = "库存数量")
@ExcelProperty("库存数量")
private BigDecimal matRest;
@Schema(description = "需求数量")
@ExcelProperty("需求数量")
private BigDecimal requireAmount;
@Schema(description = "需求到货日期")
@ExcelProperty("需求到货日期")
private LocalDateTime requireArriveTime;
}

@ -1,92 +0,0 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.qualityfeedback;
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
import com.chanko.yunxi.mes.framework.excel.core.util.ExcelUtils;
import com.chanko.yunxi.mes.framework.operatelog.core.annotations.OperateLog;
import com.chanko.yunxi.mes.module.heli.controller.admin.qualityfeedback.vo.QualityFeedbackPageReqVO;
import com.chanko.yunxi.mes.module.heli.controller.admin.qualityfeedback.vo.QualityFeedbackRespVO;
import com.chanko.yunxi.mes.module.heli.controller.admin.qualityfeedback.vo.QualityFeedbackSaveReqVO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.qualityfeedback.QualityFeedbackDO;
import com.chanko.yunxi.mes.module.heli.service.qualityfeedback.QualityFeedbackService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.io.IOException;
import java.util.List;
import static com.chanko.yunxi.mes.framework.common.pojo.CommonResult.success;
import static com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;
@Tag(name = "管理后台 - 客户反馈质量")
@RestController
@RequestMapping("/heli/quality-feedback")
@Validated
public class QualityFeedbackController {
@Resource
private QualityFeedbackService qualityFeedbackService;
@PostMapping("/create")
@Operation(summary = "创建客户反馈质量")
@PreAuthorize("@ss.hasPermission('heli:quality-feedback:create')")
public CommonResult<Long> createQualityFeedback(@Valid @RequestBody QualityFeedbackSaveReqVO createReqVO) {
return success(qualityFeedbackService.createQualityFeedback(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新客户反馈质量")
@PreAuthorize("@ss.hasPermission('heli:quality-feedback:update')")
public CommonResult<Long> updateQualityFeedback(@Valid @RequestBody QualityFeedbackSaveReqVO updateReqVO) {
return success(qualityFeedbackService.updateQualityFeedback(updateReqVO));
}
@DeleteMapping("/delete")
@Operation(summary = "删除客户反馈质量")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('heli:quality-feedback:delete')")
public CommonResult<Boolean> deleteQualityFeedback(@RequestParam("id") Long id) {
qualityFeedbackService.deleteQualityFeedback(id);
return success(true);
}
@GetMapping("/get")
@Operation(summary = "获得客户反馈质量")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('heli:quality-feedback:query')")
public CommonResult<QualityFeedbackRespVO> getQualityFeedback(@RequestParam("id") Long id) {
QualityFeedbackDO qualityFeedback = qualityFeedbackService.getQualityFeedback(id);
return success(BeanUtils.toBean(qualityFeedback, QualityFeedbackRespVO.class));
}
@GetMapping("/page")
@Operation(summary = "获得客户反馈质量分页")
@PreAuthorize("@ss.hasPermission('heli:quality-feedback:query')")
public CommonResult<PageResult<QualityFeedbackRespVO>> getQualityFeedbackPage(@Valid QualityFeedbackPageReqVO pageReqVO) {
PageResult<QualityFeedbackDO> pageResult = qualityFeedbackService.getQualityFeedbackPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, QualityFeedbackRespVO.class));
}
@GetMapping("/export-excel")
@Operation(summary = "导出客户反馈质量 Excel")
@PreAuthorize("@ss.hasPermission('heli:quality-feedback:export')")
@OperateLog(type = EXPORT)
public void exportQualityFeedbackExcel(@Valid QualityFeedbackPageReqVO pageReqVO,
HttpServletResponse response) throws IOException {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<QualityFeedbackDO> list = qualityFeedbackService.getQualityFeedbackPage(pageReqVO).getList();
// 导出 Excel
ExcelUtils.write(response, "客户反馈质量.xls", "数据", QualityFeedbackRespVO.class,
BeanUtils.toBean(list, QualityFeedbackRespVO.class));
}
}

@ -1,52 +0,0 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.qualityfeedback.vo;
import lombok.*;
import java.util.*;
import io.swagger.v3.oas.annotations.media.Schema;
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import static com.chanko.yunxi.mes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = "管理后台 - 客户反馈质量分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class QualityFeedbackPageReqVO extends PageParam {
@Schema(description = "项目订单id", example = "22876")
private Long projectId;
@Schema(description = "子项目id", example = "8582")
private Long projectSubId;
@Schema(description = "反馈人")
private String feedbacker;
@Schema(description = "联系电话")
private String mobile;
@Schema(description = "反馈内容", example = "你猜")
private String remark;
@Schema(description = "状态,1表示正常2表示禁用", example = "2")
private Integer status;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
@Schema(description = "项目编号")
private String projectCode;
@Schema(description = "项目名称")
private String projectName;
@Schema(description = "子项目名称")
private String projectSubName;
@Schema(description = "子项目编号")
private String projectSubCode;
}

@ -1,73 +0,0 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.qualityfeedback.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.util.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
@Schema(description = "管理后台 - 客户反馈质量 Response VO")
@Data
@ExcelIgnoreUnannotated
public class QualityFeedbackRespVO {
@Schema(description = "自增字段,唯一", requiredMode = Schema.RequiredMode.REQUIRED, example = "17478")
@ExcelProperty("自增字段,唯一")
private Long id;
@Schema(description = "项目订单id", requiredMode = Schema.RequiredMode.REQUIRED, example = "22876")
@ExcelProperty("项目订单id")
private Long projectId;
@Schema(description = "子项目id", requiredMode = Schema.RequiredMode.REQUIRED, example = "8582")
@ExcelProperty("子项目id")
private Long projectSubId;
@Schema(description = "反馈人")
@ExcelProperty("反馈人")
private String feedbacker;
@Schema(description = "联系电话")
@ExcelProperty("联系电话")
private String mobile;
@Schema(description = "反馈内容", example = "你猜")
@ExcelProperty("反馈内容")
private String remark;
@Schema(description = "状态,1表示正常2表示禁用", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
@ExcelProperty("状态,1表示正常2表示禁用")
private Integer status;
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("创建时间")
private LocalDateTime createTime;
@ExcelProperty("更新时间")
private LocalDateTime updateTime;
@Schema(description = "项目名称")
private String projectName;
@Schema(description = "项目编号")
private String projectCode;
@Schema(description = "客户名称")
private String customerName;
@Schema(description = "子项目编号")
private String projectSubName;
@Schema(description = "子项目编号")
private String projectSubCode;
@Schema(description = "创建人名称")
private String creatorName;
@Schema(description = "更新人名称")
private String updaterName;
}

@ -1,37 +0,0 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.qualityfeedback.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import javax.validation.constraints.*;
import java.util.*;
@Schema(description = "管理后台 - 客户反馈质量新增/修改 Request VO")
@Data
public class QualityFeedbackSaveReqVO {
@Schema(description = "自增字段,唯一", requiredMode = Schema.RequiredMode.REQUIRED, example = "17478")
private Long id;
@Schema(description = "项目订单id", requiredMode = Schema.RequiredMode.REQUIRED, example = "22876")
@NotNull(message = "项目订单id不能为空")
private Long projectId;
@Schema(description = "子项目id", requiredMode = Schema.RequiredMode.REQUIRED, example = "8582")
@NotNull(message = "子项目id不能为空")
private Long projectSubId;
@Schema(description = "反馈人")
private String feedbacker;
@Schema(description = "联系电话")
private String mobile;
@Schema(description = "反馈内容", example = "你猜")
private String remark;
@Schema(description = "状态,1表示正常2表示禁用", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
@NotNull(message = "状态,1表示正常2表示禁用不能为空")
private Integer status;
}

@ -1,56 +0,0 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.qualitymanagement;
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
import com.chanko.yunxi.mes.module.heli.controller.admin.projectorder.vo.ProjectOrderRespVO;
import com.chanko.yunxi.mes.module.heli.controller.admin.qualitymanagement.vo.InspectionReportPageReqVO;
import com.chanko.yunxi.mes.module.heli.controller.admin.qualitymanagement.vo.InspectionReportRespVO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.projectorder.ProjectOrderDO;
import com.chanko.yunxi.mes.module.heli.service.qualitymanagement.QualityManagementService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import javax.validation.Valid;
import static com.chanko.yunxi.mes.framework.common.pojo.CommonResult.success;
/**
*
*
* @author chenxi
* @date 2024-03-11 11:13
*/
@Tag(name = "管理后台 - 质量管理")
@RestController
@RequestMapping("/heli/quality-management")
@Validated
public class QualityManagementController {
@Resource
private QualityManagementService qualityManagementService;
@GetMapping("/inspection-report/page")
@Operation(summary = "获得检验报告分页")
public CommonResult<PageResult<InspectionReportRespVO>> getInspectionReportPage(@Valid InspectionReportPageReqVO pageReqVO) {
PageResult<InspectionReportRespVO> pageResult = qualityManagementService.getInspectionReportPage(pageReqVO);
return success(pageResult);
}
@GetMapping("/inspection-report/get")
@Operation(summary = "获得检验报告")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
public CommonResult<InspectionReportRespVO> getInspectionReport(@RequestParam("id") Long id) {
InspectionReportRespVO inspectionReport = qualityManagementService.getInspectionReport(id);
return success(inspectionReport);
}
}

@ -1,27 +0,0 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.qualitymanagement.vo;
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@Schema(description = "管理后台 - 检验报告分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class InspectionReportPageReqVO extends PageParam {
@Schema(description = "项目编号")
private String projectCode;
@Schema(description = "项目名称")
private String projectName;
@Schema(description = "子项目名称")
private String projectSubName;
@Schema(description = "子项目编号")
private String projectSubCode;
}

@ -1,39 +0,0 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.qualitymanagement.vo;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Schema(description = "管理后台 - 检验报告 Response VO")
@Data
@ExcelIgnoreUnannotated
public class InspectionReportRespVO {
@Schema(description = "项目id", requiredMode = Schema.RequiredMode.REQUIRED, example = "19610")
@ExcelProperty("项目id")
private Long projectId;
@Schema(description = "子项目id", requiredMode = Schema.RequiredMode.REQUIRED, example = "21985")
@ExcelProperty("子项目id")
private Long projectSubId;
@Schema(description = "项目名称")
private String projectName;
@Schema(description = "项目编号")
private String projectCode;
@Schema(description = "客户名称")
private String customerName;
@Schema(description = "子项目编号")
private String projectSubName;
@Schema(description = "子项目编号")
private String projectSubCode;
@Schema(description = "附件数量")
private Integer attachmentCount;
}

@ -2,7 +2,6 @@ package com.chanko.yunxi.mes.module.heli.controller.admin.storagelog;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagelogAll.StorageLogAllDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagelogNow.StorageLogNowDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagelogNow.StorageMaterialDO;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
@ -83,30 +82,6 @@ public class StorageLogController {
return success(pageResult);
}
@GetMapping("/page-now-all")
@Operation(summary = "获得入/出库日志分页")
@PreAuthorize("@ss.hasPermission('heli:storage-log:query')")
public CommonResult<PageResult<StorageLogNowDO>> getStorageLogPageAll(@Valid StorageLogPageReqVO pageReqVO) {
PageResult<StorageLogNowDO> pageResult = storageLogService.getStorageNowPageAll(pageReqVO);
return success(pageResult);
}
@GetMapping("/page-material")
@Operation(summary = "获得入/出库日志分页")
@PreAuthorize("@ss.hasPermission('heli:storage-log:query')")
public CommonResult<PageResult<StorageMaterialDO>> getStorageLogPageInMaterial(@Valid StorageLogPageReqVO pageReqVO) {
PageResult<StorageMaterialDO> pageResult = storageLogService.getStorageNowPageInMaterial(pageReqVO);
return success(pageResult);
}
@GetMapping("/page-material-group")
@Operation(summary = "获得入/出库日志分页")
@PreAuthorize("@ss.hasPermission('heli:storage-log:query')")
public CommonResult<PageResult<StorageMaterialDO>> getStorageLogPageGroupMaterial(@Valid StorageLogPageReqVO pageReqVO) {
PageResult<StorageMaterialDO> pageResult = storageLogService.getStorageNowPageGroupMaterial(pageReqVO);
return success(pageResult);
}
@GetMapping("/now")
@Operation(summary = "获得入/出库实时分页")
@PreAuthorize("@ss.hasPermission('heli:storage-log:query')")

@ -25,9 +25,6 @@ public class StorageLogPageReqVO extends PageParam {
@Schema(description = "物料类型")
private String matType;
@Schema(description = "物料类型")
private String matSpec;
@Schema(description = "批次号")
private String lotNo;

@ -16,9 +16,6 @@ public class StorageNowAllReqVO {
@Schema(description = "物料类型")
private String matType;
@Schema(description = "物料型号")
private String matSpec;
@Schema(description = "是否排除库存为0的物料")
private Integer noZero;

@ -50,10 +50,6 @@ public class StorageMatRespVO {
@ExcelProperty("子项目编号")
private String projectNo;
@Schema(description = "子项目名称")
@ExcelProperty("子项目名称")
private String projectSubName;
@Schema(description = "备注", example = "你猜")
@ExcelProperty("备注")
private String description;

@ -1,161 +1,106 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch;
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
import com.chanko.yunxi.mes.framework.excel.core.util.ExcelUtils;
import com.chanko.yunxi.mes.framework.operatelog.core.annotations.OperateLog;
import com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum;
import com.chanko.yunxi.mes.framework.operatelog.core.service.OperateLogFrameworkService;
import com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo.*;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDetailDO;
import com.chanko.yunxi.mes.module.heli.enums.BusinesTypeEnum;
import com.chanko.yunxi.mes.module.heli.service.taskdispatch.TaskDispatchService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.io.IOException;
import java.time.LocalDateTime;
import java.util.List;
import static com.chanko.yunxi.mes.framework.common.pojo.CommonResult.success;
import static com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;
@Tag(name = "管理后台 - 派工单")
@RestController
@RequestMapping("/heli/task-dispatch")
@Validated
public class TaskDispatchController {
@Resource
private TaskDispatchService taskDispatchService;
@Resource
private OperateLogFrameworkService operateLogFrameworkService;
@Resource
private HttpServletRequest request;
@PostMapping("/create")
@Operation(summary = "创建派工单")
@PreAuthorize("@ss.hasPermission('heli:task-dispatch:create')")
public CommonResult<Long> createTaskDispatch(@Valid @RequestBody TaskDispatchSaveReqVO createReqVO) {
return success(taskDispatchService.createTaskDispatch(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新派工单")
@PreAuthorize("@ss.hasPermission('heli:task-dispatch:update')")
public CommonResult<Boolean> updateTaskDispatch(@Valid @RequestBody TaskDispatchSaveReqVO updateReqVO) {
taskDispatchService.updateTaskDispatch(updateReqVO);
return success(true);
}
@PostMapping("/operate")
@Operation(summary = "操作派工单")
@PreAuthorize("@ss.hasPermission('heli:task-dispatch:update')")
@OperateLog(enable = false)
@Transactional(rollbackFor = Exception.class)
public CommonResult<Long> operate(@Valid @RequestBody TaskDispatchSaveReqVO operateReqVO) {
LocalDateTime startTime = LocalDateTime.now();
taskDispatchService.operate(operateReqVO);
// 手动记录日志
operateLogFrameworkService.createOperateLog(request,
startTime,
BusinesTypeEnum.TASK_DISPATCH.name(),
operateReqVO.getId(),
OperateTypeEnum.valueOf(operateReqVO.getActive()).getType(),
operateReqVO.getActiveOpinion());
return success(operateReqVO.getId());
}
@DeleteMapping("/delete")
@Operation(summary = "删除派工单")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('heli:task-dispatch:delete')")
public CommonResult<Boolean> deleteTaskDispatch(@RequestParam("id") Long id) {
taskDispatchService.deleteTaskDispatch(id);
return success(true);
}
@GetMapping("/get")
@Operation(summary = "获得派工单")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('heli:task-dispatch:query')")
public CommonResult<TaskDispatchRespVO> getTaskDispatch(@RequestParam("id") Long id) {
TaskDispatchDO taskDispatch = taskDispatchService.getTaskDispatch(id);
return success(BeanUtils.toBean(taskDispatch, TaskDispatchRespVO.class));
}
@GetMapping("/page")
@Operation(summary = "获得派工单分页")
@PreAuthorize("@ss.hasPermission('heli:task-dispatch:query')")
public CommonResult<PageResult<TaskDispatchRespVO>> getTaskDispatchPage(@Valid TaskDispatchPageReqVO pageReqVO) {
PageResult<TaskDispatchDO> pageResult = taskDispatchService.getTaskDispatchPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, TaskDispatchRespVO.class));
}
@GetMapping("/export-excel")
@Operation(summary = "导出派工单 Excel")
@PreAuthorize("@ss.hasPermission('heli:task-dispatch:export')")
@OperateLog(type = EXPORT)
public void exportTaskDispatchExcel(@Valid TaskDispatchPageReqVO pageReqVO,
HttpServletResponse response) throws IOException {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<TaskDispatchDO> list = taskDispatchService.getTaskDispatchPage(pageReqVO).getList();
// 导出 Excel
ExcelUtils.write(response, "派工单.xls", "数据", TaskDispatchRespVO.class,
BeanUtils.toBean(list, TaskDispatchRespVO.class));
}
// ==================== 子表(派工明细) ====================
@GetMapping("/task-dispatch-detail/list-by-dispatch-id")
@Operation(summary = "获得派工明细列表")
@Parameter(name = "dispatchId", description = "派工单id")
@PreAuthorize("@ss.hasPermission('heli:task-dispatch:query')")
public CommonResult<List<TaskDispatchDetailDO>> getTaskDispatchDetailListByDispatchId(@RequestParam("dispatchId") Long dispatchId) {
return success(taskDispatchService.getTaskDispatchDetailListByDispatchId(dispatchId));
}
@DeleteMapping("/task-dispatch-detail/delete")
@Operation(summary = "删除派工单")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('heli:task-dispatch:delete')")
public CommonResult<Boolean> deleteTaskDispatchDetail(@RequestParam("id") Long id) {
taskDispatchService.deleteTaskDispatchDetail(id);
return success(true);
}
@GetMapping("/task-dispatch-detail/page")
@Operation(summary = "获得派工明细分页")
@PreAuthorize("@ss.hasPermission('heli:task-dispatch:query')")
public CommonResult<PageResult<TaskDispatchDetailDO>> getTaskDispatchPageDetail(@Valid TaskDispatchDetailPageReqVO pageReqVO) {
PageResult<TaskDispatchDetailDO> pageResult = taskDispatchService.getTaskDispatchDetailPage(pageReqVO);
return success(pageResult);
}
@PostMapping("/task-dispatch-detail/operate")
@Operation(summary = "操作派工任务")
@PreAuthorize("@ss.hasPermission('heli:task-dispatch:update')")
@OperateLog(enable = false)
@Transactional(rollbackFor = Exception.class)
public CommonResult<Void> operateDetail(@Valid @RequestBody TaskDispatchDetailVO operateReqVO) {
taskDispatchService.operateDetail(operateReqVO);
return success(null);
}
}
package com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import javax.validation.constraints.*;
import javax.validation.*;
import javax.servlet.http.*;
import java.util.*;
import java.io.IOException;
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
import static com.chanko.yunxi.mes.framework.common.pojo.CommonResult.success;
import com.chanko.yunxi.mes.framework.excel.core.util.ExcelUtils;
import com.chanko.yunxi.mes.framework.operatelog.core.annotations.OperateLog;
import static com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum.*;
import com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo.*;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatchdetail.TaskDispatchDetailDO;
import com.chanko.yunxi.mes.module.heli.service.taskdispatch.TaskDispatchService;
@Tag(name = "管理后台 - 派工单")
@RestController
@RequestMapping("/heli/task-dispatch")
@Validated
public class TaskDispatchController {
@Resource
private TaskDispatchService taskDispatchService;
@PostMapping("/create")
@Operation(summary = "创建派工单")
@PreAuthorize("@ss.hasPermission('heli:task-dispatch:create')")
public CommonResult<Long> createTaskDispatch(@Valid @RequestBody TaskDispatchSaveReqVO createReqVO) {
return success(taskDispatchService.createTaskDispatch(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新派工单")
@PreAuthorize("@ss.hasPermission('heli:task-dispatch:update')")
public CommonResult<Boolean> updateTaskDispatch(@Valid @RequestBody TaskDispatchSaveReqVO updateReqVO) {
taskDispatchService.updateTaskDispatch(updateReqVO);
return success(true);
}
@DeleteMapping("/delete")
@Operation(summary = "删除派工单")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('heli:task-dispatch:delete')")
public CommonResult<Boolean> deleteTaskDispatch(@RequestParam("id") Long id) {
taskDispatchService.deleteTaskDispatch(id);
return success(true);
}
@GetMapping("/get")
@Operation(summary = "获得派工单")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('heli:task-dispatch:query')")
public CommonResult<TaskDispatchRespVO> getTaskDispatch(@RequestParam("id") Long id) {
TaskDispatchDO taskDispatch = taskDispatchService.getTaskDispatch(id);
return success(BeanUtils.toBean(taskDispatch, TaskDispatchRespVO.class));
}
@GetMapping("/page")
@Operation(summary = "获得派工单分页")
@PreAuthorize("@ss.hasPermission('heli:task-dispatch:query')")
public CommonResult<PageResult<TaskDispatchRespVO>> getTaskDispatchPage(@Valid TaskDispatchPageReqVO pageReqVO) {
PageResult<TaskDispatchDO> pageResult = taskDispatchService.getTaskDispatchPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, TaskDispatchRespVO.class));
}
@GetMapping("/export-excel")
@Operation(summary = "导出派工单 Excel")
@PreAuthorize("@ss.hasPermission('heli:task-dispatch:export')")
@OperateLog(type = EXPORT)
public void exportTaskDispatchExcel(@Valid TaskDispatchPageReqVO pageReqVO,
HttpServletResponse response) throws IOException {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<TaskDispatchDO> list = taskDispatchService.getTaskDispatchPage(pageReqVO).getList();
// 导出 Excel
ExcelUtils.write(response, "派工单.xls", "数据", TaskDispatchRespVO.class,
BeanUtils.toBean(list, TaskDispatchRespVO.class));
}
// ==================== 子表(派工明细) ====================
@GetMapping("/task-dispatch-detail/list-by-dispatch-id")
@Operation(summary = "获得派工明细列表")
@Parameter(name = "dispatchId", description = "派工单id")
@PreAuthorize("@ss.hasPermission('heli:task-dispatch:query')")
public CommonResult<List<TaskDispatchDetailDO>> getTaskDispatchDetailListByDispatchId(@RequestParam("dispatchId") Long dispatchId) {
return success(taskDispatchService.getTaskDispatchDetailListByDispatchId(dispatchId));
}
}

@ -1,35 +0,0 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo;
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import java.util.List;
@Schema(description = "管理后台 - 派工单分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class TaskDispatchDetailPageReqVO extends PageParam {
@Schema(description = "负责人id")
private Long owner;
@Schema(description = "工序完成状态列表")
private List<Integer> procedureStatusList;
@Schema(description = "派工类型")
private String dispatchType;
@Schema(description = "是否需要报工")
private Integer isReport;
@Schema(description = "生产任务id")
private Long taskId;
@Schema(description = "bom明细id")
private Long bomDetailId;
}

@ -1,35 +0,0 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;
import java.math.BigDecimal;
@Schema(description = "管理后台 - 派工单新增/修改 Request VO")
@Data
public class TaskDispatchDetailVO {
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "26723")
@NotNull(message = "id不能为空")
private Long id;
@Min(value = 0, message = "报工数量超出限定范围")
@Schema(description = "报工数量")
private Integer amount;
@Schema(description = "操作类型")
@NotBlank(message = "操作类型不能为空")
private String active;
@Schema(description = "操作意见")
private String activeOpinion;
@Positive(message = "报工工时超出限定范围")
@Schema(description = "报工工时")
private BigDecimal workTime;
}

@ -1,12 +1,10 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo;
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
import lombok.*;
import java.util.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import static com.chanko.yunxi.mes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@ -51,28 +49,4 @@ public class TaskDispatchPageReqVO extends PageParam {
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
@Schema(description = "生产任务单号")
private String taskCode;
@Schema(description = "项目编号")
private String projectCode;
@Schema(description = "客户名称")
private String customerName;
@Schema(description = "项目名称")
private String projectName;
@Schema(description = "子项目名称")
private String projectSubName;
@Schema(description = "子项目编号")
private String projectSubCode;
@Schema(description = "任务负责人")
private String ownerName;
@Schema(description = "生产计划单号")
private String planCode;
}
}

@ -1,13 +1,14 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.chanko.yunxi.mes.framework.excel.core.annotations.DictFormat;
import com.chanko.yunxi.mes.framework.excel.core.convert.DictConvert;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.*;
import java.util.*;
import java.util.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
import com.chanko.yunxi.mes.framework.excel.core.annotations.DictFormat;
import com.chanko.yunxi.mes.framework.excel.core.convert.DictConvert;
@Schema(description = "管理后台 - 派工单 Response VO")
@Data
@ -64,62 +65,4 @@ public class TaskDispatchRespVO {
@ExcelProperty("创建时间")
private LocalDateTime createTime;
@Schema(description = "生产任务单号")
private String taskCode;
@Schema(description = "项目名称")
private String projectName;
@Schema(description = "项目编号")
private String projectCode;
@Schema(description = "客户名称")
private String customerName;
@Schema(description = "子项目编号")
private String projectSubName;
@Schema(description = "子项目编号")
private String projectSubCode;
@Schema(description = "计划单号")
private String planCode;
@Schema(description = "项目结束日期")
private LocalDateTime projectEndTime;
@Schema(description = "零件名称")
private String materialName;
@Schema(description = "物料id")
private Long compositionId;
@Schema(description = "物料名称")
private String compositionName;
@Schema(description = "规格")
private String spec;
@Schema(description = "图号")
private String blueprintNo;
@Schema(description = "数量")
private Integer amount;
@Schema(description = "系统单位")
private String unit;
@Schema(description = "负责人")
private String ownerName;
@Schema(description = "要求完成时间")
private LocalDateTime requiredCompletedDate;
@Schema(description = "要求开始日期")
private LocalDateTime requiredStartDate;
@Schema(description = "要求完成日期")
private LocalDateTime requiredEndDate;
}
}

@ -1,63 +1,56 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import javax.validation.constraints.*;
import java.util.*;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDetailDO;
@Schema(description = "管理后台 - 派工单新增/修改 Request VO")
@Data
public class TaskDispatchSaveReqVO {
@Schema(description = "自增字段,唯一", requiredMode = Schema.RequiredMode.REQUIRED, example = "26723")
private Long id;
@Schema(description = "编号,唯一")
private String code;
@Schema(description = "派工类型 生产任务|装配任务 PRODUCTION|ASSEMBLE", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotEmpty(message = "派工类型 生产任务|装配任务 PRODUCTION|ASSEMBLE不能为空")
private String dispatchType;
@Schema(description = "生产任务id", example = "8538")
private Long taskId;
@Schema(description = "生产计划id", requiredMode = Schema.RequiredMode.REQUIRED, example = "3259")
@NotNull(message = "生产计划id不能为空")
private Long planId;
@Schema(description = "项目id", requiredMode = Schema.RequiredMode.REQUIRED, example = "19610")
@NotNull(message = "项目id不能为空")
private Long projectId;
@Schema(description = "子项目id", requiredMode = Schema.RequiredMode.REQUIRED, example = "21985")
@NotNull(message = "子项目id不能为空")
private Long projectSubId;
@Schema(description = "bom明细id", example = "15969")
private Long bomDetailId;
@Schema(description = "派工状态 已保存|已提交|已终止 1|2|3", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
@NotNull(message = "派工状态 已保存|已提交|已终止 1|2|3不能为空")
private Integer dispatchStatus;
@Schema(description = "备注", example = "你说的对")
private String remark;
@Schema(description = "状态,1表示正常2表示禁用", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "状态,1表示正常2表示禁用不能为空")
private Integer status;
@Schema(description = "派工明细列表")
private List<TaskDispatchDetailDO> taskDispatchDetails;
@Schema(description = "操作类型")
@NotBlank(message = "操作类型不能为空")
private String active;
@Schema(description = "操作意见")
private String activeOpinion;
}
package com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import javax.validation.constraints.*;
import java.util.*;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatchdetail.TaskDispatchDetailDO;
@Schema(description = "管理后台 - 派工单新增/修改 Request VO")
@Data
public class TaskDispatchSaveReqVO {
@Schema(description = "自增字段,唯一", requiredMode = Schema.RequiredMode.REQUIRED, example = "26723")
private Long id;
@Schema(description = "编号,唯一")
private String code;
@Schema(description = "派工类型 生产任务|装配任务 PRODUCTION|ASSEMBLE", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotEmpty(message = "派工类型 生产任务|装配任务 PRODUCTION|ASSEMBLE不能为空")
private String dispatchType;
@Schema(description = "生产任务id", example = "8538")
private Long taskId;
@Schema(description = "生产计划id", requiredMode = Schema.RequiredMode.REQUIRED, example = "3259")
@NotNull(message = "生产计划id不能为空")
private Long planId;
@Schema(description = "项目id", requiredMode = Schema.RequiredMode.REQUIRED, example = "19610")
@NotNull(message = "项目id不能为空")
private Long projectId;
@Schema(description = "子项目id", requiredMode = Schema.RequiredMode.REQUIRED, example = "21985")
@NotNull(message = "子项目id不能为空")
private Long projectSubId;
@Schema(description = "bom明细id", example = "15969")
private Long bomDetailId;
@Schema(description = "派工状态 已保存|已提交|已终止 1|2|3", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
@NotNull(message = "派工状态 已保存|已提交|已终止 1|2|3不能为空")
private Integer dispatchStatus;
@Schema(description = "备注", example = "你说的对")
private String remark;
@Schema(description = "状态,1表示正常2表示禁用", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "状态,1表示正常2表示禁用不能为空")
private Integer status;
@Schema(description = "派工明细列表")
private List<TaskDispatchDetailDO> taskDispatchDetails;
}

@ -1,95 +0,0 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.taskreport;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.security.access.prepost.PreAuthorize;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Operation;
import javax.validation.constraints.*;
import javax.validation.*;
import javax.servlet.http.*;
import java.util.*;
import java.io.IOException;
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
import static com.chanko.yunxi.mes.framework.common.pojo.CommonResult.success;
import com.chanko.yunxi.mes.framework.excel.core.util.ExcelUtils;
import com.chanko.yunxi.mes.framework.operatelog.core.annotations.OperateLog;
import static com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum.*;
import com.chanko.yunxi.mes.module.heli.controller.admin.taskreport.vo.*;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskreport.TaskReportDO;
import com.chanko.yunxi.mes.module.heli.service.taskreport.TaskReportService;
@Tag(name = "管理后台 - 任务报工")
@RestController
@RequestMapping("/heli/task-report")
@Validated
public class TaskReportController {
@Resource
private TaskReportService taskReportService;
@PostMapping("/create")
@Operation(summary = "创建任务报工")
@PreAuthorize("@ss.hasPermission('heli:task-report:create')")
public CommonResult<Long> createTaskReport(@Valid @RequestBody TaskReportSaveReqVO createReqVO) {
return success(taskReportService.createTaskReport(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新任务报工")
@PreAuthorize("@ss.hasPermission('heli:task-report:update')")
public CommonResult<Boolean> updateTaskReport(@Valid @RequestBody TaskReportSaveReqVO updateReqVO) {
taskReportService.updateTaskReport(updateReqVO);
return success(true);
}
@DeleteMapping("/delete")
@Operation(summary = "删除任务报工")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('heli:task-report:delete')")
public CommonResult<Boolean> deleteTaskReport(@RequestParam("id") Long id) {
taskReportService.deleteTaskReport(id);
return success(true);
}
@GetMapping("/get")
@Operation(summary = "获得任务报工")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('heli:task-report:query')")
public CommonResult<TaskReportRespVO> getTaskReport(@RequestParam("id") Long id) {
TaskReportDO taskReport = taskReportService.getTaskReport(id);
return success(BeanUtils.toBean(taskReport, TaskReportRespVO.class));
}
@GetMapping("/page")
@Operation(summary = "获得任务报工分页")
@PreAuthorize("@ss.hasPermission('heli:task-report:query')")
public CommonResult<PageResult<TaskReportRespVO>> getTaskReportPage(@Valid TaskReportPageReqVO pageReqVO) {
PageResult<TaskReportDO> pageResult = taskReportService.getTaskReportPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, TaskReportRespVO.class));
}
@GetMapping("/export-excel")
@Operation(summary = "导出任务报工 Excel")
@PreAuthorize("@ss.hasPermission('heli:task-report:export')")
@OperateLog(type = EXPORT)
public void exportTaskReportExcel(@Valid TaskReportPageReqVO pageReqVO,
HttpServletResponse response) throws IOException {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<TaskReportDO> list = taskReportService.getTaskReportPage(pageReqVO).getList();
// 导出 Excel
ExcelUtils.write(response, "任务报工.xls", "数据", TaskReportRespVO.class,
BeanUtils.toBean(list, TaskReportRespVO.class));
}
}

@ -1,68 +0,0 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.taskreport.vo;
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import static com.chanko.yunxi.mes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = "管理后台 - 任务报工分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class TaskReportPageReqVO extends PageParam {
@Schema(description = "派工单任务明细id", example = "23399")
private Long dispatchDetailId;
@Schema(description = "负责人")
private Long owner;
@Schema(description = "数量")
private Integer amount;
@Schema(description = "开始时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] startTime;
@Schema(description = "结束时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] endTime;
@Schema(description = "报工时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] reportTime;
@Schema(description = "是否已报工 0 默认否 1 是")
private Integer hasReport;
@Schema(description = "状态,1表示正常2表示禁用", example = "2")
private Integer status;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
@Schema(description = "报工工时")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private BigDecimal[] workTime;
@Schema(description = "项目编号")
private String projectCode;
@Schema(description = "项目名称")
private String projectName;
@Schema(description = "子项目名称")
private String projectSubName;
@Schema(description = "零件名称")
private String materialName;
}

@ -1,103 +0,0 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.taskreport.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.math.BigDecimal;
import java.util.*;
import java.util.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
import com.chanko.yunxi.mes.framework.excel.core.annotations.DictFormat;
import com.chanko.yunxi.mes.framework.excel.core.convert.DictConvert;
@Schema(description = "管理后台 - 任务报工 Response VO")
@Data
@ExcelIgnoreUnannotated
public class TaskReportRespVO {
@Schema(description = "自增字段,唯一", requiredMode = Schema.RequiredMode.REQUIRED, example = "7295")
@ExcelProperty("自增字段,唯一")
private Long id;
@Schema(description = "派工单任务明细id", requiredMode = Schema.RequiredMode.REQUIRED, example = "23399")
@ExcelProperty("派工单任务明细id")
private Long dispatchDetailId;
@Schema(description = "负责人", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("负责人")
private Long owner;
@Schema(description = "数量", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("数量")
private Integer amount;
@Schema(description = "开始时间", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("开始时间")
private LocalDateTime startTime;
@Schema(description = "结束时间", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("结束时间")
private LocalDateTime endTime;
@Schema(description = "报工时间", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("报工时间")
private LocalDateTime reportTime;
@Schema(description = "是否已报工 0 默认否 1 是", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty(value = "是否已报工 0 默认否 1 是", converter = DictConvert.class)
@DictFormat("heli_common_is_or_not") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
private Integer hasReport;
@Schema(description = "状态,1表示正常2表示禁用", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
@ExcelProperty("状态,1表示正常2表示禁用")
private Integer status;
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("创建时间")
private LocalDateTime createTime;
@Schema(description = "修改时间", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("修改时间")
private LocalDateTime updateTime;
@Schema(description = "报工工时", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("报工工时")
private BigDecimal workTime;
@Schema(description = "项目名称")
private String projectName;
@Schema(description = "项目编码")
private String projectCode;
@Schema(description = "子项目名称")
private String projectSubName;
@Schema(description = "子项目编码")
private String projectSubCode;
@Schema(description = "派工单号")
private String dispatchCode;
@Schema(description = "零件名称")
private String materialName;
@Schema(description = "规格型号")
private String spec;
@Schema(description = "报工人")
private String ownerName;
@Schema(description = "报工工序")
private String procedureName;
@Schema(description = "更新人名称")
private String updaterName;
@Schema(description = "单位")
private String unit;
}

@ -1,56 +0,0 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.taskreport.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.math.BigDecimal;
import java.util.*;
import javax.validation.constraints.*;
import java.util.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
@Schema(description = "管理后台 - 任务报工新增/修改 Request VO")
@Data
public class TaskReportSaveReqVO {
@Schema(description = "自增字段,唯一", requiredMode = Schema.RequiredMode.REQUIRED, example = "7295")
private Long id;
@Schema(description = "派工单任务明细id", requiredMode = Schema.RequiredMode.REQUIRED, example = "23399")
@NotNull(message = "派工单任务明细id不能为空")
private Long dispatchDetailId;
@Schema(description = "负责人", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "负责人不能为空")
private Long owner;
@Schema(description = "数量", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "数量不能为空")
private Integer amount;
@Schema(description = "开始时间", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "开始时间不能为空")
private LocalDateTime startTime;
@Schema(description = "结束时间", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "结束时间不能为空")
private LocalDateTime endTime;
@Schema(description = "报工时间", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "报工时间不能为空")
private LocalDateTime reportTime;
@Schema(description = "是否已报工 0 默认否 1 是", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "是否已报工 0 默认否 1 是不能为空")
private Integer hasReport;
@Schema(description = "状态,1表示正常2表示禁用", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
@NotNull(message = "状态,1表示正常2表示禁用不能为空")
private Integer status;
@Schema(description = "报工工时", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "报工工时不能为空")
private BigDecimal workTime;
}

@ -1,116 +0,0 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.unqualifiednotification;
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
import com.chanko.yunxi.mes.framework.excel.core.util.ExcelUtils;
import com.chanko.yunxi.mes.framework.operatelog.core.annotations.OperateLog;
import com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum;
import com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo.TaskDispatchSaveReqVO;
import com.chanko.yunxi.mes.module.heli.controller.admin.unqualifiednotification.vo.UnqualifiedNotificationPageReqVO;
import com.chanko.yunxi.mes.module.heli.controller.admin.unqualifiednotification.vo.UnqualifiedNotificationRespVO;
import com.chanko.yunxi.mes.module.heli.controller.admin.unqualifiednotification.vo.UnqualifiedNotificationSaveReqVO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.unqualifiednotification.UnqualifiedNotificationDO;
import com.chanko.yunxi.mes.module.heli.enums.BusinesTypeEnum;
import com.chanko.yunxi.mes.module.heli.service.unqualifiednotification.UnqualifiedNotificationService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.io.IOException;
import java.time.LocalDateTime;
import java.util.List;
import static com.chanko.yunxi.mes.framework.common.pojo.CommonResult.success;
import static com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;
@Tag(name = "管理后台 - 品质异常通知单审核")
@RestController
@RequestMapping("/heli/unqualified-notification")
@Validated
public class UnqualifiedNotificationController {
@Resource
private UnqualifiedNotificationService unqualifiedNotificationService;
@PostMapping("/create")
@Operation(summary = "创建品质异常通知单审核")
@PreAuthorize("@ss.hasPermission('heli:unqualified-notification:create')")
public CommonResult<Long> createUnqualifiedNotification(@Valid @RequestBody UnqualifiedNotificationSaveReqVO createReqVO) {
return success(unqualifiedNotificationService.createUnqualifiedNotification(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新品质异常通知单审核")
@PreAuthorize("@ss.hasPermission('heli:unqualified-notification:update')")
public CommonResult<Boolean> updateUnqualifiedNotification(@Valid @RequestBody UnqualifiedNotificationSaveReqVO updateReqVO) {
unqualifiedNotificationService.updateUnqualifiedNotification(updateReqVO);
return success(true);
}
@PostMapping("/operate")
@Operation(summary = "操作更新品质异常通知单")
@PreAuthorize("@ss.hasPermission('heli:unqualified-notification:update')")
@OperateLog(enable = false)
@Transactional(rollbackFor = Exception.class)
public CommonResult<Long> operate(@Valid @RequestBody UnqualifiedNotificationSaveReqVO operateReqVO) {
unqualifiedNotificationService.operate(operateReqVO);
return success(operateReqVO.getId());
}
@DeleteMapping("/delete")
@Operation(summary = "删除品质异常通知单审核")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('heli:unqualified-notification:delete')")
public CommonResult<Boolean> deleteUnqualifiedNotification(@RequestParam("id") Long id) {
unqualifiedNotificationService.deleteUnqualifiedNotification(id);
return success(true);
}
@GetMapping("/get")
@Operation(summary = "获得品质异常通知单审核")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('heli:unqualified-notification:query')")
public CommonResult<UnqualifiedNotificationRespVO> getUnqualifiedNotification(@RequestParam("id") Long id) {
UnqualifiedNotificationDO unqualifiedNotification = unqualifiedNotificationService.getUnqualifiedNotification(id);
return success(BeanUtils.toBean(unqualifiedNotification, UnqualifiedNotificationRespVO.class));
}
@GetMapping("/page")
@Operation(summary = "获得品质异常通知单审核分页")
@PreAuthorize("@ss.hasPermission('heli:unqualified-notification:query')")
public CommonResult<PageResult<UnqualifiedNotificationRespVO>> getUnqualifiedNotificationPage(@Valid UnqualifiedNotificationPageReqVO pageReqVO) {
PageResult<UnqualifiedNotificationDO> pageResult = unqualifiedNotificationService.getUnqualifiedNotificationPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, UnqualifiedNotificationRespVO.class));
}
@GetMapping("/export-excel")
@Operation(summary = "导出品质异常通知单审核 Excel")
@PreAuthorize("@ss.hasPermission('heli:unqualified-notification:export')")
@OperateLog(type = EXPORT)
public void exportUnqualifiedNotificationExcel(@Valid UnqualifiedNotificationPageReqVO pageReqVO,
HttpServletResponse response) throws IOException {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<UnqualifiedNotificationDO> list = unqualifiedNotificationService.getUnqualifiedNotificationPage(pageReqVO).getList();
// 导出 Excel
ExcelUtils.write(response, "品质异常通知单审核.xls", "数据", UnqualifiedNotificationRespVO.class,
BeanUtils.toBean(list, UnqualifiedNotificationRespVO.class));
}
@GetMapping("/statisticPage")
@Operation(summary = "获得品质异常单统计分页")
@PreAuthorize("@ss.hasPermission('heli:unqualified-notification:query')")
public CommonResult<PageResult<UnqualifiedNotificationRespVO>> getUnqualifiedNotificationStatisticPage(@Valid UnqualifiedNotificationPageReqVO pageReqVO) {
PageResult<UnqualifiedNotificationDO> pageResult = unqualifiedNotificationService.getUnqualifiedNotificationStatisticPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, UnqualifiedNotificationRespVO.class));
}
}

@ -1,92 +0,0 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.unqualifiednotification.vo;
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import static com.chanko.yunxi.mes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = "管理后台 - 品质异常通知单审核分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class UnqualifiedNotificationPageReqVO extends PageParam {
@Schema(description = "编号,唯一")
private String code;
@Schema(description = "质检类型", example = "2")
private String type;
@Schema(description = "单据状态 已保存|已送审|已审核 1|2|3", example = "1")
private Integer notificationStatus;
@Schema(description = "项目订单id", example = "26682")
private Long projectId;
@Schema(description = "子项目id", example = "28456")
private Long projectSubId;
@Schema(description = "bom明细id", example = "21454")
private Long bomDetailId;
@Schema(description = "工序id", example = "14739")
private Long procedureId;
@Schema(description = "异常数量")
private Integer amount;
@Schema(description = "责任人")
private Long owner;
@Schema(description = "情况描述", example = "随便")
private String remark;
@Schema(description = "审核人")
private Long auditor;
@Schema(description = "审核意见")
private String auditOpinion;
@Schema(description = "状态,1表示正常2表示禁用", example = "1")
private Integer status;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
@Schema(description = "审核时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] auditTime;
@Schema(description = "项目编号")
private String projectCode;
@Schema(description = "项目名称")
private String projectName;
@Schema(description = "子项目名称")
private String projectSubName;
@Schema(description = "子项目编号")
private String projectSubCode;
@Schema(description = "责任人名称")
private String ownerName;
@Schema(description = "创建人名称")
private String creatorName;
@Schema(description = "最小创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime minCreateTime;
@Schema(description = "最大创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime maxCreateTime;
}

@ -1,133 +0,0 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.unqualifiednotification.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.util.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
import com.chanko.yunxi.mes.framework.excel.core.annotations.DictFormat;
import com.chanko.yunxi.mes.framework.excel.core.convert.DictConvert;
@Schema(description = "管理后台 - 品质异常通知单审核 Response VO")
@Data
@ExcelIgnoreUnannotated
public class UnqualifiedNotificationRespVO {
@Schema(description = "自增字段,唯一", requiredMode = Schema.RequiredMode.REQUIRED, example = "11880")
@ExcelProperty("自增字段,唯一")
private Long id;
@Schema(description = "编号,唯一")
@ExcelProperty("编号,唯一")
private String code;
@Schema(description = "质检类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
@ExcelProperty(value = "质检类型", converter = DictConvert.class)
@DictFormat("heli_inspection_type") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
private String type;
@Schema(description = "单据状态 已保存|已送审|已审核 1|2|3", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@ExcelProperty(value = "单据状态 已保存|已送审|已审核 1|2|3", converter = DictConvert.class)
@DictFormat("heli_unqualified_notification_status") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
private Integer notificationStatus;
@Schema(description = "项目订单id", requiredMode = Schema.RequiredMode.REQUIRED, example = "26682")
@ExcelProperty("项目订单id")
private Long projectId;
@Schema(description = "子项目id", requiredMode = Schema.RequiredMode.REQUIRED, example = "28456")
@ExcelProperty("子项目id")
private Long projectSubId;
@Schema(description = "bom明细id", example = "21454")
@ExcelProperty("bom明细id")
private Long bomDetailId;
@Schema(description = "工序id", requiredMode = Schema.RequiredMode.REQUIRED, example = "14739")
@ExcelProperty("工序id")
private Long procedureId;
@Schema(description = "异常数量", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("异常数量")
private Integer amount;
@Schema(description = "责任人", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("责任人")
private Long owner;
@Schema(description = "情况描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "随便")
@ExcelProperty("情况描述")
private String remark;
@Schema(description = "审核人")
@ExcelProperty("审核人")
private Long auditor;
@Schema(description = "审核意见")
@ExcelProperty(value = "审核意见", converter = DictConvert.class)
@DictFormat("heli_unqualified_notification_opinion") // TODO 代码优化:建议设置到对应的 DictTypeConstants 枚举类中
private String auditOpinion;
@Schema(description = "状态,1表示正常2表示禁用", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@ExcelProperty("状态,1表示正常2表示禁用")
private Integer status;
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("创建时间")
private LocalDateTime createTime;
@Schema(description = "审核时间")
@ExcelProperty("审核时间")
private LocalDateTime auditTime;
@Schema(description = "项目名称")
private String projectName;
@Schema(description = "项目编号")
private String projectCode;
@Schema(description = "客户名称")
private String customerName;
@Schema(description = "子项目编号")
private String projectSubName;
@Schema(description = "子项目编号")
private String projectSubCode;
@Schema(description = "零件名称")
private String materialName;
@Schema(description = "物料id")
private Long compositionId;
@Schema(description = "物料名称")
private String compositionName;
@Schema(description = "规格")
private String spec;
@Schema(description = "图号")
private String blueprintNo;
@Schema(description = "系统单位")
private String unit;
@Schema(description = "工序名称")
private String procedureName;
@Schema(description = "审核人名称")
private String auditorName;
@Schema(description = "责任人名称")
private String ownerName;
@Schema(description = "创建人名称")
private String creatorName;
@Schema(description = "异常统计数量")
private String statisticAmount;
}

@ -1,72 +0,0 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.unqualifiednotification.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import javax.validation.constraints.*;
import java.util.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
@Schema(description = "管理后台 - 品质异常通知单审核新增/修改 Request VO")
@Data
public class UnqualifiedNotificationSaveReqVO {
@Schema(description = "自增字段,唯一", requiredMode = Schema.RequiredMode.REQUIRED, example = "11880")
private Long id;
@Schema(description = "编号,唯一")
private String code;
@Schema(description = "质检类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
@NotEmpty(message = "质检类型不能为空")
private String type;
@Schema(description = "单据状态 已保存|已送审|已审核 1|2|3", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "单据状态 已保存|已送审|已审核 1|2|3不能为空")
private Integer notificationStatus;
@Schema(description = "项目订单id", requiredMode = Schema.RequiredMode.REQUIRED, example = "26682")
@NotNull(message = "项目订单id不能为空")
private Long projectId;
@Schema(description = "子项目id", requiredMode = Schema.RequiredMode.REQUIRED, example = "28456")
@NotNull(message = "子项目id不能为空")
private Long projectSubId;
@Schema(description = "bom明细id", example = "21454")
private Long bomDetailId;
@Schema(description = "工序id", requiredMode = Schema.RequiredMode.REQUIRED, example = "14739")
@NotNull(message = "工序id不能为空")
private Long procedureId;
@Schema(description = "异常数量", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "异常数量不能为空")
private Integer amount;
@Schema(description = "责任人", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "责任人不能为空")
private Long owner;
@Schema(description = "情况描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "随便")
@NotEmpty(message = "情况描述不能为空")
private String remark;
@Schema(description = "审核人")
private Long auditor;
@Schema(description = "审核意见")
private String auditOpinion;
@Schema(description = "状态,1表示正常2表示禁用", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "状态,1表示正常2表示禁用不能为空")
private Integer status;
@Schema(description = "审核时间")
private LocalDateTime auditTime;
@Schema(description = "操作")
private String active;
}

@ -46,7 +46,6 @@ public class ClassesDO extends BaseDO {
/**
*
*/
@TableField(fill = FieldFill.UPDATE)
private Long leaderUserId;
/**
*

@ -1,12 +1,11 @@
package com.chanko.yunxi.mes.module.heli.dal.dataobject.composition;
import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.chanko.yunxi.mes.framework.mybatis.core.dataobject.BaseDO;
import lombok.*;
import java.math.BigDecimal;
import java.util.*;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.*;
import com.chanko.yunxi.mes.framework.mybatis.core.dataobject.BaseDO;
/**
* DO
@ -53,6 +52,6 @@ public class CompositionDO extends BaseDO {
/**
*
*/
private BigDecimal density;
private String density;
}
}

@ -31,18 +31,14 @@ public class CustomerDO extends BaseDO {
*
*/
private String code;
/**
*
*/
private String brief;
/**
*
*/
private String name;
private String brief;
/**
*
*/
private String fullName;
private String name;
/**
*
*/
@ -56,7 +52,6 @@ public class CustomerDO extends BaseDO {
/**
* ID,ID
*/
@TableField(fill = FieldFill.UPDATE)
private String userId;
/**
*
@ -153,4 +148,4 @@ public class CustomerDO extends BaseDO {
*/
private String taxNo;
}
}

@ -1,51 +0,0 @@
package com.chanko.yunxi.mes.module.heli.dal.dataobject.equipmanufacture;
import lombok.*;
import java.util.*;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.*;
import com.chanko.yunxi.mes.framework.mybatis.core.dataobject.BaseDO;
/**
* DO
*
* @author
*/
@TableName("base_equip_manufacture")
@KeySequence("base_equip_manufacture_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class EquipManufactureDO extends BaseDO {
/**
*
*/
@TableId
private Long id;
/**
*
*/
private String code;
/**
*
*/
private String name;
/**
*
*/
private String type;
/**
*
*/
private String model;
/**
* ,121
*/
private Integer status;
}

@ -1,127 +0,0 @@
package com.chanko.yunxi.mes.module.heli.dal.dataobject.invoice;
import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.chanko.yunxi.mes.framework.mybatis.core.dataobject.BaseDO;
import com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum;
import com.chanko.yunxi.mes.module.heli.enums.InvoiceStatusEnum;
import lombok.*;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* DO
*
* @author
*/
@TableName("finance_invoice")
@KeySequence("finance_invoice_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class InvoiceDO extends BaseDO {
/**
*
*/
@TableId
private Long id;
/**
* FINANCE_MAKE|FINANCE_RECEIVE |
*/
private String businessType;
/**
* id
*/
private Long orderId;
/**
*
*/
private String number;
/**
*
*
* {@link TODO heli_invoice_type }
*/
private String type;
/**
*
*/
private LocalDateTime billingDate;
/**
*
*/
private BigDecimal amount;
/**
*
*/
private BigDecimal rate;
/**
*
*/
private String remark;
/**
*
*/
private Long submitter;
/**
*
*/
private LocalDateTime submitTime;
/**
*
*/
private Long canceller;
/**
*
*/
private LocalDateTime cancelTime;
/**
* || 1|2|3
*/
private Integer status;
@TableField(exist = false)
private String submitterName;
@TableField(exist = false)
private String creatorName;
@TableField(exist = false)
private String cancellerName;
@TableField(exist = false)
private String orderCode;
public boolean canSave(){
return InvoiceStatusEnum.SAVE.getCode() == this.status.intValue();
}
public boolean canSubmit(){
return InvoiceStatusEnum.SAVE.getCode() == this.status.intValue();
}
public boolean canCancel(){
return InvoiceStatusEnum.SUBMIT.getCode() == this.status.intValue();
}
public boolean canOperate(OperateTypeEnum operateTypeEnum) {
switch (operateTypeEnum){
case SAVE:
return canSave();
case SUBMIT:
return canSubmit();
case CANCEL:
return canCancel();
default:
return false;
}
}
}

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

Loading…
Cancel
Save