mirror of
https://codeup.aliyun.com/64f7d6b8ce01efaafef1e678/coal/coal.git
synced 2026-01-25 15:55:18 +08:00
关联磅房数据时进行状态校验
This commit is contained in:
@@ -116,8 +116,19 @@ public class PurchaseOrderService
|
||||
|
||||
public PurchaseOrderDto updateWeightData(UpdateWeightDataDto request) {
|
||||
|
||||
|
||||
|
||||
|
||||
PurchaseOrderEntity entity = this.repository.get(request.getId());
|
||||
|
||||
if (ObjectUtils.notEqual(entity.getOrderStatus(), "1")){
|
||||
throw new BizException("只有进行中的订单才可以关联过磅数据");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
switch (request.getOptType()) {
|
||||
case "1" -> {
|
||||
if (CollectionUtils.isNotEmpty(request.getWeightDataList())) {
|
||||
|
||||
@@ -113,6 +113,9 @@ public class SaleOrderService extends BaseService<SaleOrderEntity, SaleOrderRepo
|
||||
|
||||
SaleOrderEntity entity = this.repository.get(request.getId());
|
||||
|
||||
if (ObjectUtils.notEqual(entity.getOrderStatus(), "1")){
|
||||
throw new BizException("只有进行中的订单才可以关联过磅数据");
|
||||
}
|
||||
switch (request.getOptType()) {
|
||||
case "1" -> {
|
||||
if (CollectionUtils.isNotEmpty(request.getWeightDataList())) {
|
||||
|
||||
Reference in New Issue
Block a user