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