定时任务

master
zhouhy 1 year ago
parent dd3f65b798
commit e40cc6d546

@ -42,5 +42,70 @@ public class SAPTask {
portService.getSAPMaterialData(sapPortDto); 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<HashMap<String, String>> factoryList = new ArrayList<>();
HashMap<String, String> 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<HashMap<String, String>> factoryList = new ArrayList<>();
HashMap<String, String> 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<HashMap<String, String>> factoryList = new ArrayList<>();
HashMap<String, String> 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);
}
} }

Loading…
Cancel
Save