Browse Source

Merge remote-tracking branch 'origin/master'

master
常熟吴彦祖 3 months ago
parent
commit
4a9e8dc48a
  1. 8
      src/main/java/com/gaotao/modules/api/entity/issueAndReturnVo/PurchaseOrderMoveToStockDto.java
  2. 8
      src/main/java/com/gaotao/modules/inspection/service/impl/QualifiedStorageServiceImpl.java
  3. 3
      src/main/java/com/gaotao/modules/other/service/impl/OtherInboundServiceImpl.java

8
src/main/java/com/gaotao/modules/api/entity/issueAndReturnVo/PurchaseOrderMoveToStockDto.java

@ -8,7 +8,7 @@ import java.math.BigDecimal;
*/
@Data
public class PurchaseOrderMoveToStockDto {
private String ifsDBName;
private String domainUserID;
private String ifsSiteID;
@ -28,7 +28,7 @@ public class PurchaseOrderMoveToStockDto {
private String ifsWDR;
private String ifsToLocationNo;
private Integer ifsHandlingUnitID;
private Integer ifsSourceQtyToMove;
private Integer ifsInQtyToMove;
private Integer ifsCatchQtyToMove;
private BigDecimal ifsSourceQtyToMove;
private BigDecimal ifsInQtyToMove;
private BigDecimal ifsCatchQtyToMove;
}

8
src/main/java/com/gaotao/modules/inspection/service/impl/QualifiedStorageServiceImpl.java

@ -212,7 +212,7 @@ public class QualifiedStorageServiceImpl implements QualifiedStorageService {
String lotBatchNo = (String) params.get("lotBatchNo");
String wdr = (String) params.get("wdr");
String toLocationNo = (String) params.get("toLocationNo");
Integer qtyToMove = Integer.valueOf(params.get("qtyToMove").toString());
BigDecimal qtyToMove = new BigDecimal(params.get("qtyToMove").toString());
@SuppressWarnings("unchecked")
List<String> handlingUnitIds = (List<String>) params.get("handlingUnitIds");
@ -350,7 +350,7 @@ public class QualifiedStorageServiceImpl implements QualifiedStorageService {
moveDto.setIfsHandlingUnitID(0);
moveDto.setIfsSourceQtyToMove(qtyToMove);
moveDto.setIfsInQtyToMove(qtyToMove);
moveDto.setIfsCatchQtyToMove(0);
moveDto.setIfsCatchQtyToMove(BigDecimal.ZERO);
String result = ifsApiIssueAndReturnService.purchaseOrderMoveToStockOneLocation(moveDto);
@ -371,7 +371,7 @@ public class QualifiedStorageServiceImpl implements QualifiedStorageService {
/**
* 更新库存
*/
private void updateInventoryStock(TransHeader transHeader, TransDetail transDetail,Integer qty,
private void updateInventoryStock(TransHeader transHeader, TransDetail transDetail, BigDecimal qty,
HandlingUnit firstHu) {
// 直接在此方法中实现库存创建逻辑使用带行锁的库存操作防止并发
String site = transDetail.getSite();
@ -392,7 +392,7 @@ public class QualifiedStorageServiceImpl implements QualifiedStorageService {
String partNo = transDetail.getPartNo();
String batchNo = transDetail.getBatchNo();
String wdr = firstHu.getWdr() != null ? firstHu.getWdr() : "*";
BigDecimal transQty = BigDecimal.valueOf(qty);
BigDecimal transQty = qty;
// 使用行锁查询现有库存
InventoryStock existingStock = inventoryStockMapper.selectForUpdate(site, warehouseId, partNo, batchNo, locationId, wdr);

3
src/main/java/com/gaotao/modules/other/service/impl/OtherInboundServiceImpl.java

@ -31,6 +31,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
@ -304,7 +305,7 @@ public class OtherInboundServiceImpl implements OtherInboundService {
detail.setLocationId(key.get(3));
detail.setWdrNo(key.get(4));
detail.setOrderRef4(key.get(5));
detail.setTransQty(new BigDecimal(totalQty));
detail.setTransQty(new BigDecimal(totalQty).setScale(3, RoundingMode.HALF_UP));
detail.setDirection(direction);
detailList.add(detail);
index++;

Loading…
Cancel
Save