/* * 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.technology.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.technology.dto.RoutingDTO; import com.chinaztt.mes.technology.dto.RoutingOperationDTO; import com.chinaztt.mes.technology.entity.Routing; import com.chinaztt.mes.technology.entity.RoutingOperationParam; import com.chinaztt.mes.technology.entity.RoutingOperationTemplate; import com.chinaztt.mes.technology.excel.RoutingData; import com.chinaztt.mes.technology.excel.RoutingExcelData; import com.chinaztt.mes.technology.excel.StructureData; import com.chinaztt.ztt.common.core.util.R; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.List; import java.util.Map; /** * 工艺 * * @author zhangxy * @date 2020-08-19 09:36:29 */ public interface RoutingService extends IService { /** * 分页查询 * * @param page * @param ew * @return */ IPage> getPage(Page page, QueryWrapper ew); /** * 关联查询 * * @param id * @return */ RoutingDTO getRoutingById(Long id); /** * 级联保存 * * @param routingDTO * @return */ RoutingDTO fullSave(RoutingDTO routingDTO); /** * 级联更新 * * @param routingDTO * @return */ RoutingDTO fullUpdate(RoutingDTO routingDTO); /** * 更改状态 * * @param id * @param event * @return */ R changeState(Long id, String event); /** * 更改状态 * * @param ids * @param event * @return */ boolean changeState(List ids, String event); /** * 修改工艺路线的数据 * * @param routingOperation * @return */ boolean routingOperationChange(RoutingOperationDTO routingOperation); /** * 工序详情 * * @param operationId * @param routingOperationId * @return */ JSONObject operationDetail(Long operationId, Long routingOperationId); /** * 查询工艺工序详情 * * @param id * @return */ RoutingOperationDTO getDtoByPk(Long id); /** * 导入excel数据 * * @param data */ void importExcel(List data); /** * 导入 * * @param dataList */ void importExcelExt(Map headMap, List> dataList); /** * 复制工艺路线 * * @param routing * @return */ R> copyRoutingSave(List routing); /** * 根据工艺id和工序id获取复制的工序模板 * * @param routingDTO * @return */ List getOperationTemplate(RoutingDTO routingDTO); /** * 根据工艺工序id和工序模板id获取工序参数 * * @param routingDTO * @return */ List getOperationTemplateParam(RoutingDTO routingDTO); /** * 查询模板与参数 * * @param routingOperationId * @return */ R getOperationTemplateAndParam(Long routingOperationId); /** * 根据工艺工序id关联添加工序模板 * * @param routingDTO * @return */ List addOperationTemplate(RoutingDTO routingDTO); /** * 根据复制工序模板的id删除工序模板 * * @param id * @return */ boolean deleteOperationTemplate(Long id); /** * 根据工艺工序id和工序模板id新增工序参数 * * @param routingDTO * @return */ boolean addOperationTemplateParam(RoutingDTO routingDTO); /** * 根据复制工序参数的id删除工序参数 * * @param id * @return */ boolean deleteOperationTemplateParam(Long id); /** * 工序参数的参数值的修改 * * @param routing * @return */ R updateRoutingTemplateParamById(RoutingDTO routing); /** * 获取工艺工序参数集 * * @param page * @param gen * @return */ IPage> getRoutingOperationTemplatePage(Page page, QueryWrapper gen); /** * 根据查询条件导出 * * @param response * @throws IOException */ void exportModel(HttpServletResponse response) throws IOException; /** * 对接ifs * * @param ids * @return */ boolean routingIfsSync(List ids); /** * 提前计算 * @param ids * @return */ boolean routingIfsCal(List ids); List getRoutingByDocumentIdAndOperationId(Long documentId, Long operationId); }