预约改造;pda报错;
This commit is contained in:
+2
@@ -84,4 +84,6 @@ public class MaterialInventoryOmsParamDO extends BaseVOEntity {
|
||||
//过期日期
|
||||
private Date expiryDate;
|
||||
|
||||
private String executioOrderNumber;
|
||||
|
||||
}
|
||||
+35
@@ -33,6 +33,10 @@ import com.mhd.oms.domain.executionStockOutOrder.repository.todo.ExecutionStockO
|
||||
import com.mhd.oms.domain.reservationDeliveryDetailsLink.entity.ReservationDeliveryDetailsLink;
|
||||
import com.mhd.oms.domain.reservationDeliveryDetailsLink.repository.facade.IReservationDeliveryDetailsLinkService;
|
||||
//import com.mhd.oms.domain.reservationStockInOrder.repository.po.MaterialBaseInfoPO;
|
||||
import com.mhd.oms.domain.reservationInventoryAdjustmentRecord.entity.ReservationInventoryAdjustmentRecord;
|
||||
import com.mhd.oms.domain.reservationInventoryAdjustmentRecord.repository.mapper.ReservationInventoryAdjustmentRecordMapper;
|
||||
import com.mhd.oms.domain.reservationMaterialInventory.entity.ReservationMaterialInventory;
|
||||
import com.mhd.oms.domain.reservationMaterialInventory.repository.mapper.ReservationMaterialInventoryMapper;
|
||||
import com.mhd.system.api.SystemServiceFeign;
|
||||
import com.mhd.system.api.WmsServiceFeign;
|
||||
import com.mhd.system.api.domain.*;
|
||||
@@ -85,6 +89,10 @@ public class ExecutionStockOutOrderDomainService {
|
||||
private IBusinessDeliveryDetailsLinkService businessDeliveryDetailsLinkService;
|
||||
@Autowired
|
||||
private BusinessDeliveryDetailsLinkMapper businessDeliveryDetailsLinkMapper;
|
||||
@Autowired
|
||||
private ReservationInventoryAdjustmentRecordMapper inventoryAdjustmentRecordMapper;
|
||||
@Autowired
|
||||
private ReservationMaterialInventoryMapper reservationMaterialInventoryMapper;
|
||||
|
||||
/**
|
||||
* 分页查询出库单列表
|
||||
@@ -317,6 +325,33 @@ public class ExecutionStockOutOrderDomainService {
|
||||
stockOutOrder.setOutOrderNumber(outOrderNumber);
|
||||
wmsServiceFeign.omsCancelExecutionOrder(stockOutOrder);
|
||||
//还原oms库存及调整记录
|
||||
List<ReservationInventoryAdjustmentRecord> reservationInventoryAdjustmentRecords = inventoryAdjustmentRecordMapper.selectList(new LambdaQueryWrapper<ReservationInventoryAdjustmentRecord>()
|
||||
.eq(ReservationInventoryAdjustmentRecord::getExecutionOrderNumber, outOrderNumber)
|
||||
.eq(ReservationInventoryAdjustmentRecord::getDelFlag, 1));
|
||||
for (ReservationInventoryAdjustmentRecord reservationInventoryAdjustmentRecord : reservationInventoryAdjustmentRecords) {
|
||||
Long materialInventoryId = reservationInventoryAdjustmentRecord.getMaterialInventoryId();
|
||||
ReservationMaterialInventory reservationMaterialInventory = reservationMaterialInventoryMapper.selectById(materialInventoryId);
|
||||
// BigDecimal inventoryBeforeQuantity = reservationInventoryAdjustmentRecord.getInventoryBeforeQuantity();
|
||||
// BigDecimal inventoryAfterQuantity = reservationInventoryAdjustmentRecord.getInventoryAfterQuantity();
|
||||
BigDecimal allocationBeforeQuantity = reservationInventoryAdjustmentRecord.getAllocationBeforeQuantity();
|
||||
BigDecimal allocationAfterQuantity = reservationInventoryAdjustmentRecord.getAllocationAfterQuantity();
|
||||
BigDecimal allocation = allocationBeforeQuantity.subtract(allocationAfterQuantity);
|
||||
BigDecimal freezeBeforeQuantity = reservationInventoryAdjustmentRecord.getFreezeBeforeQuantity();
|
||||
BigDecimal freezeAfterQuantity = reservationInventoryAdjustmentRecord.getFreezeAfterQuantity();
|
||||
BigDecimal freeze = freezeAfterQuantity.subtract(freezeBeforeQuantity);
|
||||
BigDecimal allocationQuantity = reservationMaterialInventory.getAllocationQuantity();
|
||||
BigDecimal freezeQuantity = reservationMaterialInventory.getFreezeQuantity();
|
||||
allocationQuantity.add(allocation);
|
||||
freezeQuantity.subtract(freeze);
|
||||
reservationMaterialInventory.setAllocationQuantity(allocationQuantity);
|
||||
reservationMaterialInventory.setFreezeQuantity(freezeQuantity);
|
||||
reservationMaterialInventory.setUpdateTime(new Date());
|
||||
reservationMaterialInventory.setUpdateBy(loginUser.getUserid());
|
||||
reservationMaterialInventory.setUpdateByName(userRealName);
|
||||
reservationMaterialInventoryMapper.updateById(reservationMaterialInventory);
|
||||
reservationInventoryAdjustmentRecord.setDelFlag(2);
|
||||
inventoryAdjustmentRecordMapper.updateById(reservationInventoryAdjustmentRecord);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+4
@@ -199,4 +199,8 @@ public class ReservationInventoryAdjustmentRecord extends BaseVOEntity {
|
||||
@Excel(name = "批次号")
|
||||
private String batchNumber;
|
||||
|
||||
@ApiModelProperty("执行单号")
|
||||
@Excel(name = "执行单号")
|
||||
private String executionOrderNumber;
|
||||
|
||||
}
|
||||
+3
@@ -255,4 +255,7 @@ public class ReservationInventoryAdjustmentRecordPO extends BaseVOEntity {
|
||||
@ApiModelProperty("批次号")
|
||||
@Excel(name = "批次号")
|
||||
private String batchNumber;
|
||||
@ApiModelProperty("执行单号")
|
||||
@Excel(name = "执行单号")
|
||||
private String executionOrderNumber;
|
||||
}
|
||||
+3
@@ -214,4 +214,7 @@ public class ReservationInventoryAdjustmentRecordDO extends BaseVOEntity {
|
||||
private String lotCode;
|
||||
private String expiryDate;
|
||||
private String productionDate;
|
||||
@ApiModelProperty("执行单号")
|
||||
@Excel(name = "执行单号")
|
||||
private String executionOrderNumber;
|
||||
}
|
||||
+3
@@ -172,4 +172,7 @@ public class ReservationInventoryAdjustmentRecordDTO extends BaseVOEntity {
|
||||
|
||||
@ApiModelProperty(name = "权限菜单ID")
|
||||
private Long permissionMenuId;
|
||||
@ApiModelProperty("执行单号")
|
||||
@Excel(name = "执行单号")
|
||||
private String executionOrderNumber;
|
||||
}
|
||||
+4
-1
@@ -296,7 +296,10 @@ public class ReservationMaterialInventoryImpl extends ServiceImpl<ReservationMat
|
||||
UserPo userPo = loginUser.getUserPo();
|
||||
if (userPo != null) inventoryAdjustmentRecord.setCreateByName(userPo.getUserName());
|
||||
inventoryAdjustmentRecord.setCreateTime(new Date());
|
||||
|
||||
String executioOrderNumber = materialInventoryParamDO.getExecutioOrderNumber();
|
||||
if (ObjectUtil.isNotEmpty(executioOrderNumber)) {
|
||||
inventoryAdjustmentRecord.setExecutionOrderNumber(executioOrderNumber);
|
||||
}
|
||||
BigDecimal qty = nz(materialInventoryParamDO.getQuantity());
|
||||
if ("分配库存".equals(adjustAction)) {
|
||||
// 总库存不变;可用减少、冻结增加(数量从可用转至冻结)
|
||||
|
||||
+4
-1
@@ -43,4 +43,7 @@ public interface ReserveStockInOrderMapper extends BaseMapper<ReserveStockInOrde
|
||||
|
||||
|
||||
List<ReserveStockInOrderPO> queryNoticePrint(ReserveStockInOrderDO stockInOrderDO);
|
||||
List<ReserveInMaterialDetailPO> queryNoticePrintDetail(ReserveStockInOrderDO stockInOrderDO);}
|
||||
List<ReserveInMaterialDetailPO> queryNoticePrintDetail(ReserveStockInOrderDO stockInOrderDO);
|
||||
|
||||
public String getJsbz(@Param("id") Long id);
|
||||
}
|
||||
+3
@@ -451,6 +451,9 @@ public class ReserveStockInOrderDomainService {
|
||||
reservationStockInOrder.setOrderTypeCode("pu_tong_ru_ku");
|
||||
reservationStockInOrder.setOrderTypeName("普通入库");
|
||||
reservationStockInOrder.setReservationOrderSource("客户预约");
|
||||
Long shipperId = reservationStockInOrder.getShipperId();
|
||||
String jsbz = reservationStockInOrderMapper.getJsbz(shipperId);
|
||||
reservationStockInOrder.setSettlementCurrency(jsbz);
|
||||
String inOrderNumber = reservationStockInOrder.getInOrderNumber();
|
||||
List<ReserveInMaterialDetail> materialDetailList = materialDetailService.list(new QueryWrapper<ReserveInMaterialDetail>().lambda().eq(ReserveInMaterialDetail::getInOrderNumber, inOrderNumber));
|
||||
List<ReservationInMaterialDetail> inMaterialDetailList = new ArrayList<>();
|
||||
|
||||
+3
@@ -282,6 +282,9 @@ public class ReserveStockOutOrderDomainService {
|
||||
reservationStockOutOrder.setOrderTypeCode("pu_tong_chu_ku");
|
||||
reservationStockOutOrder.setOrderTypeName("普通出库");
|
||||
reservationStockOutOrder.setReservationOrderSource("客户预约");
|
||||
Long shipperId = reservationStockOutOrder.getShipperId();
|
||||
String jsbz = reservationStockInOrderMapper.getJsbz(shipperId);
|
||||
reservationStockOutOrder.setSettlementCurrency(jsbz);
|
||||
reservationStockOutOrderService.save(reservationStockOutOrder);
|
||||
String outOrderNumber = reservationStockOutOrder.getOutOrderNumber();
|
||||
List<ReserveOutMaterialDetail> materialDetailList = outMaterialDetailService.list(new QueryWrapper<ReserveOutMaterialDetail>().lambda().eq(ReserveOutMaterialDetail::getOutOrderNumber, outOrderNumber));
|
||||
|
||||
@@ -769,4 +769,12 @@
|
||||
<result property="inboundQuantity" column="inbound_quantity"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="getJsbz" resultType="java.lang.String" parameterType="java.lang.Long">
|
||||
SELECT
|
||||
SETTLEMENT_CURRENCY
|
||||
FROM NGWL_TEST_USER.USER_SHIPPER
|
||||
WHERE del_flag = 1
|
||||
AND USER_ID = #{id} limit 1
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
+3
-1
@@ -255,5 +255,7 @@ public class MaterialInventoryQueryListDO extends MaterialBaseDO {
|
||||
|
||||
/** 为 true 时 SQL 排除库存数量为 0(含 null 视为 0) */
|
||||
private Boolean excludeZeroInventoryQuantity;
|
||||
|
||||
private String expiryDateStr;
|
||||
private String productionDateStr;
|
||||
private String updateTimeStr;
|
||||
}
|
||||
+1
@@ -598,6 +598,7 @@ public class OutMaterialDetailImpl extends ServiceImpl<OutMaterialDetailMapper,
|
||||
BeanUtils.copyProperties(materialInventoryParamDO, materialInventoryOmsParamDO);
|
||||
materialInventoryOmsParamDO.setKctzType("分配库存");
|
||||
materialInventoryOmsParamDO.setLoginUser(loginUser);
|
||||
materialInventoryOmsParamDO.setExecutioOrderNumber(outMaterialDetail.getOutOrderNumber());
|
||||
omsServiceFeign.omsEdit(materialInventoryOmsParamDO);
|
||||
|
||||
//materialInventoryMapper.updateById(materialInventory);
|
||||
|
||||
+3
@@ -190,5 +190,8 @@ public class MaterialInventoryDTO extends MaterialBaseDTO {
|
||||
private Boolean excludeZeroInventoryQuantity;
|
||||
private String expiryDate;
|
||||
private String productionDate;
|
||||
private String expiryDateStr;
|
||||
private String productionDateStr;
|
||||
private String updateTimeStr;
|
||||
|
||||
}
|
||||
+4
-1
@@ -188,4 +188,7 @@ public class MaterialInventoryQueryListDTO extends MaterialBaseDTO {
|
||||
/** 为 true 时排除库存数量为 0 的行;库存查询页不传或 false */
|
||||
@ApiModelProperty(value = "是否排除库存数量为0", example = "false")
|
||||
private Boolean excludeZeroInventoryQuantity;
|
||||
}
|
||||
private String expiryDateStr;
|
||||
private String productionDateStr;
|
||||
private String updateTimeStr;
|
||||
}
|
||||
Reference in New Issue
Block a user