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); + } + }