Merge remote-tracking branch 'origin/main'
commit
4426ae0b55
@ -0,0 +1,37 @@
|
|||||||
|
package cn.iocoder.yudao.module.erp.controller.admin.product.vo.category;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - ERP 产品分类工艺路线明细快照 Response VO")
|
||||||
|
@Data
|
||||||
|
public class ErpProductCategoryProcessRouteItemRespVO {
|
||||||
|
|
||||||
|
@Schema(description = "编号", example = "1")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "产品分类编号", example = "1")
|
||||||
|
private Long categoryId;
|
||||||
|
|
||||||
|
@Schema(description = "工艺路线编号", example = "1")
|
||||||
|
private Long processRouteId;
|
||||||
|
|
||||||
|
@Schema(description = "工艺路线明细编号", example = "1")
|
||||||
|
private Long processRouteItemId;
|
||||||
|
|
||||||
|
@Schema(description = "排序,从 1 开始", example = "1")
|
||||||
|
private Integer sort;
|
||||||
|
|
||||||
|
@Schema(description = "工艺参数编号", example = "100")
|
||||||
|
private Long processParameterId;
|
||||||
|
|
||||||
|
@Schema(description = "工艺参数编码")
|
||||||
|
private String processParameterCode;
|
||||||
|
|
||||||
|
@Schema(description = "工艺参数名称")
|
||||||
|
private String processParameterName;
|
||||||
|
|
||||||
|
@Schema(description = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,35 @@
|
|||||||
|
package cn.iocoder.yudao.module.erp.dal.dataobject.product;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||||
|
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ERP 产品分类工艺路线明细快照 DO
|
||||||
|
*/
|
||||||
|
@TableName("erp_product_category_process_route_item")
|
||||||
|
@KeySequence("erp_product_category_process_route_item_seq")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class ErpProductCategoryProcessRouteItemDO extends BaseDO {
|
||||||
|
|
||||||
|
@TableId
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
private Long categoryId;
|
||||||
|
|
||||||
|
private Long processRouteId;
|
||||||
|
private Long processRouteItemId;
|
||||||
|
private Integer sort;
|
||||||
|
private Long processParameterId;
|
||||||
|
private String processParameterCode;
|
||||||
|
private String processParameterName;
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
package cn.iocoder.yudao.module.erp.dal.mysql.product;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||||
|
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||||
|
import cn.iocoder.yudao.module.erp.dal.dataobject.product.ErpProductCategoryProcessRouteItemDO;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface ErpProductCategoryProcessRouteItemMapper extends BaseMapperX<ErpProductCategoryProcessRouteItemDO> {
|
||||||
|
|
||||||
|
default List<ErpProductCategoryProcessRouteItemDO> selectListByCategoryId(Long categoryId) {
|
||||||
|
return selectList(new LambdaQueryWrapperX<ErpProductCategoryProcessRouteItemDO>()
|
||||||
|
.eq(ErpProductCategoryProcessRouteItemDO::getCategoryId, categoryId)
|
||||||
|
.orderByAsc(ErpProductCategoryProcessRouteItemDO::getSort)
|
||||||
|
.orderByAsc(ErpProductCategoryProcessRouteItemDO::getId));
|
||||||
|
}
|
||||||
|
|
||||||
|
default void deleteByCategoryId(Long categoryId) {
|
||||||
|
delete(new LambdaQueryWrapperX<ErpProductCategoryProcessRouteItemDO>()
|
||||||
|
.eq(ErpProductCategoryProcessRouteItemDO::getCategoryId, categoryId));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,12 @@
|
|||||||
|
package cn.iocoder.yudao.module.mes.api.processroute;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.module.mes.api.processroute.dto.ProcessRouteSnapshotRespDTO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工艺路线 API
|
||||||
|
*/
|
||||||
|
public interface ProcessRouteApi {
|
||||||
|
|
||||||
|
ProcessRouteSnapshotRespDTO getProcessRouteSnapshot(Long id);
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
package cn.iocoder.yudao.module.mes.api.processroute.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工艺路线明细快照 DTO
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ProcessRouteItemSnapshotRespDTO {
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
private Long routeId;
|
||||||
|
|
||||||
|
private Integer sort;
|
||||||
|
|
||||||
|
private Long processParameterId;
|
||||||
|
|
||||||
|
private String processParameterCode;
|
||||||
|
|
||||||
|
private String processParameterName;
|
||||||
|
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,21 @@
|
|||||||
|
package cn.iocoder.yudao.module.mes.api.processroute.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工艺路线快照 DTO
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ProcessRouteSnapshotRespDTO {
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
private List<ProcessRouteItemSnapshotRespDTO> items;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,40 @@
|
|||||||
|
package cn.iocoder.yudao.module.mes.api.processroute;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||||
|
import cn.iocoder.yudao.module.mes.api.processroute.dto.ProcessRouteItemSnapshotRespDTO;
|
||||||
|
import cn.iocoder.yudao.module.mes.api.processroute.dto.ProcessRouteSnapshotRespDTO;
|
||||||
|
import cn.iocoder.yudao.module.mes.dal.dataobject.processroute.ProcessRouteDO;
|
||||||
|
import cn.iocoder.yudao.module.mes.dal.dataobject.processroute.ProcessRouteItemDO;
|
||||||
|
import cn.iocoder.yudao.module.mes.dal.mysql.processroute.ProcessRouteItemMapper;
|
||||||
|
import cn.iocoder.yudao.module.mes.dal.mysql.processroute.ProcessRouteMapper;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 工艺路线 API 实现
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class ProcessRouteApiImpl implements ProcessRouteApi {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ProcessRouteMapper processRouteMapper;
|
||||||
|
@Resource
|
||||||
|
private ProcessRouteItemMapper processRouteItemMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ProcessRouteSnapshotRespDTO getProcessRouteSnapshot(Long id) {
|
||||||
|
if (id == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
ProcessRouteDO processRoute = processRouteMapper.selectById(id);
|
||||||
|
if (processRoute == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
ProcessRouteSnapshotRespDTO respDTO = BeanUtils.toBean(processRoute, ProcessRouteSnapshotRespDTO.class);
|
||||||
|
List<ProcessRouteItemDO> items = processRouteItemMapper.selectListByRouteId(id);
|
||||||
|
respDTO.setItems(BeanUtils.toBean(items, ProcessRouteItemSnapshotRespDTO.class));
|
||||||
|
return respDTO;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,44 @@
|
|||||||
|
package cn.iocoder.yudao.module.mes.controller.admin.plan.vo;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 生产计划批量换线 Request VO")
|
||||||
|
@Data
|
||||||
|
public class PlanLineChangeBatchReqVO {
|
||||||
|
|
||||||
|
@Schema(description = "生产计划 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||||
|
@NotNull(message = "生产计划 ID 不能为空")
|
||||||
|
private Long planId;
|
||||||
|
|
||||||
|
@Valid
|
||||||
|
@NotEmpty(message = "换线明细列表不能为空")
|
||||||
|
@Schema(description = "换线明细列表", implementation = LineChangeItem.class)
|
||||||
|
private List<LineChangeItem> items;
|
||||||
|
|
||||||
|
@Schema(description = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Schema(description = "生产计划批量换线明细")
|
||||||
|
public static class LineChangeItem {
|
||||||
|
|
||||||
|
@Schema(description = "计划工艺流程明细 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||||
|
@NotNull(message = "计划工艺流程明细 ID 不能为空")
|
||||||
|
private Long planProcessRouteItemId;
|
||||||
|
|
||||||
|
@Schema(description = "换线后的设备 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
|
||||||
|
@NotNull(message = "换线后的设备 ID 不能为空")
|
||||||
|
private Long deviceId;
|
||||||
|
|
||||||
|
@Schema(description = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,40 @@
|
|||||||
|
package cn.iocoder.yudao.module.mes.controller.admin.plan.vo;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 生产计划换线记录批次 Response VO")
|
||||||
|
@Data
|
||||||
|
public class PlanLineChangeRecordBatchRespVO {
|
||||||
|
|
||||||
|
@Schema(description = "换线批次号", example = "B20260706000001")
|
||||||
|
private String changeBatchNo;
|
||||||
|
|
||||||
|
@Schema(description = "生产计划编号", example = "1")
|
||||||
|
private Long planId;
|
||||||
|
|
||||||
|
@Schema(description = "换线时间")
|
||||||
|
private LocalDateTime changeTime;
|
||||||
|
|
||||||
|
@Schema(description = "操作人 ID", example = "1")
|
||||||
|
private Long operatorUserId;
|
||||||
|
|
||||||
|
@Schema(description = "操作人名字", example = "张三")
|
||||||
|
private String operatorUserName;
|
||||||
|
|
||||||
|
@Schema(description = "当前计划合格数量", example = "100")
|
||||||
|
private Long passNumber;
|
||||||
|
|
||||||
|
@Schema(description = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
@Schema(description = "变更工序数量", example = "2")
|
||||||
|
private Integer changeCount;
|
||||||
|
|
||||||
|
@Schema(description = "换线明细列表")
|
||||||
|
private List<PlanLineChangeRecordRespVO> items;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,21 @@
|
|||||||
|
package cn.iocoder.yudao.module.mes.controller.admin.plan.vo;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.ToString;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 生产计划换线记录分页 Request VO")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class PlanLineChangeRecordPageReqVO extends PageParam {
|
||||||
|
|
||||||
|
@Schema(description = "生产计划 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||||
|
@NotNull(message = "生产计划 ID 不能为空")
|
||||||
|
private Long planId;
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue