/* * Copyright (c) 2018-2025, ztt All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * Neither the name of the pig4cloud.com developer nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * Author: ztt */ package com.chinaztt.mes.production.service; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.IService; import com.chinaztt.mes.basic.entity.Template; import com.chinaztt.mes.plan.dto.ManufacturingOrderDTO; import com.chinaztt.mes.plan.dto.ManufacturingOrderOperationTemplateDTO; import com.chinaztt.mes.production.dto.*; import com.chinaztt.mes.production.entity.*; import com.chinaztt.mes.production.vo.OperationTaskScreenVO; import com.chinaztt.ztt.common.core.util.R; import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletResponse; import java.util.List; /** * 工序任务 * * @author zhangxy * @date 2020-09-18 09:26:35 */ public interface OperationTaskService extends IService { /** * 分页查询 * * @param page * @param ew * @return */ IPage> getPage(Page page, QueryWrapper ew); /** * 工作站id * * @param workstationId * @return */ List getOperationTask(Long workstationId, String productSn, String salesOrder, String productName, String outBatchNo, String mpsNo); /** * 改变工单状态 * * @param ids * @param event * @return */ boolean changeState(List ids, String event); /** * 改变后台工单状态 * * @param id * @param event * @return */ boolean changeState(Long id, String event); /** * 根据id查询 * * @param id * @return */ OperationTaskDTO getOperation(Long id); /** * 关联保存 * * @param operationTaskDTO * @return */ String fullSave(OperationTaskDTO operationTaskDTO); /** * 批量保存 * * @param operationTaskDTOList * @return */ List batchFullSave(List operationTaskDTOList); /** * 关联修改 * * @param operationTaskDTO * @return */ String fullUpdate(OperationTaskDTO operationTaskDTO); /** * 关联删除 * * @param id * @return */ boolean fullDelete(Long id); /** * 通过id查询工单来源 * * @param id * @return */ List getOperationSupplyById(Long id); /** * 通过id查询工单所需物料 * * @param gen * @return */ List getMaterial(QueryWrapper gen); /** * PDA查询所有 * * @param page * @param gen * @return */ IPage> pdaPage(Page page, QueryWrapper gen); /** * PDA查询工单所需物料 * * @param gen * @return */ List pdaMaterial(QueryWrapper gen); /** * 通过工序任务ID查询工单所需物料 * * @param id * @return */ List getOperationMaterialById(Long id); /** * 通过id查询工单所需物料 * * @param id * @return */ OperationTaskMaterial getOperationMaterialByMaterialId(Long id); /** * 新增工单所需物料 * * @param operationTaskMaterial * @return */ R addOperationMaterial(OperationTaskMaterial operationTaskMaterial); /** * 更新工单所需物料 * * @param operationTaskMaterial * @return */ R updateOperationMaterial(OperationTaskMaterial operationTaskMaterial); /** * 删除工单所需物料 * * @param id * @return */ R deleteOperationMaterial(Long id); /** * 通过id查询工单所关联的模板和参数 * * @param id * @return */ List getTemplate(Long id); /** * 通过工序id、模板类型、所在页面查询工单所关联的模板(类型为生产记录可以修改) * * @param id * @param page * @param template * @return */ IPage> getTemplateUpdate(Page page, Long id, Template template); /** * 通过模板类型查询工单所关联的模板 * * @param page * @param gen * @return */ IPage> getTemplateByType(Page page, QueryWrapper