Commit 5db93781 authored by danfuman's avatar danfuman
parents 254841cf a2a674f9
...@@ -14,12 +14,12 @@ ruoyi: ...@@ -14,12 +14,12 @@ ruoyi:
# 获取ip地址开关 # 获取ip地址开关
addressEnabled: false addressEnabled: false
# 验证码类型 math 数组计算 char 字符验证 # 验证码类型 math 数组计算 char 字符验证
captchaType: char captchaType: math
# 开发环境配置 # 开发环境配置
server: server:
# 服务器的HTTP端口,默认为8080 # 服务器的HTTP端口,默认为8080
port: 9098 port: 9011
servlet: servlet:
# 应用的访问路径 # 应用的访问路径
context-path: / context-path: /
...@@ -134,7 +134,7 @@ spring: ...@@ -134,7 +134,7 @@ spring:
# 端口,默认为6379 # 端口,默认为6379
port: 6379 port: 6379
# 数据库索引 # 数据库索引
database: 6 database: 15
# 密码 # 密码
password: zfTFIJjaN#6xB83r password: zfTFIJjaN#6xB83r
# 连接超时时间 # 连接超时时间
...@@ -194,11 +194,11 @@ xss: ...@@ -194,11 +194,11 @@ xss:
dsk: dsk:
open: open:
endPoint: 120.27.13.145:8865 # endPoint: 120.27.13.145:8865
accessKeyId: aec7b3ff2y2q8x6t49a7e2c463ce21912
accessKeySecret: ee8a53c7ea04eb3ac311406c8f56f95b
protocol: http
# endPoint: openapi.jiansheku.com
# accessKeyId: aec7b3ff2y2q8x6t49a7e2c463ce21912 # accessKeyId: aec7b3ff2y2q8x6t49a7e2c463ce21912
# accessKeySecret: ee8a53c7ea04eb3ac311406c8f56f95b # accessKeySecret: ee8a53c7ea04eb3ac311406c8f56f95b
# protocol: https # protocol: http
endPoint: openapi.jiansheku.com
accessKeyId: aec7b3ff2y2q8x6t49a7e2c463ce21912
accessKeySecret: ee8a53c7ea04eb3ac311406c8f56f95b
protocol: https
package com.dsk.system.service.impl; package com.dsk.system.service.impl;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import com.dsk.system.domain.BusinessExcelDto; import com.dsk.system.domain.BusinessExcelDto;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.hssf.usermodel.HSSFWorkbook;
...@@ -13,6 +8,11 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook; ...@@ -13,6 +8,11 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
/** /**
* @author lxl * @author lxl
* @Description: * @Description:
...@@ -120,28 +120,32 @@ public class ReadBusinessInfoExcel { ...@@ -120,28 +120,32 @@ public class ReadBusinessInfoExcel {
for (int c = 0; c < this.totalCells; c++) { for (int c = 0; c < this.totalCells; c++) {
Cell cell = row.getCell(c); Cell cell = row.getCell(c);
if (null != cell) { if (null != cell) {
//项目名称
if (c == 0) { if (c == 0) {
//如果是纯数字,比如你写的是25,cell.getNumericCellValue()获得是25.0,通过截取字符串去掉.0获得25 //如果是纯数字,比如你写的是25,cell.getNumericCellValue()获得是25.0,通过截取字符串去掉.0获得25
if (cell.getCellType() == CellType.NUMERIC) { if (cell.getCellType() == CellType.NUMERIC) {
String name = String.valueOf(cell.getNumericCellValue()); String name = String.valueOf(cell.getNumericCellValue());
businessExcelDto.setProjectName(name.substring(0, name.length() - 2 > 0 ? name.length() - 2 : 1));//项目名称 businessExcelDto.setProjectName(name.substring(0, name.length() - 2 > 0 ? name.length() - 2 : 1));
} else { } else {
businessExcelDto.setProjectName(cell.getStringCellValue());//名称 businessExcelDto.setProjectName(cell.getStringCellValue());
} }
//业主单位
} else if (c == 1) { } else if (c == 1) {
if (cell.getCellType() == CellType.NUMERIC) { if (cell.getCellType() == CellType.NUMERIC) {
String company = String.valueOf(cell.getNumericCellValue()); String company = String.valueOf(cell.getNumericCellValue());
businessExcelDto.setOwnerCompany(company.substring(0, company.length() - 2 > 0 ? company.length() - 2 : 1));//业主单位 businessExcelDto.setOwnerCompany(company.substring(0, company.length() - 2 > 0 ? company.length() - 2 : 1));
} else { } else {
businessExcelDto.setOwnerCompany(cell.getStringCellValue());//性别 businessExcelDto.setOwnerCompany(cell.getStringCellValue());
} }
//投资估算(万元)
} else if (c == 2) { } else if (c == 2) {
if (cell.getCellType() == CellType.NUMERIC) { businessExcelDto.setInvestmentAmount(cell.getStringCellValue());
/* if (cell.getCellType() == CellType.NUMERIC) {
String amount = String.valueOf(cell.getNumericCellValue()); String amount = String.valueOf(cell.getNumericCellValue());
businessExcelDto.setInvestmentAmount(amount.substring(0, amount.length() - 2 > 0 ? amount.length() - 2 : 1));//投资估算(万元) businessExcelDto.setInvestmentAmount(amount.substring(0, amount.length() - 2 > 0 ? amount.length() - 2 : 1));
} else { } else {
businessExcelDto.setInvestmentAmount(cell.getStringCellValue()); businessExcelDto.setInvestmentAmount(cell.getStringCellValue());
} }*/
} }
} }
} }
......
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
LEFT JOIN sys_user u on u.user_id = f.user_id LEFT JOIN sys_user u on u.user_id = f.user_id
<where> <where>
<if test="userId != null"> <if test="userId != null">
and bu.user_id = #{userId} bu.user_id = #{userId}
</if> </if>
<if test="projectType != null and projectType != ''"> <if test="projectType != null and projectType != ''">
and i.project_type in and i.project_type in
...@@ -110,15 +110,15 @@ ...@@ -110,15 +110,15 @@
#{projectType} #{projectType}
</foreach> </foreach>
</if> </if>
<if test="minAmount != null and minAmount != '' and minAmount != 0 and maxAmount != minAmount"> <if test="minAmount != null and minAmount != '' and minAmount != '0' and maxAmount != minAmount">
and i.investment_amount &gt; #{minAmount} and i.investment_amount &gt; #{minAmount}
</if> </if>
<if test="minAmount == 0 and maxAmount != minAmount"> <if test="minAmount == '0' and maxAmount != minAmount">
and ((i.investment_amount &gt; #{minAmount} and ((i.investment_amount &gt; #{minAmount}
and i.investment_amount &lt;= #{maxAmount}) and i.investment_amount &lt;= #{maxAmount})
or i.investment_amount is null) or i.investment_amount is null)
</if> </if>
<if test="maxAmount != null and maxAmount != '' and maxAmount != minAmount and minAmount != 0"> <if test="maxAmount != null and maxAmount != '' and maxAmount != minAmount and minAmount != '0'">
and i.investment_amount &lt;= #{maxAmount} and i.investment_amount &lt;= #{maxAmount}
</if> </if>
<if test="minAmount != null and minAmount != '' and maxAmount != null and maxAmount != '' and maxAmount == minAmount"> <if test="minAmount != null and minAmount != '' and maxAmount != null and maxAmount != '' and maxAmount == minAmount">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment