change - 首页接口

master
yinq 8 months ago
parent 034655d49b
commit 8cd75bbafd

@ -223,8 +223,8 @@ public class SAPPutStorageServiceImpl implements ISAPPutStorageService {
baseOrderInfo.setOrderStatus(map.get("STTXT"));
baseOrderInfo.setOrderType(map.get("AUART"));
BigDecimal newOrderAmount = new BigDecimal(map.get("GAMNG"));
baseOrderInfo.setOrderAmount(newOrderAmount);
if (!newOrderAmount.equals(baseOrderInfo.getOrderAmount())){
baseOrderInfo.setOrderAmount(new BigDecimal(map.get("GAMNG")));
baseOrderInfo.setUpdatedBy("SAP");
//同步生产计划数量
ProductPlanInfo planInfo = new ProductPlanInfo();
@ -238,17 +238,18 @@ public class SAPPutStorageServiceImpl implements ISAPPutStorageService {
productPlanInfoService.updateProductPlanInfo(planInfoIn);
}
}
baseOrderInfo.setRoutingCode(map.get("AUFPL"));
baseOrderInfo.setBeginDate(new SimpleDateFormat("yyyy-MM-dd").parse(map.get("GSTRP")));
baseOrderInfo.setEndDate(new SimpleDateFormat("yyyy-MM-dd").parse(map.get("GLTRP")));
baseOrderInfoService.updateBaseOrderInfo(baseOrderInfo);
//产线变动 重新生成生成计划
if (StringUtils.isNotEmpty(map.get("ARBPL")) &&
StringUtils.isNotEmpty(baseOrderInfos.get(0).getWorkCenterCode()) &&
!map.get("ARBPL").equals(baseOrderInfos.get(0).getWorkCenterCode())){
baseOrderInfo.setIsRelease(1L);
baseOrderInfo.setWorkCenterCode(map.get("ARBPL"));
productPlanInfoService.releaseOrderPlan(baseOrderInfo);
}
baseOrderInfo.setWorkCenterCode(map.get("ARBPL"));
baseOrderInfo.setRoutingCode(map.get("AUFPL"));
baseOrderInfo.setBeginDate(new SimpleDateFormat("yyyy-MM-dd").parse(map.get("GSTRP")));
baseOrderInfo.setEndDate(new SimpleDateFormat("yyyy-MM-dd").parse(map.get("GLTRP")));
baseOrderInfoService.updateBaseOrderInfo(baseOrderInfo);
baseOrderInfoList.add(baseOrderInfo);
// 同步生产日历
CalendarInfo calendar = new CalendarInfo();

@ -7,6 +7,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.parameters.P;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
@ -46,7 +47,14 @@ public class BoardReportServiceImpl implements IBoardReportService {
HashMap<String, Object> result = new HashMap<>();
List<HashMap<String, Object>> todayOrderList = boardReportMapper.homePageInterface(paramMap);
result.put("todayOrderList", todayOrderList);
List<HashMap<String, Object>> orderList = new ArrayList<>();
for (HashMap<String, Object> map : todayOrderList) {
if (Long.valueOf(String.valueOf(map.get("ORDER_AMOUNT"))).equals(Long.valueOf(String.valueOf(map.get("COMPLETE_AMOUNT"))))){
continue;
}
orderList.add(map);
}
result.put("todayOrderList", orderList);
if (todayOrderList.size() > 0) {
Long planOrderSum = 0L;
Long prodOrderSum = 0L;

Loading…
Cancel
Save