|
@@ -13,9 +13,11 @@ import cn.hutool.json.JSONUtil;
|
|
|
import com.ruoyi.asset.domain.TbAssetInformation;
|
|
|
import com.ruoyi.inventory.domain.TbAssetInventory;
|
|
|
import com.ruoyi.inventory.domain.dto.AssetInventoryStatement;
|
|
|
+import com.ruoyi.inventory.domain.enums.InventoryPlanResult;
|
|
|
import com.ruoyi.inventory.domain.enums.InventoryResult;
|
|
|
import com.ruoyi.inventory.domain.enums.InventoryStatus;
|
|
|
import com.ruoyi.inventory.mapper.TbAssetInventoryMapper;
|
|
|
+import com.ruoyi.inventory.service.ITbAssetInventoryService;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
@@ -61,7 +63,7 @@ public class TbInventoryDetailController extends BaseController
|
|
|
}
|
|
|
|
|
|
@Autowired
|
|
|
- private TbAssetInventoryMapper tbAssetInventoryMapper;
|
|
|
+ private ITbAssetInventoryService inventoryService;
|
|
|
|
|
|
/**
|
|
|
* 导出资产盘点明细列表
|
|
@@ -78,7 +80,7 @@ public class TbInventoryDetailController extends BaseController
|
|
|
throw new RuntimeException("盘点计划编码不能为空");
|
|
|
}
|
|
|
|
|
|
- TbAssetInventory tbAssetInventory = tbAssetInventoryMapper.selectTbAssetInventoryByNumber(orderNumber);
|
|
|
+ TbAssetInventory tbAssetInventory = inventoryService.selectTbAssetInventoryByNumber(orderNumber);
|
|
|
|
|
|
List<AssetInventoryStatement> assetInventoryStatements = getInventoryStatement(tbAssetInventory, list);
|
|
|
|
|
@@ -95,7 +97,7 @@ public class TbInventoryDetailController extends BaseController
|
|
|
@PostMapping("/export/detail")
|
|
|
public void exportDetail(HttpServletResponse response, TbAssetInventory tbAssetInventory)
|
|
|
{
|
|
|
- List<TbAssetInventory> tbAssetInventoryList = tbAssetInventoryMapper.selectTbAssetInventoryList(tbAssetInventory);
|
|
|
+ List<TbAssetInventory> tbAssetInventoryList = inventoryService.selectTbAssetInventoryList(tbAssetInventory);
|
|
|
List<AssetInventoryStatement> assetInventoryStatements = new ArrayList<>();
|
|
|
|
|
|
for (TbAssetInventory assetInventory : tbAssetInventoryList) {
|
|
@@ -182,6 +184,11 @@ public class TbInventoryDetailController extends BaseController
|
|
|
// 设置盘点时间
|
|
|
assetInventoryStatement.setInventoryDate(tbAssetInventory.getInventoryDate());
|
|
|
|
|
|
+ // 设置盘点计划结果
|
|
|
+ Integer inventoryPlanResult = tbAssetInventory.getInventoryResult();
|
|
|
+ String inventoryPlanResultName = InventoryPlanResult.getName(inventoryPlanResult);
|
|
|
+ assetInventoryStatement.setInventoryPlanResult(inventoryPlanResultName);
|
|
|
+
|
|
|
// 设置备注
|
|
|
assetInventoryStatement.setRemark(inventoryDetail.getRemark());
|
|
|
|