From c305a2783ea884666bbd944a2df4bd5b1d7b31bf Mon Sep 17 00:00:00 2001 From: yinq Date: Fri, 24 Nov 2023 10:00:43 +0800 Subject: [PATCH] =?UTF-8?q?update=20-=20SAP=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../aucma/api/controller/SAPPortController.java | 1 - .../service/impl/SAPPutStorageServiceImpl.java | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/aucma-api/src/main/java/com/aucma/api/controller/SAPPortController.java b/aucma-api/src/main/java/com/aucma/api/controller/SAPPortController.java index 1cf7dc1..94ec78f 100644 --- a/aucma-api/src/main/java/com/aucma/api/controller/SAPPortController.java +++ b/aucma-api/src/main/java/com/aucma/api/controller/SAPPortController.java @@ -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 BaseOrderInfoVoList = sapPortService.getSapBaseOrderInfo(sapPortDto); return AjaxResult.success(BaseOrderInfoVoList); } diff --git a/aucma-api/src/main/java/com/aucma/api/service/impl/SAPPutStorageServiceImpl.java b/aucma-api/src/main/java/com/aucma/api/service/impl/SAPPutStorageServiceImpl.java index 9c1c245..07eff24 100644 --- a/aucma-api/src/main/java/com/aucma/api/service/impl/SAPPutStorageServiceImpl.java +++ b/aucma-api/src/main/java/com/aucma/api/service/impl/SAPPutStorageServiceImpl.java @@ -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); }