|
|
|
|
@ -7,6 +7,7 @@ import java.util.List;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
import com.ruoyi.asset.constant.AssetStatus;
|
|
|
|
|
import com.ruoyi.asset.constant.DisposalOrderStatus;
|
|
|
|
|
import com.ruoyi.asset.domain.AmsAsset;
|
|
|
|
|
import com.ruoyi.asset.domain.AmsDisposalOperateContext;
|
|
|
|
|
@ -433,7 +434,7 @@ public class AmsDisposalOrderServiceImpl implements IAmsDisposalOrderService
|
|
|
|
|
{
|
|
|
|
|
throw new ServiceException("资产不存在或已删除");
|
|
|
|
|
}
|
|
|
|
|
if (!"IN_STOCK".equals(asset.getAssetStatus()) && !"IN_USE".equals(asset.getAssetStatus()))
|
|
|
|
|
if (!AssetStatus.IN_STOCK.equals(asset.getAssetStatus()) && !AssetStatus.IN_USE.equals(asset.getAssetStatus()))
|
|
|
|
|
{
|
|
|
|
|
throw new ServiceException(StringUtils.format("资产【{}】当前状态【{}】不允许进行报废",
|
|
|
|
|
asset.getAssetCode(), asset.getAssetStatus()));
|
|
|
|
|
@ -478,7 +479,7 @@ public class AmsDisposalOrderServiceImpl implements IAmsDisposalOrderService
|
|
|
|
|
{
|
|
|
|
|
throw new ServiceException("资产不存在或已删除");
|
|
|
|
|
}
|
|
|
|
|
if (!"IN_STOCK".equals(asset.getAssetStatus()) && !"IN_USE".equals(asset.getAssetStatus()))
|
|
|
|
|
if (!AssetStatus.IN_STOCK.equals(asset.getAssetStatus()) && !AssetStatus.IN_USE.equals(asset.getAssetStatus()))
|
|
|
|
|
{
|
|
|
|
|
throw new ServiceException(StringUtils.format("资产【{}】状态已发生改变,不能进行该操作", asset.getAssetCode()));
|
|
|
|
|
}
|
|
|
|
|
|