From e40cc6d546426760a00b3515ec778e1574d1628a Mon Sep 17 00:00:00 2001 From: zhouhy Date: Sun, 8 Oct 2023 17:32:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9A=E6=97=B6=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/aucma/api/task/SAPTask.java | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/aucma-api/src/main/java/com/aucma/api/task/SAPTask.java b/aucma-api/src/main/java/com/aucma/api/task/SAPTask.java index e4fb3c4..475dfca 100644 --- a/aucma-api/src/main/java/com/aucma/api/task/SAPTask.java +++ b/aucma-api/src/main/java/com/aucma/api/task/SAPTask.java @@ -42,5 +42,70 @@ public class SAPTask { portService.getSAPMaterialData(sapPortDto); } + /** + * 生产工单定时任务 + * + * @param days 开始时间(天) + */ + public void SAPProduceWorkTicketsDataTask(String factoryCode, Long days) { + String startDate = DateUtils.convertDaysToDateString(days); + String endDate = DateUtils.getDate(); + SAPPortDto sapPortDto = new SAPPortDto(); + WERKSDto werksDto = new WERKSDto(); + List> factoryList = new ArrayList<>(); + HashMap hashMap = new HashMap<>(); + sapPortDto.setStartDate(startDate); + sapPortDto.setEndDate(endDate); + hashMap.put("WERKS", factoryCode); + factoryList.add(hashMap); + werksDto.setItem(factoryList); + sapPortDto.setFactoryCodes(werksDto); +// System.out.println("调用2"); + portService.getSapBaseOrderInfo(sapPortDto); + } + /** + *设备台账定时任务 + * + * @param days 开始时间(天) + */ + public void SAPDeviceLedgerDataTask(String factoryCode, Long days) { + String startDate = DateUtils.convertDaysToDateString(days); + String endDate = DateUtils.getDate(); + SAPPortDto sapPortDto = new SAPPortDto(); + WERKSDto werksDto = new WERKSDto(); + List> factoryList = new ArrayList<>(); + HashMap hashMap = new HashMap<>(); + sapPortDto.setStartDate(startDate); + sapPortDto.setEndDate(endDate); + hashMap.put("WERKS", factoryCode); + factoryList.add(hashMap); + werksDto.setItem(factoryList); + sapPortDto.setFactoryCodes(werksDto); +// System.out.println("调用3"); + portService.getSapDeviceLedgers(sapPortDto); + } + + /** + * 产品bom信息定时任务 + * + * @param days 开始时间(天) + */ + public void SAPBaseBomInfoDataTask(String factoryCode, Long days) { + String startDate = DateUtils.convertDaysToDateString(days); + String endDate = DateUtils.getDate(); + SAPPortDto sapPortDto = new SAPPortDto(); + WERKSDto werksDto = new WERKSDto(); + List> factoryList = new ArrayList<>(); + HashMap hashMap = new HashMap<>(); + sapPortDto.setStartDate(startDate); + sapPortDto.setEndDate(endDate); + hashMap.put("WERKS", factoryCode); + factoryList.add(hashMap); + werksDto.setItem(factoryList); + sapPortDto.setFactoryCodes(werksDto); +// System.out.println("调用4"); + portService.getSapOrderBomInfo(sapPortDto); + } + }