获取数据修改

master
zhouhy 1 year ago
parent 403a9daec7
commit 9a6587377a

@ -96,7 +96,7 @@ public class SAPPutStorageServiceImpl implements ISAPPutStorageService {
baseOrderInfo.setMaterialCode(map.get("MATNR")); baseOrderInfo.setMaterialCode(map.get("MATNR"));
baseOrderInfo.setMaterialName(map.get("MAKTX")); baseOrderInfo.setMaterialName(map.get("MAKTX"));
if (!map.get("GAMNG").equals(null)) { if (!map.get("GAMNG").equals(null)) {
baseOrderInfo.setOrderAmount(Long.valueOf(map.get("GAMNG"))); baseOrderInfo.setOrderAmount(new BigDecimal(map.get("GAMNG")));
} }
baseOrderInfo.setFactoryCode(map.get("WERKS")); baseOrderInfo.setFactoryCode(map.get("WERKS"));
baseOrderInfo.setOrderType(map.get("AUART")); baseOrderInfo.setOrderType(map.get("AUART"));
@ -129,7 +129,7 @@ public class SAPPutStorageServiceImpl implements ISAPPutStorageService {
device.setDeviceCode(map.get("EQUNR")); device.setDeviceCode(map.get("EQUNR"));
List<BaseDeviceLedger> baseDeviceLedgers = baseDeviceLedgerService.selectBaseDeviceLedgerList(device); List<BaseDeviceLedger> baseDeviceLedgers = baseDeviceLedgerService.selectBaseDeviceLedgerList(device);
if (!baseDeviceLedgers.isEmpty()) { if (baseDeviceLedgers.isEmpty()) {
BaseDeviceLedger deviceLedger = new BaseDeviceLedger(); BaseDeviceLedger deviceLedger = new BaseDeviceLedger();
deviceLedger.setCostCenter(map.get("KOSTL"));// deviceLedger.setCostCenter(map.get("KOSTL"));//
deviceLedger.setFactoryCode(map.get("IWERK")); deviceLedger.setFactoryCode(map.get("IWERK"));

@ -1,5 +1,6 @@
package com.aucma.base.domain; package com.aucma.base.domain;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
@ -62,7 +63,7 @@ public class BaseOrderInfo extends BaseEntity {
* *
*/ */
@Excel(name = "订单计划数量") @Excel(name = "订单计划数量")
private Long orderAmount; private BigDecimal orderAmount;
/** /**
* *
@ -211,12 +212,12 @@ public class BaseOrderInfo extends BaseEntity {
return matkl; return matkl;
} }
public void setOrderAmount(Long orderAmount) { public BigDecimal getOrderAmount() {
this.orderAmount = orderAmount; return orderAmount;
} }
public Long getOrderAmount() { public void setOrderAmount(BigDecimal orderAmount) {
return orderAmount; this.orderAmount = orderAmount;
} }
public void setCompleteAmount(Long completeAmount) { public void setCompleteAmount(Long completeAmount) {

@ -1,5 +1,6 @@
package com.aucma.production.service.impl; package com.aucma.production.service.impl;
import java.math.BigDecimal;
import java.util.List; import java.util.List;
import com.aucma.base.domain.BaseOrderInfo; import com.aucma.base.domain.BaseOrderInfo;
@ -20,12 +21,12 @@ import static com.aucma.common.utils.SecurityUtils.getUsername;
/** /**
* Service * Service
* *
* @author Yinq * @author Yinq
* @date 2023-10-07 * @date 2023-10-07
*/ */
@Service @Service
public class ProductPlanInfoServiceImpl implements IProductPlanInfoService public class ProductPlanInfoServiceImpl implements IProductPlanInfoService
{ {
@Autowired @Autowired
private ProductPlanInfoMapper productPlanInfoMapper; private ProductPlanInfoMapper productPlanInfoMapper;
@ -38,7 +39,7 @@ public class ProductPlanInfoServiceImpl implements IProductPlanInfoService
/** /**
* *
* *
* @param objId * @param objId
* @return * @return
*/ */
@ -50,7 +51,7 @@ public class ProductPlanInfoServiceImpl implements IProductPlanInfoService
/** /**
* *
* *
* @param productPlanInfo * @param productPlanInfo
* @return * @return
*/ */
@ -62,7 +63,7 @@ public class ProductPlanInfoServiceImpl implements IProductPlanInfoService
/** /**
* *
* *
* @param productPlanInfo * @param productPlanInfo
* @return * @return
*/ */
@ -78,7 +79,7 @@ public class ProductPlanInfoServiceImpl implements IProductPlanInfoService
/** /**
* *
* *
* @param productPlanInfo * @param productPlanInfo
* @return * @return
*/ */
@ -91,7 +92,7 @@ public class ProductPlanInfoServiceImpl implements IProductPlanInfoService
/** /**
* *
* *
* @param objIds * @param objIds
* @return * @return
*/ */
@ -103,7 +104,7 @@ public class ProductPlanInfoServiceImpl implements IProductPlanInfoService
/** /**
* *
* *
* @param objId * @param objId
* @return * @return
*/ */
@ -125,8 +126,8 @@ public class ProductPlanInfoServiceImpl implements IProductPlanInfoService
String orderCode = baseOrderInfo.getOrderCode(); String orderCode = baseOrderInfo.getOrderCode();
String saleOrderCode = baseOrderInfo.getSaleOrderCode(); String saleOrderCode = baseOrderInfo.getSaleOrderCode();
String saleOrderLineNumber = baseOrderInfo.getSaleOrderLineNumber(); String saleOrderLineNumber = baseOrderInfo.getSaleOrderLineNumber();
Long orderAmount = baseOrderInfo.getOrderAmount(); BigDecimal orderAmount = baseOrderInfo.getOrderAmount();
if (StringUtils.isNull(orderAmount) || orderAmount < 1L){ if (StringUtils.isNull(orderAmount) || (orderAmount.compareTo(new BigDecimal(1))==-1)){
throw new BaseException("该工单计划数量不合法!"); throw new BaseException("该工单计划数量不合法!");
} }
//获取生产BOM信息 //获取生产BOM信息
@ -147,7 +148,7 @@ public class ProductPlanInfoServiceImpl implements IProductPlanInfoService
planInfo.setMaterialCode(baseBomInfo.getMaterialCode()); planInfo.setMaterialCode(baseBomInfo.getMaterialCode());
planInfo.setMaterialName(baseBomInfo.getMaterialName()); planInfo.setMaterialName(baseBomInfo.getMaterialName());
planInfo.setProductLineCode(baseBomInfo.getProductLineCode()); planInfo.setProductLineCode(baseBomInfo.getProductLineCode());
planInfo.setPlanAmount(baseBomInfo.getStandardAmount() * orderAmount); planInfo.setPlanAmount(baseBomInfo.getStandardAmount() * orderAmount.longValue());
this.insertProductPlanInfo(planInfo); this.insertProductPlanInfo(planInfo);
} }
baseOrderInfo.setIsRelease(0L); baseOrderInfo.setIsRelease(0L);

Loading…
Cancel
Save