1、大理片笼提供历史任务分页查询接口
2、卧式理片笼提供历史任务分页查询接口
3、原片仓储提供历史任务分页查询接口
4、中空理片笼提供历史任务分页查询接口
5、中空流程卡出片任务提供历史任务分页查询接口
6、中空任务按照任务id查询中控队列信息接口
New file |
| | |
| | | package com.mes.base.entity; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | /** |
| | | * @Author : zhoush |
| | | * @Date: 2025/3/11 14:37 |
| | | * @Description: |
| | | */ |
| | | @Data |
| | | public class PageRequest { |
| | | |
| | | @NotNull |
| | | private Integer pageNo; |
| | | @NotNull |
| | | private Integer pageSize; |
| | | } |
| | |
| | | * 大理片笼任务类型 |
| | | * 1、钢化前进片 |
| | | * 2、钢化前出片 |
| | | * 3、调度任务 |
| | | * 4、钢化后进片 |
| | | * 5、钢化后出片 |
| | | * 6、调度任务 |
| | | */ |
| | | public static final Integer BIG_STORAGE_BEFORE_IN = 1; |
| | | public static final Integer BIG_STORAGE_BEFORE_OUT = 2; |
| | |
| | | package com.mes.rawglasstask.entity.request; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.mes.base.entity.PageRequest; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class RawGlassTaskRequest { |
| | | public class RawGlassTaskRequest extends PageRequest { |
| | | |
| | | /** |
| | | * 任务类型 1 入库 2 出库 3 调度 |
| | |
| | | package com.mes.rawglasstask.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.rawglassdetails.entity.RawGlassStorageDetails; |
| | | import com.mes.rawglasstask.entity.RawGlassStorageTask; |
| | |
| | | |
| | | Boolean taskError(Long taskId); |
| | | |
| | | List<RawGlassStorageTask> queryRawGlassHistoryTask(RawGlassTaskRequest request); |
| | | Page<RawGlassStorageTask> queryRawGlassHistoryTask(RawGlassTaskRequest request); |
| | | } |
| | |
| | | import cn.hutool.core.collection.CollectionUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.common.config.Const; |
| | | import com.mes.rawglassdetails.entity.RawGlassStorageDetails; |
| | |
| | | RawGlassStorageDetailsService rawGlassStorageDetailsService; |
| | | |
| | | @Override |
| | | public List<RawGlassStorageTask> queryRawGlassHistoryTask(RawGlassTaskRequest request) { |
| | | public Page<RawGlassStorageTask> queryRawGlassHistoryTask(RawGlassTaskRequest request) { |
| | | if (request.getBeginDate() == null) { |
| | | //设置默认时间 startDate:开始时间 endDate:结束时间 |
| | | request.setBeginDate(DateUtil.getBeginDate()); |
| | | request.setEndDate(DateUtil.getEndDate()); |
| | | } |
| | | Page<RawGlassStorageTask> page = new Page<>(request.getPageNo(), request.getPageSize()); |
| | | return page(page, new LambdaQueryWrapper<RawGlassStorageTask>() |
| | | .between(RawGlassStorageTask::getCreateTime, request.getBeginDate(), request.getEndDate()) |
| | | .in(CollectionUtil.isNotEmpty(request.getTaskState()), RawGlassStorageTask::getTaskState, request.getTaskState()) |
| | | .in(CollectionUtil.isNotEmpty(request.getTaskType()), RawGlassStorageTask::getTaskType, request.getTaskType()) |
| | | .orderByDesc(RawGlassStorageTask::getCreateTime)); |
| | | } |
| | | |
| | | @Override |
| | | public List<RawGlassStorageTask> listRawGlassTask() { |
| | | RawGlassTaskRequest request = redisUtil.getCacheObject("rawGlassTaskRequest"); |
| | | if (null == request) { |
| | | request = new RawGlassTaskRequest(); |
| | | } |
| | |
| | | .in(CollectionUtil.isNotEmpty(request.getTaskState()), RawGlassStorageTask::getTaskState, request.getTaskState()) |
| | | .in(CollectionUtil.isNotEmpty(request.getTaskType()), RawGlassStorageTask::getTaskType, request.getTaskType()) |
| | | .orderByDesc(RawGlassStorageTask::getCreateTime)); |
| | | } |
| | | |
| | | @Override |
| | | public List<RawGlassStorageTask> listRawGlassTask() { |
| | | RawGlassTaskRequest request = redisUtil.getCacheObject("rawGlassTaskRequest"); |
| | | return queryRawGlassHistoryTask(request); |
| | | |
| | | } |
| | | |
| | |
| | | @ApiModelProperty(value = "厚度", position = 5) |
| | | private Integer thickness; |
| | | |
| | | /** |
| | | * 膜系 |
| | | */ |
| | | @ApiModelProperty(value = "膜系", position = 6) |
| | | private String filmsid; |
| | | |
| | | /** |
| | | * 状态 |
| | | */ |
| | | @ApiModelProperty(value = "状态", position = 6) |
| | | @ApiModelProperty(value = "状态", position = 7) |
| | | private Integer state; |
| | | |
| | | /** |
| | | * 线路 |
| | | */ |
| | | @ApiModelProperty(value = "线路", position = 7) |
| | | @ApiModelProperty(value = "线路", position = 8) |
| | | private Integer line; |
| | | |
| | | /** |
| | | * 线路 |
| | | */ |
| | | @ApiModelProperty(value = "开始时间", position = 8) |
| | | @ApiModelProperty(value = "开始时间", position = 9) |
| | | private Date createTime; |
| | | /** |
| | | * 线路 |
| | | */ |
| | | @ApiModelProperty(value = "更新时间", position = 9) |
| | | @ApiModelProperty(value = "更新时间", position = 10) |
| | | private Date updateTime; |
| | | |
| | | @TableLogic |
| | |
| | | import com.mes.tools.DateUtil; |
| | | import com.mes.utils.RedisUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | |
| | | @Autowired |
| | | RedisUtil redisUtil; |
| | | |
| | | @Value("${mes.ratio}") |
| | | private int ratio; |
| | | |
| | | |
| | | @Override |
| | | public List<EdgGlassTaskInfo> selectEdgInfo() { |
| | | EdgGlassInfoRequest request = redisUtil.getCacheObject("edgGlassRequest"); |
| | |
| | | .in(CollectionUtils.isNotEmpty(request.getStateList()), EdgGlassTaskInfo::getState, request.getStateList()) |
| | | .between(null != request.getBeginDate(), EdgGlassTaskInfo::getCreateTime, request.getBeginDate(), request.getEndDate()) |
| | | .orderByDesc(EdgGlassTaskInfo::getCreateTime); |
| | | return this.list(edgGlassWrapper); |
| | | List<EdgGlassTaskInfo> list = this.list(edgGlassWrapper); |
| | | list.stream().forEach(e -> { |
| | | e.setWidth(e.getWidth() / ratio); |
| | | e.setHeight(e.getHeight() / ratio); |
| | | e.setThickness(e.getThickness() / ratio); |
| | | }); |
| | | return list; |
| | | } |
| | | |
| | | @Override |
| | |
| | | private double thickness; |
| | | |
| | | /** |
| | | * 膜系 |
| | | */ |
| | | private String filmsid; |
| | | |
| | | /** |
| | | * 磨前宽 |
| | | */ |
| | | private double edgWidth; |
| | |
| | | package com.mes.opctask.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.mes.opctask.entity.EdgStorageDeviceTaskHistory; |
| | | import com.mes.opctask.entity.request.TaskHistoryRequest; |
| | | import com.mes.opctask.service.EdgStorageDeviceTaskHistoryService; |
| | | import com.mes.utils.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | |
| | | private EdgStorageDeviceTaskHistoryService edgStorageDeviceTaskHistoryService; |
| | | |
| | | @ApiOperation(value = "查询本条线执行过的历史任务数据", notes = "查询本条线执行过的历史任务数据") |
| | | @GetMapping |
| | | public Result<List<EdgStorageDeviceTaskHistory>> queryEdgStorageDeviceTaskHistory(TaskHistoryRequest request) { |
| | | @PostMapping |
| | | public Result<Page<EdgStorageDeviceTaskHistory>> queryEdgStorageDeviceTaskHistory(@RequestBody @Validated TaskHistoryRequest request) { |
| | | return Result.success(edgStorageDeviceTaskHistoryService.queryEdgStorageDeviceTaskHistory(request)); |
| | | } |
| | | |
| | |
| | | package com.mes.opctask.entity.request; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.mes.base.entity.PageRequest; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | * @Description: |
| | | */ |
| | | @Data |
| | | public class TaskHistoryRequest { |
| | | public class TaskHistoryRequest extends PageRequest { |
| | | |
| | | @ApiModelProperty(value = "设备id") |
| | | private Integer deviceId; |
| | |
| | | package com.mes.opctask.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.opctask.entity.EdgStorageDeviceTaskHistory; |
| | | import com.mes.opctask.entity.request.TaskHistoryRequest; |
| | |
| | | */ |
| | | public interface EdgStorageDeviceTaskHistoryService extends IService<EdgStorageDeviceTaskHistory> { |
| | | |
| | | List<EdgStorageDeviceTaskHistory> queryEdgStorageDeviceTaskHistory(TaskHistoryRequest request); |
| | | Page<EdgStorageDeviceTaskHistory> queryEdgStorageDeviceTaskHistory(TaskHistoryRequest request); |
| | | } |
| | | |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.opctask.entity.EdgStorageDeviceTaskHistory; |
| | | import com.mes.opctask.entity.request.TaskHistoryRequest; |
| | |
| | | public class EdgStorageDeviceTaskHistoryServiceImpl extends ServiceImpl<EdgStorageDeviceTaskHistoryMapper, EdgStorageDeviceTaskHistory> implements EdgStorageDeviceTaskHistoryService { |
| | | |
| | | @Override |
| | | public List<EdgStorageDeviceTaskHistory> queryEdgStorageDeviceTaskHistory(TaskHistoryRequest request) { |
| | | public Page<EdgStorageDeviceTaskHistory> queryEdgStorageDeviceTaskHistory(TaskHistoryRequest request) { |
| | | Page<EdgStorageDeviceTaskHistory> page = new Page<>(request.getPageNo(), request.getPageSize()); |
| | | LambdaQueryWrapper<EdgStorageDeviceTaskHistory> wrapper = new LambdaQueryWrapper<EdgStorageDeviceTaskHistory>() |
| | | .eq(EdgStorageDeviceTaskHistory::getDeviceId, request.getDeviceId()) |
| | | .eq(StringUtils.checkValNotNull(request.getTaskState()), EdgStorageDeviceTaskHistory::getTaskState, request.getTaskState()) |
| | |
| | | wrapper.and(e -> e.like(EdgStorageDeviceTaskHistory::getGlassIdIn, request.getGlassId()) |
| | | .or().like(EdgStorageDeviceTaskHistory::getGlassIdOut, request.getGlassId())); |
| | | } |
| | | return this.list(wrapper); |
| | | return this.page(page, wrapper); |
| | | } |
| | | } |
| | | |
| | |
| | | package com.mes.bigstoragecagetask.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.mes.bigstoragecagetask.entity.BigStorageCageHistoryTask; |
| | | import com.mes.bigstoragecagetask.entity.request.BigStorageCageHistoryRequest; |
| | | import com.mes.bigstoragecagetask.service.BigStorageCageHistoryTaskService; |
| | | import com.mes.utils.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | |
| | | @ApiOperation("按照查询条件查询理片笼信息历史任务") |
| | | @PostMapping("/queryBigStorageCageHistoryTask") |
| | | public Result<List<BigStorageCageHistoryTask>> queryBigStorageCageHistoryTask(@RequestBody BigStorageCageHistoryRequest request) { |
| | | public Result<Page<BigStorageCageHistoryTask>> queryBigStorageCageHistoryTask(@RequestBody @Validated BigStorageCageHistoryRequest request) { |
| | | return Result.build(200, "查询成功", bigStorageCageHistoryTaskService.queryBigStorageCageHistoryTask(request)); |
| | | } |
| | | } |
| | |
| | | package com.mes.bigstoragecagetask.entity.request; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.mes.base.entity.PageRequest; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | |
| | | * @Description: |
| | | */ |
| | | @Data |
| | | public class BigStorageCageHistoryRequest { |
| | | public class BigStorageCageHistoryRequest extends PageRequest { |
| | | |
| | | /** |
| | | * 玻璃id |
| | |
| | | package com.mes.bigstoragecagetask.service; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.bigstoragecagetask.entity.BigStorageCageHistoryTask; |
| | | import com.mes.bigstoragecagetask.entity.request.BigStorageCageHistoryRequest; |
| | |
| | | */ |
| | | public interface BigStorageCageHistoryTaskService extends IService<BigStorageCageHistoryTask> { |
| | | |
| | | List<BigStorageCageHistoryTask> queryBigStorageCageHistoryTask(BigStorageCageHistoryRequest request); |
| | | Page<BigStorageCageHistoryTask> queryBigStorageCageHistoryTask(BigStorageCageHistoryRequest request); |
| | | } |
| | | |
| | |
| | | import cn.hutool.core.collection.CollectionUtil; |
| | | import cn.smallbun.screw.core.util.StringUtils; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.bigstoragecagetask.entity.BigStorageCageHistoryTask; |
| | | import com.mes.bigstoragecagetask.entity.request.BigStorageCageHistoryRequest; |
| | |
| | | import com.mes.bigstoragecagetask.service.BigStorageCageHistoryTaskService; |
| | | import com.mes.tools.DateUtil; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * (BigStorageCageHistoryTask)表服务实现类 |
| | |
| | | public class BigStorageCageHistoryTaskServiceImpl extends ServiceImpl<BigStorageCageHistoryTaskMapper, BigStorageCageHistoryTask> implements BigStorageCageHistoryTaskService { |
| | | |
| | | @Override |
| | | public List<BigStorageCageHistoryTask> queryBigStorageCageHistoryTask(BigStorageCageHistoryRequest request) { |
| | | if (null == request) { |
| | | request = new BigStorageCageHistoryRequest(); |
| | | } |
| | | public Page<BigStorageCageHistoryTask> queryBigStorageCageHistoryTask(BigStorageCageHistoryRequest request) { |
| | | if (null == request.getBeginDate()) { |
| | | request.setBeginDate(DateUtil.getBeginDate()); |
| | | request.setEndDate(DateUtil.getEndDate()); |
| | | } |
| | | Page<BigStorageCageHistoryTask> page = new Page<>(request.getPageNo(), request.getPageSize()); |
| | | LambdaQueryWrapper<BigStorageCageHistoryTask> wrapper = new LambdaQueryWrapper<BigStorageCageHistoryTask>() |
| | | .like(StringUtils.isBlank(request.getGlassId()), BigStorageCageHistoryTask::getGlassId, request.getGlassId()) |
| | | .eq(request.getStartSlot() !=0, BigStorageCageHistoryTask::getStartSlot, request.getStartSlot()) |
| | | .eq(request.getTargetSlot() !=0, BigStorageCageHistoryTask::getTargetSlot, request.getTargetSlot()) |
| | | .in(CollectionUtil.isNotEmpty(request.getTaskStateList()) , BigStorageCageHistoryTask::getTaskState, request.getTaskStateList()) |
| | | .in(CollectionUtil.isNotEmpty(request.getTaskTypeList()) , BigStorageCageHistoryTask::getTaskType, request.getTaskTypeList()) |
| | | .like(StringUtils.isNotBlank(request.getGlassId()), BigStorageCageHistoryTask::getGlassId, request.getGlassId()) |
| | | .eq(request.getStartSlot() != 0, BigStorageCageHistoryTask::getStartSlot, request.getStartSlot()) |
| | | .eq(request.getTargetSlot() != 0, BigStorageCageHistoryTask::getTargetSlot, request.getTargetSlot()) |
| | | .in(CollectionUtil.isNotEmpty(request.getTaskStateList()), BigStorageCageHistoryTask::getTaskState, request.getTaskStateList()) |
| | | .in(CollectionUtil.isNotEmpty(request.getTaskTypeList()), BigStorageCageHistoryTask::getTaskType, request.getTaskTypeList()) |
| | | .between(BigStorageCageHistoryTask::getCreateTime, request.getBeginDate(), request.getEndDate()) |
| | | .orderByDesc(BigStorageCageHistoryTask::getCreateTime); |
| | | return this.list(wrapper); |
| | | return this.page(page, wrapper); |
| | | } |
| | | } |
| | | |
| | |
| | | package com.mes.rawglasstask.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.mes.rawglasstask.entity.RawGlassStorageTask; |
| | | import com.mes.rawglasstask.entity.request.RawGlassTaskRequest; |
| | | import com.mes.rawglasstask.service.RawGlassStorageTaskService; |
| | | import com.mes.utils.Result; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | |
| | | @ApiOperation("按照条件查看仓储历史任务") |
| | | @PostMapping("/queryRawGlassHistoryTask") |
| | | public Result<List<RawGlassStorageTask>> queryRawGlassHistoryTask(@RequestBody RawGlassTaskRequest request) { |
| | | public Result<Page<RawGlassStorageTask>> queryRawGlassHistoryTask(@RequestBody @Validated RawGlassTaskRequest request) { |
| | | return Result.build(200, "查询成功", rawGlassStorageTaskService.queryRawGlassHistoryTask(request)); |
| | | } |
| | | |
| | |
| | | package com.mes.hollow.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.mes.hollow.entity.HollowGlassOutRelationInfo; |
| | | import com.mes.hollow.entity.request.HollowHistoryTaskRequest; |
| | | import com.mes.hollow.entity.request.HollowTaskRequest; |
| | | import com.mes.hollow.service.HollowGlassOutRelationInfoService; |
| | | import com.mes.hollowqueue.entity.HollowGlassQueueInfo; |
| | | import com.mes.utils.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | |
| | | return Result.build(200, "修改成功", hollowGlassOutRelationInfoService.generateHollowLisecFile(flowCardId, cell, isForce, 1)); |
| | | } |
| | | |
| | | @ApiOperation("获取中空任务队列") |
| | | @PostMapping("/queryHollowHistoryTask") |
| | | public Result<Page<HollowGlassOutRelationInfo>> queryHollowHistoryTask(@RequestBody @Validated HollowHistoryTaskRequest request) { |
| | | return Result.build(200, "修改成功", hollowGlassOutRelationInfoService.queryHollowHistoryTask(request)); |
| | | } |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.mes.hollow.entity.request; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.mes.base.entity.PageRequest; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Author : zhoush |
| | | * @Date: 2025/3/11 14:15 |
| | | * @Description: |
| | | */ |
| | | @ApiModel(description = "中空历史任务请求") |
| | | @Data |
| | | public class HollowHistoryTaskRequest extends PageRequest { |
| | | |
| | | @ApiModelProperty(value = "线路按照实际界面默认 路线:930(李赛克,界面需要输入相关数据) 931") |
| | | private int cell; |
| | | |
| | | @ApiModelProperty(value = "流程卡") |
| | | private String flowCardId; |
| | | |
| | | @ApiModelProperty(value = "是否强制 0非强制 1强制") |
| | | private List<Integer>isForceList; |
| | | |
| | | @ApiModelProperty(value = "状态0新增 1执行中 2暂停 3结束") |
| | | private List<Integer> stateList; |
| | | /** |
| | | * 开始时间 |
| | | */ |
| | | @ApiModelProperty(value = "开始时间", position = 6) |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date beginDate; |
| | | |
| | | /** |
| | | * 结束时间 |
| | | */ |
| | | @ApiModelProperty(value = "结束时间", position = 7) |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date endDate; |
| | | } |
| | |
| | | package com.mes.hollow.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.hollow.entity.HollowGlassOutRelationInfo; |
| | | import com.mes.hollow.entity.request.HollowHistoryTaskRequest; |
| | | import com.mes.hollow.entity.request.HollowTaskRequest; |
| | | import com.mes.hollowqueue.entity.HollowGlassQueueInfo; |
| | | |
| | |
| | | Boolean deleteHollowTaskDetails(String flowCardId, int cell); |
| | | |
| | | String generateHollowLisecFile(String flowCardId, int cell, int isForce, int isOut) throws IOException; |
| | | |
| | | Page<HollowGlassOutRelationInfo> queryHollowHistoryTask(HollowHistoryTaskRequest request); |
| | | } |
| | | |
| | |
| | | package com.mes.hollow.service.impl; |
| | | |
| | | import cn.hutool.core.collection.CollectionUtil; |
| | | import cn.smallbun.screw.core.util.StringUtils; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.common.config.Const; |
| | | import com.mes.glassinfo.entity.GlassInfo; |
| | |
| | | import com.mes.hollow.entity.HollowFormulaDetails; |
| | | import com.mes.hollow.entity.HollowGlassOutRelationInfo; |
| | | import com.mes.hollow.entity.dto.*; |
| | | import com.mes.hollow.entity.request.HollowHistoryTaskRequest; |
| | | import com.mes.hollow.entity.request.HollowTaskRequest; |
| | | import com.mes.hollow.mapper.HollowGlassOutRelationInfoMapper; |
| | | import com.mes.hollow.service.HollowBigStorageCageDetailsService; |
| | |
| | | import com.mes.hollow.service.HollowGlassRelationInfoService; |
| | | import com.mes.hollowqueue.entity.HollowGlassQueueInfo; |
| | | import com.mes.hollowqueue.service.HollowGlassQueueInfoService; |
| | | import com.mes.tools.DateUtil; |
| | | import com.mes.utils.Blank; |
| | | import com.mes.utils.RedisUtil; |
| | | import freemarker.template.Configuration; |
| | |
| | | return "success"; |
| | | } |
| | | |
| | | @Override |
| | | public Page<HollowGlassOutRelationInfo> queryHollowHistoryTask(HollowHistoryTaskRequest request) { |
| | | Page<HollowGlassOutRelationInfo> page = new Page<>(request.getPageNo(), request.getPageSize()); |
| | | if (null == request.getBeginDate()) { |
| | | request.setBeginDate(DateUtil.getBeginDate()); |
| | | request.setEndDate(DateUtil.getEndDate()); |
| | | } |
| | | LambdaQueryWrapper<HollowGlassOutRelationInfo> wrapper = new LambdaQueryWrapper<HollowGlassOutRelationInfo>() |
| | | .eq(HollowGlassOutRelationInfo::getCell, request.getCell()) |
| | | .like(StringUtils.isNotBlank(request.getFlowCardId()), HollowGlassOutRelationInfo::getFlowCardId, request.getFlowCardId()) |
| | | .in(CollectionUtil.isNotEmpty(request.getIsForceList()), HollowGlassOutRelationInfo::getIsForce, request.getIsForceList()) |
| | | .in(CollectionUtil.isNotEmpty(request.getStateList()), HollowGlassOutRelationInfo::getState, request.getStateList()) |
| | | .between(HollowGlassOutRelationInfo::getCreateTime, request.getBeginDate(), request.getEndDate()) |
| | | .orderByDesc(HollowGlassOutRelationInfo::getCreateTime); |
| | | return this.page(page, wrapper); |
| | | } |
| | | |
| | | |
| | | private HollowGlassOutRelationInfo childrenTask(HollowTaskRequest request, int isForce) { |
| | | GlassInfo glassInfo = glassInfoService.getOne(new LambdaQueryWrapper<GlassInfo>().eq(GlassInfo::getFlowCardId, request.getFlowCardId()).last("limit 1")); |
| | |
| | | |
| | | @Resource |
| | | HollowGlassQueueInfoService hollowGlassQueueInfoService; |
| | | @ApiOperation("按照线路查询正在出片的玻璃队列") |
| | | @PostMapping("/queryHollowGlassQueueInfo") |
| | | public Result<List<HollowGlassQueueInfo>> queryHollowGlassQueueInfo(int cell) { |
| | | return Result.success(hollowGlassQueueInfoService.queryHollowGlassQueueInfo(cell)); |
| | | |
| | | @ApiOperation("按照任务id获取对应的任务队列数据") |
| | | @PostMapping("/queryHollowGlassQueueInfoByTask") |
| | | public Result<List<HollowGlassQueueInfo>> queryHollowGlassQueueInfoByTask(int taskId) { |
| | | return Result.success(hollowGlassQueueInfoService.queryHollowGlassQueueInfoByTask(taskId)); |
| | | } |
| | | } |
| | | |
| | |
| | | */ |
| | | public interface HollowGlassQueueInfoService extends IService<HollowGlassQueueInfo> { |
| | | |
| | | List<HollowGlassQueueInfo> queryHollowGlassQueueInfo(int cell); |
| | | List<HollowGlassQueueInfo> queryHollowGlassQueueInfoByTask(int taskId); |
| | | } |
| | | |
| | |
| | | HollowGlassOutRelationInfoService hollowGlassOutRelationInfoService; |
| | | |
| | | |
| | | |
| | | @Override |
| | | public List<HollowGlassQueueInfo> queryHollowGlassQueueInfo(int cell) { |
| | | HollowGlassOutRelationInfo one = hollowGlassOutRelationInfoService.getOne(new LambdaUpdateWrapper<HollowGlassOutRelationInfo>() |
| | | .eq(HollowGlassOutRelationInfo::getCell, cell) |
| | | .eq(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_START) |
| | | ); |
| | | this.list(new LambdaQueryWrapper<HollowGlassQueueInfo>() |
| | | .eq(HollowGlassQueueInfo::getFlowCardId, one.getFlowCardId()) |
| | | .eq(HollowGlassQueueInfo::getCell, one.getCell()) |
| | | ); |
| | | return null; |
| | | public List<HollowGlassQueueInfo> queryHollowGlassQueueInfoByTask(int taskId) { |
| | | return this.list(new LambdaQueryWrapper<HollowGlassQueueInfo>() |
| | | .eq(HollowGlassQueueInfo::getRelationId, taskId) |
| | | .orderByAsc(HollowGlassQueueInfo::getHollowSequence) |
| | | .orderByAsc(HollowGlassQueueInfo::getLayer)); |
| | | } |
| | | } |
| | | |
| | |
| | | package com.mes.hollowtask.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.mes.hollowtask.entity.HollowBigStorageCageHistoryTask; |
| | | import com.mes.hollowtask.entity.request.HollowBigStorageCageHistoryRequest; |
| | | import com.mes.hollowtask.service.HollowBigStorageCageHistoryTaskService; |
| | | import com.mes.utils.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * (HollowBigStorageCageHistoryTask)表控制层 |
| | |
| | | * @author makejava |
| | | * @since 2024-11-27 15:22:45 |
| | | */ |
| | | @Api(tags = "中空理片笼信息历史任务") |
| | | @RestController |
| | | @RequestMapping("hollowBigStorageCageHistoryTask") |
| | | public class HollowBigStorageCageHistoryTaskController { |
| | | |
| | | @Resource |
| | | HollowBigStorageCageHistoryTaskService hollowBigStorageCageHistoryTaskService; |
| | | |
| | | @ApiOperation("按照查询条件查询中空理片笼信息历史任务") |
| | | @PostMapping("/queryHollowBigStorageCageHistoryTask") |
| | | public Result<Page<HollowBigStorageCageHistoryTask>> queryHollowBigStorageCageHistoryTask(@RequestBody @Validated HollowBigStorageCageHistoryRequest request) { |
| | | return Result.build(200, "查询成功", hollowBigStorageCageHistoryTaskService.queryHollowBigStorageCageHistoryTask(request)); |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | package com.mes.hollowtask.entity.request; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.mes.base.entity.PageRequest; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Author : zhoush |
| | | * @Date: 2025/3/11 14:10 |
| | | * @Description: |
| | | */ |
| | | @Data |
| | | public class HollowBigStorageCageHistoryRequest extends PageRequest { |
| | | /** |
| | | * 玻璃id |
| | | */ |
| | | @ApiModelProperty(value = "玻璃id", position = 1) |
| | | private String glassId; |
| | | /** |
| | | * 起始格子 |
| | | */ |
| | | @ApiModelProperty(value = "起始格子", position = 2) |
| | | private Integer startSlot; |
| | | /** |
| | | * 目标格子 |
| | | */ |
| | | @ApiModelProperty(value = "目标格子", position = 3) |
| | | private Integer targetSlot; |
| | | /** |
| | | * 任务状态 |
| | | */ |
| | | @ApiModelProperty(value = "任务状态 0 开始 2完成 3破损 4未上车", position = 4) |
| | | private List<Integer> taskStateList; |
| | | /** |
| | | * 任务类型 |
| | | */ |
| | | @ApiModelProperty(value = "任务类型 1进片 2出片 3调度", position = 5) |
| | | private List<Integer> taskTypeList; |
| | | /** |
| | | * 开始时间 |
| | | */ |
| | | @ApiModelProperty(value = "开始时间", position = 6) |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date beginDate; |
| | | |
| | | /** |
| | | * 结束时间 |
| | | */ |
| | | @ApiModelProperty(value = "结束时间", position = 7) |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date endDate; |
| | | } |
| | |
| | | package com.mes.hollowtask.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.mes.hollowtask.entity.HollowBigStorageCageHistoryTask; |
| | | import com.mes.hollowtask.entity.request.HollowBigStorageCageHistoryRequest; |
| | | |
| | | /** |
| | | * (HollowBigStorageCageHistoryTask)表服务接口 |
| | |
| | | */ |
| | | public interface HollowBigStorageCageHistoryTaskService extends IService<HollowBigStorageCageHistoryTask> { |
| | | |
| | | Page<HollowBigStorageCageHistoryTask> queryHollowBigStorageCageHistoryTask(HollowBigStorageCageHistoryRequest request); |
| | | } |
| | | |
| | |
| | | package com.mes.hollowtask.service.impl; |
| | | |
| | | import cn.hutool.core.collection.CollectionUtil; |
| | | import cn.smallbun.screw.core.util.StringUtils; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.mes.hollowtask.entity.HollowBigStorageCageHistoryTask; |
| | | import com.mes.hollowtask.entity.request.HollowBigStorageCageHistoryRequest; |
| | | import com.mes.hollowtask.mapper.HollowBigStorageCageHistoryTaskMapper; |
| | | import com.mes.hollowtask.service.HollowBigStorageCageHistoryTaskService; |
| | | import com.mes.tools.DateUtil; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | |
| | | @Service |
| | | public class HollowBigStorageCageHistoryTaskServiceImpl extends ServiceImpl<HollowBigStorageCageHistoryTaskMapper, HollowBigStorageCageHistoryTask> implements HollowBigStorageCageHistoryTaskService { |
| | | |
| | | @Override |
| | | public Page<HollowBigStorageCageHistoryTask> queryHollowBigStorageCageHistoryTask(HollowBigStorageCageHistoryRequest request) { |
| | | Page<HollowBigStorageCageHistoryTask> page = new Page<>(request.getPageNo(), request.getPageSize()); |
| | | if (null == request.getBeginDate()) { |
| | | request.setBeginDate(DateUtil.getBeginDate()); |
| | | request.setEndDate(DateUtil.getEndDate()); |
| | | } |
| | | LambdaQueryWrapper<HollowBigStorageCageHistoryTask> wrapper = new LambdaQueryWrapper<HollowBigStorageCageHistoryTask>() |
| | | .like(StringUtils.isBlank(request.getGlassId()), HollowBigStorageCageHistoryTask::getGlassId, request.getGlassId()) |
| | | .eq(request.getStartSlot() !=0, HollowBigStorageCageHistoryTask::getStartSlot, request.getStartSlot()) |
| | | .eq(request.getTargetSlot() !=0, HollowBigStorageCageHistoryTask::getTargetSlot, request.getTargetSlot()) |
| | | .in(CollectionUtil.isNotEmpty(request.getTaskStateList()) , HollowBigStorageCageHistoryTask::getTaskState, request.getTaskStateList()) |
| | | .in(CollectionUtil.isNotEmpty(request.getTaskTypeList()) , HollowBigStorageCageHistoryTask::getTaskType, request.getTaskTypeList()) |
| | | .between(HollowBigStorageCageHistoryTask::getCreateTime, request.getBeginDate(), request.getEndDate()) |
| | | .orderByDesc(HollowBigStorageCageHistoryTask::getCreateTime); |
| | | return this.page(page,wrapper); |
| | | } |
| | | } |
| | | |