Compare commits
No commits in common. 'master' and 'release_1.2.0' have entirely different histories.
master
...
release_1.2.0
@ -1,42 +0,0 @@
|
|||||||
package com.chanko.yunxi.mes.framework.excel.core.convert;
|
|
||||||
|
|
||||||
|
|
||||||
import com.alibaba.excel.converters.Converter;
|
|
||||||
import com.alibaba.excel.metadata.GlobalConfiguration;
|
|
||||||
import com.alibaba.excel.metadata.data.WriteCellData;
|
|
||||||
import com.alibaba.excel.metadata.property.ExcelContentProperty;
|
|
||||||
|
|
||||||
import java.text.SimpleDateFormat;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.time.format.DateTimeFormatter;
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 日期转换器
|
|
||||||
*
|
|
||||||
* @author chenxi
|
|
||||||
* @date 2024-02-28 09:01
|
|
||||||
*/
|
|
||||||
public class TimestampToDateConvert implements Converter<Object> {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public WriteCellData<?> convertToExcelData(Object value, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) throws Exception {
|
|
||||||
try {
|
|
||||||
String date = "";
|
|
||||||
if(value instanceof Long){
|
|
||||||
long timestamp = (Long) value;
|
|
||||||
date = new SimpleDateFormat("yyyy-MM-dd").format(new Date(timestamp));
|
|
||||||
}else if(value instanceof String){
|
|
||||||
long timestamp = Long.parseLong((String) value);
|
|
||||||
date = new SimpleDateFormat("yyyy-MM-dd").format(new Date(timestamp));
|
|
||||||
}else if(value instanceof LocalDateTime){
|
|
||||||
LocalDateTime local = (LocalDateTime) value;
|
|
||||||
date = DateTimeFormatter.ofPattern("yyyy-MM-dd").format(local);
|
|
||||||
}
|
|
||||||
return new WriteCellData<>(date);
|
|
||||||
}catch (Exception e){
|
|
||||||
}
|
|
||||||
return Converter.super.convertToExcelData(value, contentProperty, globalConfiguration);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -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;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,21 +0,0 @@
|
|||||||
package com.chanko.yunxi.mes.module.heli.enums;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 项目订单状态枚举
|
|
||||||
* @author chenxi
|
|
||||||
* @date 2024-01-18 01:19
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum DeliverSubCategoryEnum {
|
|
||||||
DELIVER_LIST("发货清单"),
|
|
||||||
OTHER_LIST("其他清单")
|
|
||||||
;
|
|
||||||
|
|
||||||
private String description;
|
|
||||||
|
|
||||||
DeliverSubCategoryEnum(String description) {
|
|
||||||
this.description = description;
|
|
||||||
}
|
|
||||||
}
|
|
@ -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;
|
|
||||||
}
|
|
||||||
}
|
|
@ -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;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,35 +0,0 @@
|
|||||||
package com.chanko.yunxi.mes.module.heli.enums;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 物料类型
|
|
||||||
* @author chenxi
|
|
||||||
* @date 2024-02-01 04:42
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum MaterialTypeEnum {
|
|
||||||
|
|
||||||
RAW("1", "原材料", "2"),
|
|
||||||
ACCESSORY("2", "副资材", "4"),
|
|
||||||
OFFICE("3", "办公/劳保", "3"),
|
|
||||||
GIVING("4", "赠送物品", "5"),
|
|
||||||
STANDARD("5", "标准件", "1"),
|
|
||||||
VIRTUAL("6", "虚拟物料", "0");
|
|
||||||
|
|
||||||
private String code;
|
|
||||||
private String description;
|
|
||||||
private String prefix;
|
|
||||||
|
|
||||||
MaterialTypeEnum(String code, String description, String prefix) {
|
|
||||||
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,25 +0,0 @@
|
|||||||
package com.chanko.yunxi.mes.module.heli.enums;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 工艺bom状态枚举
|
|
||||||
* @author chenxi
|
|
||||||
* @date 2024-02-26 11:25
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum ProcessBomStatusEnum {
|
|
||||||
|
|
||||||
SAVE(1, "已保存"),
|
|
||||||
SUBMIT(2, "已提交"),
|
|
||||||
CANCEL_SUBMIT(1, "取消提交"),
|
|
||||||
TERMINATE(3, "已终止");
|
|
||||||
|
|
||||||
private int code;
|
|
||||||
private String description;
|
|
||||||
|
|
||||||
ProcessBomStatusEnum(int code, String description) {
|
|
||||||
this.code = code;
|
|
||||||
this.description = description;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,23 +0,0 @@
|
|||||||
package com.chanko.yunxi.mes.module.heli.enums;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 工艺设计类型枚举
|
|
||||||
* @author chenxi
|
|
||||||
* @date 2024-02-21 01:09
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum ProcessDesignTypeEnum {
|
|
||||||
|
|
||||||
BLUEPRINT_FOUNDRY_TECHNOLOGY("铸造工艺"),
|
|
||||||
BLUEPRINT_3D("3D图纸"),
|
|
||||||
BLUEPRINT_2D("2D图纸"),
|
|
||||||
BLUEPRINT_WORKBLANK("毛坯图纸");
|
|
||||||
|
|
||||||
private String description;
|
|
||||||
|
|
||||||
ProcessDesignTypeEnum(String description) {
|
|
||||||
this.description = description;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,24 +0,0 @@
|
|||||||
package com.chanko.yunxi.mes.module.heli.enums;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 项目订单状态枚举
|
|
||||||
* @author chenxi
|
|
||||||
* @date 2024-01-18 01:19
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum ProjectOrderDeliverStatusEnum {
|
|
||||||
NOT(1, "未发货"),
|
|
||||||
PART(2, "部分发货"),
|
|
||||||
ALL(3, "全部发货")
|
|
||||||
;
|
|
||||||
|
|
||||||
private int code;
|
|
||||||
private String description;
|
|
||||||
|
|
||||||
ProjectOrderDeliverStatusEnum(int code, String description) {
|
|
||||||
this.code = code;
|
|
||||||
this.description = description;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,26 +0,0 @@
|
|||||||
package com.chanko.yunxi.mes.module.heli.enums;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 项目订单状态枚举
|
|
||||||
* @author chenxi
|
|
||||||
* @date 2024-01-18 01:19
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum ProjectPlanStatusEnum {
|
|
||||||
START(1, "未开始"),
|
|
||||||
PRODUCING(2, "生产中"),
|
|
||||||
COMPLETE(3, "已完成"),
|
|
||||||
TERMINATE(4, "已终止"),
|
|
||||||
CHANGE(5, "已变更"),
|
|
||||||
;
|
|
||||||
|
|
||||||
private int code;
|
|
||||||
private String description;
|
|
||||||
|
|
||||||
ProjectPlanStatusEnum(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-01-18 01:19
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum PurchaseStatusEnum {
|
|
||||||
START(1, "已保存"),
|
|
||||||
SUBMIT(2, "已送审"),
|
|
||||||
AUDIT(3, "已审核"),
|
|
||||||
REFUSE(4, "已打回"),
|
|
||||||
;
|
|
||||||
|
|
||||||
private int code;
|
|
||||||
private String description;
|
|
||||||
|
|
||||||
PurchaseStatusEnum(int code, String description) {
|
|
||||||
this.code = code;
|
|
||||||
this.description = description;
|
|
||||||
}
|
|
||||||
}
|
|
@ -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,25 +0,0 @@
|
|||||||
package com.chanko.yunxi.mes.module.heli.enums;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 出库类型
|
|
||||||
* @author chenxi
|
|
||||||
* @date 2024-02-01 02:31
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum StockOutTypeEnum {
|
|
||||||
|
|
||||||
RECEIVE(1, "领料出库"),
|
|
||||||
SALE(2, "销售出库"),
|
|
||||||
LOSS(3, "盘亏出库"),
|
|
||||||
OTHER(4, "其他出库");
|
|
||||||
|
|
||||||
private int code;
|
|
||||||
private String description;
|
|
||||||
|
|
||||||
StockOutTypeEnum(int code, String description) {
|
|
||||||
this.code = code;
|
|
||||||
this.description = description;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,23 +0,0 @@
|
|||||||
package com.chanko.yunxi.mes.module.heli.enums;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 库表类型
|
|
||||||
* @author chenxi
|
|
||||||
* @date 2024-02-01 02:28
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum StockTypeEnum {
|
|
||||||
|
|
||||||
IN(1, "入库"),
|
|
||||||
OUT(2, "出库");
|
|
||||||
|
|
||||||
private int code;
|
|
||||||
private String description;
|
|
||||||
|
|
||||||
StockTypeEnum(int code, String description) {
|
|
||||||
this.code = code;
|
|
||||||
this.description = description;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,19 +0,0 @@
|
|||||||
package com.chanko.yunxi.mes.module.heli.enums;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
public enum StorageStatusEnum {
|
|
||||||
|
|
||||||
SAVE(1, "保存"),
|
|
||||||
SUBMIT(2, "提交"),
|
|
||||||
INVALID(3, "作废");
|
|
||||||
|
|
||||||
private int code;
|
|
||||||
private String description;
|
|
||||||
|
|
||||||
StorageStatusEnum(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,22 +0,0 @@
|
|||||||
package com.chanko.yunxi.mes.module.heli.enums;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 有效状态枚举
|
|
||||||
* @author chenxi
|
|
||||||
* @date 2024-02-27 10:28
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum ValidStatusEnum {
|
|
||||||
VALID(1, "有效"),
|
|
||||||
INVALID(2, "无效");
|
|
||||||
|
|
||||||
private int code;
|
|
||||||
private String description;
|
|
||||||
|
|
||||||
ValidStatusEnum(int code, String description) {
|
|
||||||
this.code = code;
|
|
||||||
this.description = description;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,20 +0,0 @@
|
|||||||
package com.chanko.yunxi.mes.module.heli.enums;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 预警类型
|
|
||||||
* @author chenxi
|
|
||||||
* @date 2024-02-23 10:15
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
public enum WarningEnum {
|
|
||||||
|
|
||||||
PROCESS_DESIGN_DEFERRED_WARNING("工艺设计延期预警");
|
|
||||||
|
|
||||||
private String description;
|
|
||||||
|
|
||||||
WarningEnum(String description) {
|
|
||||||
this.description = description;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,56 +0,0 @@
|
|||||||
package com.chanko.yunxi.mes.module.heli.vo;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.experimental.Accessors;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 预警信息
|
|
||||||
*
|
|
||||||
* @author chenxi
|
|
||||||
* @date 2024-02-23 09:54
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@Accessors(chain = true)
|
|
||||||
public class WarningMessageVO {
|
|
||||||
|
|
||||||
@Schema(description = "是否包含预警信息")
|
|
||||||
private boolean hasWarning = false;
|
|
||||||
|
|
||||||
@Schema(description = "预警信息")
|
|
||||||
private List<WarningVO> warnings;
|
|
||||||
|
|
||||||
|
|
||||||
public static abstract class WarningVO {}
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@Accessors(chain = true)
|
|
||||||
public static class ProcessDesignDeferredWarningVO extends WarningVO {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* {@link com.chanko.yunxi.mes.module.heli.enums.WarningEnum}
|
|
||||||
*/
|
|
||||||
@Schema(description = "预警类型")
|
|
||||||
private String warningType;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* {@link com.chanko.yunxi.mes.module.heli.enums.ProcessDesignTypeEnum}
|
|
||||||
*/
|
|
||||||
@Schema(description = "工艺设计类型")
|
|
||||||
private String processDesignType;
|
|
||||||
|
|
||||||
@Schema(description = "预警接收人")
|
|
||||||
private String ownerName;
|
|
||||||
|
|
||||||
@Schema(description = "项目编号")
|
|
||||||
private String projectCode;
|
|
||||||
|
|
||||||
@Schema(description = "子项目编号")
|
|
||||||
private String projectSubCode;
|
|
||||||
|
|
||||||
@Schema(description = "剩余时间")
|
|
||||||
private long remainingTime;
|
|
||||||
}
|
|
||||||
}
|
|
@ -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,110 +0,0 @@
|
|||||||
package com.chanko.yunxi.mes.module.heli.controller.admin.equip;
|
|
||||||
|
|
||||||
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.equip.vo.*;
|
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.equip.EquipDO;
|
|
||||||
import com.chanko.yunxi.mes.module.heli.service.equip.EquipService;
|
|
||||||
|
|
||||||
@Tag(name = "管理后台 - 设备信息")
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/heli/equip")
|
|
||||||
@Validated
|
|
||||||
public class EquipController {
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private EquipService equipService;
|
|
||||||
|
|
||||||
@PostMapping("/create")
|
|
||||||
@Operation(summary = "创建设备信息")
|
|
||||||
@PreAuthorize("@ss.hasPermission('heli:equip:create')")
|
|
||||||
public CommonResult<Long> createEquip(@Valid @RequestBody EquipSaveReqVO createReqVO) {
|
|
||||||
return success(equipService.createEquip(createReqVO));
|
|
||||||
}
|
|
||||||
|
|
||||||
@PutMapping("/update")
|
|
||||||
@Operation(summary = "更新设备信息")
|
|
||||||
@PreAuthorize("@ss.hasPermission('heli:equip:update')")
|
|
||||||
public CommonResult<Boolean> updateEquip(@Valid @RequestBody EquipSaveReqVO updateReqVO) {
|
|
||||||
equipService.updateEquip(updateReqVO);
|
|
||||||
return success(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@DeleteMapping("/delete")
|
|
||||||
@Operation(summary = "删除设备信息")
|
|
||||||
@Parameter(name = "id", description = "编号", required = true)
|
|
||||||
@PreAuthorize("@ss.hasPermission('heli:equip:delete')")
|
|
||||||
public CommonResult<Boolean> deleteEquip(@RequestParam("id") Long id) {
|
|
||||||
equipService.deleteEquip(id);
|
|
||||||
return success(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("/get")
|
|
||||||
@Operation(summary = "获得设备信息")
|
|
||||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
|
||||||
@PreAuthorize("@ss.hasPermission('heli:equip:query')")
|
|
||||||
public CommonResult<EquipRespVO> getEquip(@RequestParam("id") Long id) {
|
|
||||||
EquipDO equip = equipService.getEquip(id);
|
|
||||||
return success(BeanUtils.toBean(equip, EquipRespVO.class));
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("/page")
|
|
||||||
@Operation(summary = "获得设备信息分页")
|
|
||||||
@PreAuthorize("@ss.hasPermission('heli:equip:query')")
|
|
||||||
public CommonResult<PageResult<EquipRespVO>> getEquipPage(@Valid EquipPageReqVO pageReqVO) {
|
|
||||||
PageResult<EquipDO> pageResult = equipService.getEquipPage(pageReqVO);
|
|
||||||
return success(BeanUtils.toBean(pageResult, EquipRespVO.class));
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("/export-excel")
|
|
||||||
@Operation(summary = "导出设备信息 Excel")
|
|
||||||
@PreAuthorize("@ss.hasPermission('heli:equip:export')")
|
|
||||||
@OperateLog(type = EXPORT)
|
|
||||||
public void exportEquipExcel(@Valid EquipPageReqVO pageReqVO,
|
|
||||||
HttpServletResponse response) throws IOException {
|
|
||||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
|
||||||
List<EquipDO> list = equipService.getEquipPage(pageReqVO).getList();
|
|
||||||
// 导出 Excel
|
|
||||||
ExcelUtils.write(response, "设备信息.xls", "数据", EquipRespVO.class,
|
|
||||||
BeanUtils.toBean(list, EquipRespVO.class));
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping({"/all-simples"})
|
|
||||||
@Operation(summary = "TODO:获取设备信息信息列表", description = "只包含被开启的设备信息,主要用于前端的下拉选项")
|
|
||||||
public CommonResult<List<Map<String, Object>> > getSimpleList() {
|
|
||||||
List<Map<String, Object>> list = equipService.getEquipSimpleList();
|
|
||||||
// 拼接数据
|
|
||||||
return success(list);
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping({"/all-no-status-simples"})
|
|
||||||
@Operation(summary = "TODO:获取无状态设备信息信息列表", description = "设备信息,主要用于前端的下拉选项")
|
|
||||||
public CommonResult<List<Map<String, Object>> > getNoStatusSimpleList() {
|
|
||||||
List<Map<String, Object>> list = equipService.getEquipNoStatusSimpleList();
|
|
||||||
// 拼接数据
|
|
||||||
return success(list);
|
|
||||||
}
|
|
||||||
}
|
|
@ -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,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,95 +0,0 @@
|
|||||||
package com.chanko.yunxi.mes.module.heli.controller.admin.materialplan;
|
|
||||||
|
|
||||||
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.materialplan.vo.*;
|
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.materialplan.MaterialPlanDO;
|
|
||||||
import com.chanko.yunxi.mes.module.heli.service.materialplan.MaterialPlanService;
|
|
||||||
|
|
||||||
@Tag(name = "管理后台 - 物料需求计划")
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/heli/material-plan")
|
|
||||||
@Validated
|
|
||||||
public class MaterialPlanController {
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private MaterialPlanService materialPlanService;
|
|
||||||
|
|
||||||
@PostMapping("/create")
|
|
||||||
@Operation(summary = "创建物料需求计划")
|
|
||||||
@PreAuthorize("@ss.hasPermission('heli:material-plan:create')")
|
|
||||||
public CommonResult<Long> createMaterialPlan(@Valid @RequestBody MaterialPlanSaveReqVO createReqVO) {
|
|
||||||
return success(materialPlanService.createMaterialPlan(createReqVO));
|
|
||||||
}
|
|
||||||
|
|
||||||
@PutMapping("/update")
|
|
||||||
@Operation(summary = "更新物料需求计划")
|
|
||||||
@PreAuthorize("@ss.hasPermission('heli:material-plan:update')")
|
|
||||||
public CommonResult<Boolean> updateMaterialPlan(@Valid @RequestBody MaterialPlanSaveReqVO updateReqVO) {
|
|
||||||
materialPlanService.updateMaterialPlan(updateReqVO);
|
|
||||||
return success(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@DeleteMapping("/delete")
|
|
||||||
@Operation(summary = "删除物料需求计划")
|
|
||||||
@Parameter(name = "id", description = "编号", required = true)
|
|
||||||
@PreAuthorize("@ss.hasPermission('heli:material-plan:delete')")
|
|
||||||
public CommonResult<Boolean> deleteMaterialPlan(@RequestParam("id") Long id) {
|
|
||||||
materialPlanService.deleteMaterialPlan(id);
|
|
||||||
return success(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("/get")
|
|
||||||
@Operation(summary = "获得物料需求计划")
|
|
||||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
|
||||||
@PreAuthorize("@ss.hasPermission('heli:material-plan:query')")
|
|
||||||
public CommonResult<MaterialPlanRespVO> getMaterialPlan(@RequestParam("id") Long id) {
|
|
||||||
MaterialPlanDO materialPlan = materialPlanService.getMaterialPlan(id);
|
|
||||||
return success(BeanUtils.toBean(materialPlan, MaterialPlanRespVO.class));
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("/page")
|
|
||||||
@Operation(summary = "获得物料需求计划分页")
|
|
||||||
@PreAuthorize("@ss.hasPermission('heli:material-plan:query')")
|
|
||||||
public CommonResult<PageResult<MaterialPlanRespVO>> getMaterialPlanPage(@Valid MaterialPlanPageReqVO pageReqVO) {
|
|
||||||
PageResult<MaterialPlanDO> pageResult = materialPlanService.getMaterialPlanPage(pageReqVO);
|
|
||||||
return success(BeanUtils.toBean(pageResult, MaterialPlanRespVO.class));
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("/export-excel")
|
|
||||||
@Operation(summary = "导出物料需求计划 Excel")
|
|
||||||
@PreAuthorize("@ss.hasPermission('heli:material-plan:export')")
|
|
||||||
@OperateLog(type = EXPORT)
|
|
||||||
public void exportMaterialPlanExcel(@Valid MaterialPlanPageReqVO pageReqVO,
|
|
||||||
HttpServletResponse response) throws IOException {
|
|
||||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
|
||||||
List<MaterialPlanDO> list = materialPlanService.getMaterialPlanPage(pageReqVO).getList();
|
|
||||||
// 导出 Excel
|
|
||||||
ExcelUtils.write(response, "物料需求计划.xls", "数据", MaterialPlanRespVO.class,
|
|
||||||
BeanUtils.toBean(list, MaterialPlanRespVO.class));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -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,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 +0,0 @@
|
|||||||
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));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,55 +0,0 @@
|
|||||||
package com.chanko.yunxi.mes.module.heli.controller.admin.materialplandetail.vo;
|
|
||||||
|
|
||||||
import lombok.*;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
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 MaterialPlanDetailPageReqVO extends PageParam {
|
|
||||||
|
|
||||||
@Schema(description = "自增字段,唯一")
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
@Schema(description = "物料需求采购计划id")
|
|
||||||
private Long projectMaterialPlanId;
|
|
||||||
|
|
||||||
@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;
|
|
||||||
|
|
||||||
@Schema(description = "需求数量")
|
|
||||||
private BigDecimal requireAmount;
|
|
||||||
|
|
||||||
@Schema(description = "需求到货日期")
|
|
||||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
|
||||||
private LocalDateTime[] requireArriveTime;
|
|
||||||
|
|
||||||
@Schema(description = "备注")
|
|
||||||
private String description;
|
|
||||||
|
|
||||||
@Schema(description = "创建时间")
|
|
||||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
|
||||||
private LocalDateTime[] createTime;
|
|
||||||
|
|
||||||
}
|
|
@ -1,78 +0,0 @@
|
|||||||
package com.chanko.yunxi.mes.module.heli.controller.admin.materialplandetail.vo;
|
|
||||||
|
|
||||||
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.*;
|
|
||||||
|
|
||||||
@Schema(description = "管理后台 - 物料需求计划物料详情 Response VO")
|
|
||||||
@Data
|
|
||||||
@ExcelIgnoreUnannotated
|
|
||||||
public class MaterialPlanDetailRespVO {
|
|
||||||
|
|
||||||
@Schema(description = "自增字段,唯一", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
||||||
@ExcelProperty("自增字段,唯一")
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
@Schema(description = "物料需求采购计划id", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
||||||
@ExcelProperty("物料需求采购计划id")
|
|
||||||
private Long projectMaterialPlanId;
|
|
||||||
|
|
||||||
@Schema(description = "物料id", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
||||||
@ExcelProperty("物料id")
|
|
||||||
private Long materialId;
|
|
||||||
|
|
||||||
@Schema(description = "子项目编号")
|
|
||||||
@ExcelProperty("子项目编号")
|
|
||||||
private Long projectSubId;
|
|
||||||
|
|
||||||
@Schema(description = "需求数量")
|
|
||||||
@ExcelProperty("需求数量")
|
|
||||||
private BigDecimal requireAmount;
|
|
||||||
|
|
||||||
@Schema(description = "库存数量")
|
|
||||||
@ExcelProperty("库存数量")
|
|
||||||
private BigDecimal matRest;
|
|
||||||
|
|
||||||
@Schema(description = "需求到货日期")
|
|
||||||
@ExcelProperty("需求到货日期")
|
|
||||||
private LocalDateTime requireArriveTime;
|
|
||||||
|
|
||||||
@Schema(description = "备注")
|
|
||||||
@ExcelProperty("备注")
|
|
||||||
private String description;
|
|
||||||
|
|
||||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
||||||
@ExcelProperty("创建时间")
|
|
||||||
private LocalDateTime createTime;
|
|
||||||
|
|
||||||
@Schema(description = "物料id", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
||||||
@ExcelProperty("物料id")
|
|
||||||
private Long matId;
|
|
||||||
|
|
||||||
@Schema(description = "备注")
|
|
||||||
@ExcelProperty("物料名称")
|
|
||||||
private String matName;
|
|
||||||
|
|
||||||
@Schema(description = "备注")
|
|
||||||
@ExcelProperty("物料编码")
|
|
||||||
private String matCode;
|
|
||||||
|
|
||||||
@Schema(description = "备注")
|
|
||||||
@ExcelProperty("物料规格型号")
|
|
||||||
private String matSpec;
|
|
||||||
|
|
||||||
@Schema(description = "备注")
|
|
||||||
@ExcelProperty("物料单位")
|
|
||||||
private String matUnit;
|
|
||||||
|
|
||||||
@Schema(description = "备注")
|
|
||||||
@ExcelProperty("物料类型")
|
|
||||||
private String matType;
|
|
||||||
|
|
||||||
}
|
|
@ -1,40 +0,0 @@
|
|||||||
package com.chanko.yunxi.mes.module.heli.controller.admin.materialplandetail.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 MaterialPlanDetailSaveReqVO {
|
|
||||||
|
|
||||||
@Schema(description = "自增字段,唯一", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
@Schema(description = "物料需求采购计划id", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
||||||
@NotNull(message = "物料需求采购计划id不能为空")
|
|
||||||
private Long projectMaterialPlanId;
|
|
||||||
|
|
||||||
@Schema(description = "物料id", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
||||||
@NotNull(message = "物料id不能为空")
|
|
||||||
private Long materialId;
|
|
||||||
|
|
||||||
@Schema(description = "子项目编号")
|
|
||||||
private Long projectSubId;
|
|
||||||
|
|
||||||
@Schema(description = "需求数量")
|
|
||||||
private BigDecimal requireAmount;
|
|
||||||
|
|
||||||
@Schema(description = "需求到货日期")
|
|
||||||
private LocalDateTime requireArriveTime;
|
|
||||||
|
|
||||||
@Schema(description = "备注")
|
|
||||||
private String description;
|
|
||||||
|
|
||||||
}
|
|
@ -1,103 +0,0 @@
|
|||||||
package com.chanko.yunxi.mes.module.heli.controller.admin.plan;
|
|
||||||
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import io.swagger.v3.oas.annotations.Parameter;
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
|
|
||||||
import javax.validation.constraints.*;
|
|
||||||
import javax.validation.*;
|
|
||||||
import javax.servlet.http.*;
|
|
||||||
import java.util.*;
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import com.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.plan.vo.*;
|
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.plan.PlanDO;
|
|
||||||
import com.chanko.yunxi.mes.module.heli.service.plan.PlanService;
|
|
||||||
|
|
||||||
@Tag(name = "管理后台 - 生产计划")
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/heli/plan")
|
|
||||||
@Validated
|
|
||||||
public class PlanController {
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private PlanService planService;
|
|
||||||
|
|
||||||
@PostMapping("/create")
|
|
||||||
@Operation(summary = "创建生产计划")
|
|
||||||
@PreAuthorize("@ss.hasPermission('heli:plan:create')")
|
|
||||||
public CommonResult<Long> createPlan(@Valid @RequestBody PlanSaveReqVO createReqVO) {
|
|
||||||
return success(planService.createPlan(createReqVO));
|
|
||||||
}
|
|
||||||
|
|
||||||
@PutMapping("/update")
|
|
||||||
@Operation(summary = "更新生产计划")
|
|
||||||
@PreAuthorize("@ss.hasPermission('heli:plan:update')")
|
|
||||||
public CommonResult<Boolean> updatePlan(@Valid @RequestBody PlanSaveReqVO updateReqVO) {
|
|
||||||
planService.updatePlan(updateReqVO);
|
|
||||||
return success(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@DeleteMapping("/delete")
|
|
||||||
@Operation(summary = "删除生产计划")
|
|
||||||
@Parameter(name = "id", description = "编号", required = true)
|
|
||||||
@PreAuthorize("@ss.hasPermission('heli:plan:delete')")
|
|
||||||
public CommonResult<Boolean> deletePlan(@RequestParam("id") Long id) {
|
|
||||||
planService.deletePlan(id);
|
|
||||||
return success(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("/get")
|
|
||||||
@Operation(summary = "获得生产计划")
|
|
||||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
|
||||||
@PreAuthorize("@ss.hasPermission('heli:plan:query')")
|
|
||||||
public CommonResult<PlanRespVO> getPlan(@RequestParam("id") Long id) {
|
|
||||||
PlanDO plan = planService.getPlan(id);
|
|
||||||
return success(BeanUtils.toBean(plan, PlanRespVO.class));
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("/page")
|
|
||||||
@Operation(summary = "获得生产计划分页")
|
|
||||||
@PreAuthorize("@ss.hasPermission('heli:plan:query')")
|
|
||||||
public CommonResult<PageResult<PlanRespVO>> getPlanPage(@Valid PlanPageReqVO pageReqVO) {
|
|
||||||
PageResult<PlanDO> pageResult = planService.getPlanPage(pageReqVO);
|
|
||||||
return success(BeanUtils.toBean(pageResult, PlanRespVO.class));
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("/page-by-status")
|
|
||||||
@Operation(summary = "获得生产计划分页")
|
|
||||||
@PreAuthorize("@ss.hasPermission('heli:plan:query')")
|
|
||||||
public CommonResult<PageResult<PlanRespVO>> getPlanPageByStatus(@Valid PlanPageReqVO pageReqVO) {
|
|
||||||
PageResult<PlanDO> pageResult = planService.getPlanPageByStatus(pageReqVO);
|
|
||||||
return success(BeanUtils.toBean(pageResult, PlanRespVO.class));
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("/export-excel")
|
|
||||||
@Operation(summary = "导出生产计划 Excel")
|
|
||||||
@PreAuthorize("@ss.hasPermission('heli:plan:export')")
|
|
||||||
@OperateLog(type = EXPORT)
|
|
||||||
public void exportPlanExcel(@Valid PlanPageReqVO pageReqVO,
|
|
||||||
HttpServletResponse response) throws IOException {
|
|
||||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
|
||||||
List<PlanDO> list = planService.getPlanPage(pageReqVO).getList();
|
|
||||||
// 导出 Excel
|
|
||||||
ExcelUtils.write(response, "生产计划.xls", "数据", PlanRespVO.class,
|
|
||||||
BeanUtils.toBean(list, PlanRespVO.class));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,95 +0,0 @@
|
|||||||
package com.chanko.yunxi.mes.module.heli.controller.admin.plansub;
|
|
||||||
|
|
||||||
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.plansub.vo.*;
|
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.plansub.PlanSubDO;
|
|
||||||
import com.chanko.yunxi.mes.module.heli.service.plansub.PlanSubService;
|
|
||||||
|
|
||||||
@Tag(name = "管理后台 - 生产计划子项目")
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/heli/plan-sub")
|
|
||||||
@Validated
|
|
||||||
public class PlanSubController {
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private PlanSubService planSubService;
|
|
||||||
|
|
||||||
@PostMapping("/create")
|
|
||||||
@Operation(summary = "创建生产计划子项目")
|
|
||||||
@PreAuthorize("@ss.hasPermission('heli:plan-sub:create')")
|
|
||||||
public CommonResult<Long> createPlanSub(@Valid @RequestBody PlanSubSaveReqVO createReqVO) {
|
|
||||||
return success(planSubService.createPlanSub(createReqVO));
|
|
||||||
}
|
|
||||||
|
|
||||||
@PutMapping("/update")
|
|
||||||
@Operation(summary = "更新生产计划子项目")
|
|
||||||
@PreAuthorize("@ss.hasPermission('heli:plan-sub:update')")
|
|
||||||
public CommonResult<Boolean> updatePlanSub(@Valid @RequestBody PlanSubSaveReqVO updateReqVO) {
|
|
||||||
planSubService.updatePlanSub(updateReqVO);
|
|
||||||
return success(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@DeleteMapping("/delete")
|
|
||||||
@Operation(summary = "删除生产计划子项目")
|
|
||||||
@Parameter(name = "id", description = "编号", required = true)
|
|
||||||
@PreAuthorize("@ss.hasPermission('heli:plan-sub:delete')")
|
|
||||||
public CommonResult<Boolean> deletePlanSub(@RequestParam("id") Long id) {
|
|
||||||
planSubService.deletePlanSub(id);
|
|
||||||
return success(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("/get")
|
|
||||||
@Operation(summary = "获得生产计划子项目")
|
|
||||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
|
||||||
@PreAuthorize("@ss.hasPermission('heli:plan-sub:query')")
|
|
||||||
public CommonResult<PlanSubRespVO> getPlanSub(@RequestParam("id") Long id) {
|
|
||||||
PlanSubDO planSub = planSubService.getPlanSub(id);
|
|
||||||
return success(BeanUtils.toBean(planSub, PlanSubRespVO.class));
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("/page")
|
|
||||||
@Operation(summary = "获得生产计划子项目分页")
|
|
||||||
@PreAuthorize("@ss.hasPermission('heli:plan-sub:query')")
|
|
||||||
public CommonResult<PageResult<PlanSubRespVO>> getPlanSubPage(@Valid PlanSubPageReqVO pageReqVO) {
|
|
||||||
PageResult<PlanSubDO> pageResult = planSubService.getPlanSubPage(pageReqVO);
|
|
||||||
return success(BeanUtils.toBean(pageResult, PlanSubRespVO.class));
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("/export-excel")
|
|
||||||
@Operation(summary = "导出生产计划子项目 Excel")
|
|
||||||
@PreAuthorize("@ss.hasPermission('heli:plan-sub:export')")
|
|
||||||
@OperateLog(type = EXPORT)
|
|
||||||
public void exportPlanSubExcel(@Valid PlanSubPageReqVO pageReqVO,
|
|
||||||
HttpServletResponse response) throws IOException {
|
|
||||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
|
||||||
List<PlanSubDO> list = planSubService.getPlanSubPage(pageReqVO).getList();
|
|
||||||
// 导出 Excel
|
|
||||||
ExcelUtils.write(response, "生产计划子项目.xls", "数据", PlanSubRespVO.class,
|
|
||||||
BeanUtils.toBean(list, PlanSubRespVO.class));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,61 +0,0 @@
|
|||||||
package com.chanko.yunxi.mes.module.heli.controller.admin.plansub.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 PlanSubPageReqVO extends PageParam {
|
|
||||||
|
|
||||||
@Schema(description = "自增字段,唯一")
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
@Schema(description = "计划id")
|
|
||||||
private Long projectPlanId;
|
|
||||||
|
|
||||||
@Schema(description = "项目id")
|
|
||||||
private Long projectId;
|
|
||||||
|
|
||||||
@Schema(description = "子项目id")
|
|
||||||
private Long projectSubId;
|
|
||||||
|
|
||||||
@Schema(description = "模具类型id")
|
|
||||||
private Long mouldId;
|
|
||||||
|
|
||||||
@Schema(description = "设备id")
|
|
||||||
private Long equipId;
|
|
||||||
|
|
||||||
@Schema(description = "毛坯结束日期")
|
|
||||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
|
||||||
private LocalDateTime[] blankDate;
|
|
||||||
|
|
||||||
@Schema(description = "毛坯负责人")
|
|
||||||
private String blankOwner;
|
|
||||||
|
|
||||||
@Schema(description = "2D结束日期")
|
|
||||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
|
||||||
private LocalDateTime[] twoDimDate;
|
|
||||||
|
|
||||||
@Schema(description = "2D负责人")
|
|
||||||
private String twoDimOwner;
|
|
||||||
|
|
||||||
@Schema(description = "3D结束日期")
|
|
||||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
|
||||||
private LocalDateTime[] threeDimDate;
|
|
||||||
|
|
||||||
@Schema(description = "3D负责人")
|
|
||||||
private String threeDimOwner;
|
|
||||||
|
|
||||||
@Schema(description = "创建时间")
|
|
||||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
|
||||||
private LocalDateTime[] createTime;
|
|
||||||
|
|
||||||
}
|
|
@ -1,79 +0,0 @@
|
|||||||
package com.chanko.yunxi.mes.module.heli.controller.admin.plansub.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 PlanSubRespVO {
|
|
||||||
|
|
||||||
@Schema(description = "自增字段,唯一", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
||||||
@ExcelProperty("自增字段,唯一")
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
@Schema(description = "计划id", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
||||||
@ExcelProperty("计划id")
|
|
||||||
private Long projectPlanId;
|
|
||||||
|
|
||||||
@Schema(description = "项目id", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
||||||
@ExcelProperty("项目id")
|
|
||||||
private Long projectId;
|
|
||||||
|
|
||||||
@Schema(description = "子项目id")
|
|
||||||
@ExcelProperty("子项目id")
|
|
||||||
private Long projectSubId;
|
|
||||||
|
|
||||||
@Schema(description = "子项目简称")
|
|
||||||
@ExcelProperty("子项目简称")
|
|
||||||
private String projectSubShortName;
|
|
||||||
|
|
||||||
@Schema(description = "子项目编码")
|
|
||||||
@ExcelProperty("子项目编码")
|
|
||||||
private String projectSubCode;
|
|
||||||
|
|
||||||
@Schema(description = "模具类型id")
|
|
||||||
@ExcelProperty("模具类型id")
|
|
||||||
private Long mouldId;
|
|
||||||
|
|
||||||
@Schema(description = "设备id")
|
|
||||||
@ExcelProperty("设备id")
|
|
||||||
private Long equipId;
|
|
||||||
|
|
||||||
@Schema(description = "毛坯结束日期")
|
|
||||||
@ExcelProperty("毛坯结束日期")
|
|
||||||
private LocalDateTime blankDate;
|
|
||||||
|
|
||||||
@Schema(description = "毛坯负责人")
|
|
||||||
@ExcelProperty("毛坯负责人")
|
|
||||||
private Long blankOwner;
|
|
||||||
|
|
||||||
@Schema(description = "2D结束日期")
|
|
||||||
@ExcelProperty("2D结束日期")
|
|
||||||
private LocalDateTime twoDimDate;
|
|
||||||
|
|
||||||
@Schema(description = "2D负责人")
|
|
||||||
@ExcelProperty("2D负责人")
|
|
||||||
private Long twoDimOwner;
|
|
||||||
|
|
||||||
@Schema(description = "3D结束日期")
|
|
||||||
@ExcelProperty("3D结束日期")
|
|
||||||
private LocalDateTime threeDimDate;
|
|
||||||
|
|
||||||
@Schema(description = "3D负责人")
|
|
||||||
@ExcelProperty("3D负责人")
|
|
||||||
private Long threeDimOwner;
|
|
||||||
|
|
||||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
||||||
@ExcelProperty("创建时间")
|
|
||||||
private LocalDateTime createTime;
|
|
||||||
|
|
||||||
@Schema(description = "子项目名称")
|
|
||||||
private String projectSubName;
|
|
||||||
|
|
||||||
}
|
|
@ -1,58 +0,0 @@
|
|||||||
package com.chanko.yunxi.mes.module.heli.controller.admin.plansub.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 PlanSubSaveReqVO {
|
|
||||||
|
|
||||||
@Schema(description = "自增字段,唯一", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
@Schema(description = "计划id", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
||||||
private Long projectPlanId;
|
|
||||||
|
|
||||||
@Schema(description = "项目id", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
||||||
@NotNull(message = "项目id不能为空")
|
|
||||||
private Long projectId;
|
|
||||||
|
|
||||||
@Schema(description = "子项目id")
|
|
||||||
private Long projectSubId;
|
|
||||||
|
|
||||||
@Schema(description = "子项目简称")
|
|
||||||
private String projectSubShortName;
|
|
||||||
|
|
||||||
@Schema(description = "子项目编号")
|
|
||||||
private String projectSubCode;
|
|
||||||
|
|
||||||
@Schema(description = "模具类型id")
|
|
||||||
private Long mouldId;
|
|
||||||
|
|
||||||
@Schema(description = "设备id")
|
|
||||||
private Long equipId;
|
|
||||||
|
|
||||||
@Schema(description = "毛坯结束日期")
|
|
||||||
private LocalDateTime blankDate;
|
|
||||||
|
|
||||||
@Schema(description = "毛坯负责人")
|
|
||||||
private String blankOwner;
|
|
||||||
|
|
||||||
@Schema(description = "2D结束日期")
|
|
||||||
private LocalDateTime twoDimDate;
|
|
||||||
|
|
||||||
@Schema(description = "2D负责人")
|
|
||||||
private String twoDimOwner;
|
|
||||||
|
|
||||||
@Schema(description = "3D结束日期")
|
|
||||||
private LocalDateTime threeDimDate;
|
|
||||||
|
|
||||||
@Schema(description = "3D负责人")
|
|
||||||
private String threeDimOwner;
|
|
||||||
|
|
||||||
}
|
|
@ -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,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;
|
|
||||||
|
|
||||||
}
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue