update - SAP接口

master
yinq 12 months ago
parent 8d5876a155
commit c305a2783e

@ -63,7 +63,6 @@ public class SAPPortController extends BaseController {
WERKSDto werksDto = new WERKSDto();
werksDto.setItem(werksMap.get("item"));
sapPortDto.setFactoryCodes(werksDto);
sapPortService.getSapBaseOrderInfo(sapPortDto);
List<BaseOrderInfo> BaseOrderInfoVoList = sapPortService.getSapBaseOrderInfo(sapPortDto);
return AjaxResult.success(BaseOrderInfoVoList);
}

@ -14,6 +14,8 @@ import com.aucma.base.service.IBaseOrderInfoService;
import com.aucma.base.service.IOrderBomInfoService;
import com.aucma.common.utils.DateUtils;
import com.aucma.common.utils.StringUtils;
import com.aucma.production.domain.CalendarInfo;
import com.aucma.production.service.ICalendarInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -45,6 +47,9 @@ public class SAPPutStorageServiceImpl implements ISAPPutStorageService {
@Autowired
private IOrderBomInfoService orderBomInfoService;
@Autowired
private ICalendarInfoService calendarInfoService;
/**
*
*
@ -109,6 +114,17 @@ public class SAPPutStorageServiceImpl implements ISAPPutStorageService {
baseOrderInfo.setBeginDate(new SimpleDateFormat("yyyy-MM-dd").parse(map.get("GLTRP")));
baseOrderInfo.setEndDate(new SimpleDateFormat("yyyy-MM-dd").parse(map.get("GSTRP")));
// 同步生产日历
CalendarInfo calendarInfo = new CalendarInfo();
calendarInfo.setSapPlanCode(baseOrderInfo.getOrderCode());
calendarInfo.setMaterialCode(baseOrderInfo.getMaterialCode());
calendarInfo.setMaterialName(baseOrderInfo.getMaterialName());
calendarInfo.setPlanStartDate(baseOrderInfo.getBeginDate());
calendarInfo.setPlanEndDate(baseOrderInfo.getEndDate());
calendarInfo.setSchedulingDate(baseOrderInfo.getBeginDate());
calendarInfo.setPlanAmount(baseOrderInfo.getOrderAmount());
calendarInfoService.insertCalendarInfo(calendarInfo);
baseOrderInfoService.insertBaseOrderInfo(baseOrderInfo);
baseOrderInfoList.add(baseOrderInfo);
}

Loading…
Cancel
Save