/* * 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.plan.service; 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.plan.dto.*; import com.chinaztt.mes.plan.entity.CustomerOrder; import com.chinaztt.mes.plan.entity.CustomerOrderForJointStockCompany; import com.chinaztt.mes.plan.entity.MasterProductionSchedule; import com.chinaztt.mes.plan.entity.ProcessConfigFileOrderMapping; import com.chinaztt.mes.quality.dto.CustomOrderSyncDTO; import com.chinaztt.mes.technology.entity.Document; import com.chinaztt.mes.warehouse.dto.PackagingDTO; import com.chinaztt.ztt.common.core.util.R; import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.List; /** * 客户订单表 * * @author cxf * @date 2020-09-14 16:35:26 */ public interface CustomerOrderService extends IService { /** * 修改状态 * * @param ids * @param event */ void changeCoState(List ids, String event); /** * 批量更新销售件号 * * @return */ boolean batchUpdateSalePartNo(CustomerOrderDTO customerOrderDTO); /** * 车间订单更新接口 * * @param customerOrderDTO * @return */ R fullUpdate(CustomerOrderDTO customerOrderDTO); /** * 更新订单航说明 * * @param customerOrder * @return */ boolean updateOrderDescription(CustomerOrderDTO customerOrder); /** * OTC 下载 * * @param id * @param response */ void otcDownload(Long id, HttpServletResponse response); /** * 创建主生产计划需求 * * @param mpsRequirements * @return */ boolean createMpsRequirements(List mpsRequirements); /** * Description: 创建主生产计划 * * @param customerOrderDTO * @return */ boolean createMasterProductionSchedule(List customerOrderDTO); /** * Description: 多个销售订单创建一个主生产计划 * * @param customerOrders */ MasterProductionSchedule createOneMasterProductionScheduleByCustomerOrders(List customerOrders); /** * Description: 创建主生产计划前校验 * * @param customerOrderDTO * @return */ R createScheduleCheck(List customerOrderDTO); /** * 分页查询 * * @param page * @param planCustomerOrder * @param type * @return */ IPage getCustomerOrderPage(Page page, QueryWrapper planCustomerOrder, String type); /** * Description: 改变状态 * * @param ids * @param coState * @return * @date: 2020/11/19 11:06 */ boolean changeMarkPlanned(List ids, String coState); /** * Description: 通过id查询 * * @param id * @return */ CustomerOrderDTO getCustomerOrderById(Long id); /** * 订单行关联工艺文件 * * @param ids * @param docId * @return */ R handleDocument(List ids, Long docId); /** * 取消关联工艺文件 * * @param ids * @return */ R rejectHandleDocument(List ids); /** * 同步otc接口 * * @param selectTime * @param pathCode 0:原路径;1:订单所属公司为ZTKJ的订单 * @return */ R otcCustomerOrderSync(String selectTime, String pathCode); /** * 自动同步otc接口用于定时任务每个小时1次 * * @return */ R otcCustomerOrderSyncAuto(); /** * 查询库存件 * * @param salesPartDTO * @return */ R querySalesPartStd(SalesPartDTO salesPartDTO); /** * 根据otc行号查询客户订单信息 * * @return */ R syncIfsLineNo(List id); /** * 自动同步otc行号定时任务使用每个小时1次 * * @return */ R syncIfsLineNoAuto(); /** * oa对接 * * @param ids * @return */ String oa(List ids); /** * OA回调 * * @param data * @return */ OACallBackResult oaResultCallBack(String data); /** * 零件信息推送到OTC * * @param ids * @return */ boolean pushotc(List ids, String pathCode); /** * 零件信息推送到OTC * * @param customerOrder * @return */ boolean pushotc(CustomerOrder customerOrder); /** * 零件信息推送到OTC * * @param customerOrderForJointStockCompany * @return */ boolean pushotc(CustomerOrderForJointStockCompany customerOrderForJointStockCompany); /** * 根据订单号查询附件列表 * * @param customerOrderNo * @return */ R getOtcCustomerOrderFileList(String customerOrderNo); /** * 计算半成品用量 * * @param masterProductionSchedule */ void calPlanTheory(MasterProductionSchedule masterProductionSchedule); /** * 手动修改状态 * * @param ids * @param isAudit * @return */ boolean changeAudit(List ids, String isAudit); /** * 接收客户订单 * * @param customerOrder * @param document */ void docAccept(CustomerOrder customerOrder, Document document); /** * 导出 * * @param response * @throws IOException */ void export(HttpServletResponse response, QueryWrapper wrapper) throws IOException; /** * @param key * @param value * @return */ List queryPartPropertiesStd(String key, String value); /** * 上传工艺配置单 * * @param file 工艺配置单 * @param orderNumber 订单号 * @param lineNumber 行号 * @return */ R uploadProcessConfigFile(MultipartFile file, String orderNumber, String lineNumber); /** * 工艺配置单上传记录 * * @param orderNumber 订单号 * @param lineNumber 行号 * @return */ List getProcessConfigFiles(String orderNumber, String lineNumber); /** * 更新工艺配置单适用范围 * * @param id 工艺配置单文件id * @param range 适用范围 * @return */ boolean updateRange(Long id, String range); /** * 获取工艺配置单文件 * * @param bucket * @param fileName * @param response */ void getFile(String bucket, String fileName, HttpServletResponse response); /** * 删除工艺配置单 * * @param id 工艺配置单id * @return */ R deleteProcessConfigFile(Long id); /** * 工艺配置单同步销售订单 * * @param fileAssociatedOrderDTO * @return */ Boolean fileAssociatedOrder(FileAssociatedOrderDTO fileAssociatedOrderDTO); /** * 获取当前工艺配置单适用销售订单 * * @param id * @return */ List processConfigMapping(Long id); /** * 销售订单按照箱码拆分导出 * * @param customerOrderExportDTO */ void exportCustomerOrderSplit(HttpServletResponse response, CustomerOrderExportDTO customerOrderExportDTO) throws IOException; /** * OA流程审核 * * @param ids */ R checkOA(List ids); /** * 查询OA工艺详情页面 * * @param ids * @return */ List getOADetailDTO(List ids); /** * 查询OA工艺附件 * * @param customerOrderNo * @return */ R getProcessConfigFiles(String customerOrderNo); /** * 查询OA工艺结构 * * @param technologyDocumentId * @return */ R getTechnologyDocument(Long technologyDocumentId); /** * 查询OA工艺文件结构图 * * @param technologyDocumentId * @return */ R getDocumentJgt(Long technologyDocumentId); /** * 校验箱码和SN对应销售订单是否一致 * * @param packagingDTO * @return */ Boolean validatePackageCodeSnCustomerOrder(PackagingDTO packagingDTO); void pushPartNoToOtc(OACallBackResult callBackResult); void pushCustomersToOtc(List ids, String isAudit); void sendWxMsgAuto(); /** * 同步更新工艺配置单订单行待选列表 * * @param customerOrderNo * @param id * @return */ List getBeSelectedLineNoList(String customerOrderNo, Long id); boolean returnOrder(CustomerOrderDTO customerOrderDTO); IPage getAuditedOrderNoPage(String customerOrderNo, Page page); /** * 手动修改审核状态 * * @param ids * @param isAudit * @return */ boolean changeCheckState(List ids, String isAudit); /** * 对接志邦国际鹰联 erp * * @param customOrderSyncDTO * @return */ long syncOrder(CustomOrderSyncDTO customOrderSyncDTO); /** * 对接志邦国际鹰联 erp * * @param contractNo */ void dropByContractNo(String contractNo); }