|
@@ -8,9 +8,8 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.dayou.common.BaseEntity;
|
|
|
import com.dayou.common.CalculateFormula;
|
|
|
import com.dayou.config.FileNetConfig;
|
|
|
-import com.dayou.dto.calculate.equipment.EquipmentBaseInfoDTO;
|
|
|
+import com.dayou.dto.calculate.equipment.EqptCalculateBaseInfoDTO;
|
|
|
import com.dayou.entity.*;
|
|
|
-import com.dayou.enums.BusinessEnum;
|
|
|
import com.dayou.mapper.AssetsCalculateMapper;
|
|
|
import com.dayou.mapper.TmplAssetCalculateMapper;
|
|
|
import com.dayou.mapper.TmplAssetCalculateSectionMapper;
|
|
@@ -23,13 +22,10 @@ import com.dayou.vo.AssetsCalculateEqptImpDataVO;
|
|
|
import com.dayou.vo.AssetsCalculateEqptNonsDataVO;
|
|
|
import com.dayou.vo.AssetsCalculateVO;
|
|
|
import com.dayou.vo.calculate.AssetsCalculateProgressVO;
|
|
|
-import com.fasterxml.jackson.core.JsonProcessingException;
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
import org.apache.poi.ss.usermodel.*;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
@@ -40,12 +36,11 @@ import java.nio.file.Files;
|
|
|
import java.nio.file.Paths;
|
|
|
import java.text.MessageFormat;
|
|
|
import java.time.LocalDate;
|
|
|
-import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
|
|
|
import static com.dayou.common.CalculateFormula.*;
|
|
|
import static com.dayou.enums.DocumentType.EQPT_CALCULATE;
|
|
|
-import static com.dayou.enums.EquipmentTmplCode.*;
|
|
|
+import static com.dayou.enums.EqptCalculateTmplCode.*;
|
|
|
|
|
|
/**
|
|
|
* <p>
|
|
@@ -201,7 +196,7 @@ public class AssetsCalculateServiceImpl extends ServiceImpl<AssetsCalculateMappe
|
|
|
String mainTmplPath = fileNetConfig.getBaseDir() + main.getFileUrl() + main.getFileName();
|
|
|
// 获取基础测算信息
|
|
|
ObjectMapper objectMapper = new ObjectMapper();
|
|
|
- EquipmentBaseInfoDTO baseInfoDTO = objectMapper.readValue(getCalculateBaseInfo(calculateId), EquipmentBaseInfoDTO.class);
|
|
|
+ EqptCalculateBaseInfoDTO baseInfoDTO = objectMapper.readValue(getCalculateBaseInfo(calculateId), EqptCalculateBaseInfoDTO.class);
|
|
|
// 利息、前期费用率、建设单位管理费率采用百分比,需要除100
|
|
|
baseInfoDTO.setInterest(baseInfoDTO.getInterest() / 100);
|
|
|
baseInfoDTO.setPreConstructionCostRatio(baseInfoDTO.getPreConstructionCostRatio() / 100);
|
|
@@ -271,9 +266,9 @@ public class AssetsCalculateServiceImpl extends ServiceImpl<AssetsCalculateMappe
|
|
|
|
|
|
// 将主表sheet中进口设备数据的单价改为引用对应的进口设备表的设备原价
|
|
|
for (Row row : sheet) {
|
|
|
- Cell cell = row.getCell(25); // Z列(设备类型)的索引是25(从0开始计数)
|
|
|
+ Cell cell = row.getCell(26); // AA列(设备类型)的索引是26(从0开始计数)
|
|
|
if (cell != null && cell.getStringCellValue().equals("进口设备")) {
|
|
|
- Cell priceCell = row.getCell(29); // 单价单元格
|
|
|
+ Cell priceCell = row.getCell(30); // 单价单元格
|
|
|
int importedRowNum;
|
|
|
// 循环进口设备sheet
|
|
|
for (int i = 2; i <= importedSheet.getLastRowNum(); i++) { // 跳过前两行
|
|
@@ -324,9 +319,9 @@ public class AssetsCalculateServiceImpl extends ServiceImpl<AssetsCalculateMappe
|
|
|
|
|
|
// 将主表sheet中进口设备数据的单价改为引用对应的进口设备表的设备原价
|
|
|
for (Row row : sheet) {
|
|
|
- Cell cell = row.getCell(25); // Z列(设备类型)的索引是25(从0开始计数)
|
|
|
+ Cell cell = row.getCell(26); // AA列(设备类型)的索引是26(从0开始计数)
|
|
|
if (cell != null && cell.getStringCellValue().equals("非标设备")) {
|
|
|
- Cell priceCell = row.getCell(29); // 单价单元格
|
|
|
+ Cell priceCell = row.getCell(30); // 单价单元格
|
|
|
int importedRowNum;
|
|
|
// 循环进口设备sheet
|
|
|
for (int i = 2; i <= nonstandardSheet.getLastRowNum(); i++) { // 跳过前两行
|