Commit 59ab562f authored by huangjie's avatar huangjie

Merge branch 'dev20230707' of http://192.168.60.201/root/dsk-operate-sys into dev20230707

parents e0eabc4c e39f5ae5
...@@ -59,6 +59,22 @@ let cancelClaim= function cancelClaim(data) { ...@@ -59,6 +59,22 @@ let cancelClaim= function cancelClaim(data) {
// data: data // data: data
}) })
} }
// 历史认领用户
let historyClaim= function historyClaim(data) {
return request({
url: '/customer/historyClaim/'+data,
method: 'put',
// data: data
})
}
// 客户状态
let customerStatus= function customerStatus(data) {
return request({
url: '/customer/status/'+data,
method: 'get',
// data: data
})
}
// 查建筑企业 // 查建筑企业
let enterprisePage= function enterprisePage(param) { let enterprisePage= function enterprisePage(param) {
...@@ -80,4 +96,4 @@ let infoHeader= function infoHeader(param) { ...@@ -80,4 +96,4 @@ let infoHeader= function infoHeader(param) {
export default {aptitudeCode,personCert,searchDic,regionWebList,uipGroupData,uipSerach,claim,cancelClaim,enterprisePage,infoHeader} export default {aptitudeCode,personCert,searchDic,regionWebList,uipGroupData,uipSerach,claim,cancelClaim,enterprisePage,infoHeader,historyClaim,customerStatus}
\ No newline at end of file
...@@ -215,11 +215,18 @@ export function claim(param) { ...@@ -215,11 +215,18 @@ export function claim(param) {
data: param data: param
}) })
} }
//城投平台-取消认领 //客户状态
export function cancelClaim(name) { export function customerStatus(name) {
return request({ return request({
url:`/customer/cancelClaim/`+name, url:`/customer/status/`+name,
method: 'PUT', method: 'get',
})
}
//历史客户认领
export function historyClaim(name) {
return request({
url:`/customer/historyClaim/`+name,
method: 'put',
}) })
} }
//批量获取城投企业id //批量获取城投企业id
......
...@@ -134,6 +134,13 @@ ...@@ -134,6 +134,13 @@
<span class="dialog-footer-btn2" @click="renHide()">稍后</span> <span class="dialog-footer-btn2" @click="renHide()">稍后</span>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog :visible.sync="dialogVisible2" custom-class='dialog-renlin' title="重新认领" width="260px" :show-close="false">
<div>再次认领将会恢复客户数据</div>
<div slot="footer" class="dialog-footer">
<span class="dialog-footer-btn1" type="primary" @click="handleHistoryClaim()">确认</span>
<span class="dialog-footer-btn2" @click="dialogVisible2 = false">关闭</span>
</div>
</el-dialog>
<el-dialog <el-dialog
title="取消认领" title="取消认领"
:visible.sync="dialogVisible1" :visible.sync="dialogVisible1"
...@@ -185,6 +192,7 @@ export default { ...@@ -185,6 +192,7 @@ export default {
enterpriseLabel:[],//企业标签 enterpriseLabel:[],//企业标签
dialogVisible: false, dialogVisible: false,
dialogVisible1: false, dialogVisible1: false,
dialogVisible2: false,
} }
}, },
created() { created() {
...@@ -211,6 +219,11 @@ export default { ...@@ -211,6 +219,11 @@ export default {
registerAddress:this.companyInfo.provinceName+(this.companyInfo.cityName?'-'+this.companyInfo.cityName:'')+(this.companyInfo.districtName?'-'+this.companyInfo.districtName:''), registerAddress:this.companyInfo.provinceName+(this.companyInfo.cityName?'-'+this.companyInfo.cityName:'')+(this.companyInfo.districtName?'-'+this.companyInfo.districtName:''),
creditCode:this.companyInfo.creditCode creditCode:this.companyInfo.creditCode
} }
let res = await api.customerStatus(this.companyInfo.companyName)
if(res.data === 1){
this.claimLoading = false
this.dialogVisible2=true;
}else{
let res = await claim(param) let res = await claim(param)
this.claimLoading = false this.claimLoading = false
if(res.code==200){ if(res.code==200){
...@@ -218,6 +231,7 @@ export default { ...@@ -218,6 +231,7 @@ export default {
this.companyInfo.claimStatus = 1 this.companyInfo.claimStatus = 1
this.customerId = res.data.customerId this.customerId = res.data.customerId
} }
}
}else{ }else{
this.$message.warning('对不起,当前不能认领') this.$message.warning('对不起,当前不能认领')
} }
...@@ -226,6 +240,16 @@ export default { ...@@ -226,6 +240,16 @@ export default {
cancelClaimClick(){ cancelClaimClick(){
this.dialogVisible1 = true; this.dialogVisible1 = true;
}, },
async handleHistoryClaim(){
let res = await api.historyClaim(this.companyInfo.companyName)
if(res.code==200){
this.dialogVisible2 = false;
this.companyInfo.claimStatus = 1
}else{
this.$message.error(res.msg)
}
},
async confirm(){ async confirm(){
let res = await api.cancelClaim(this.companyInfo.companyName) let res = await api.cancelClaim(this.companyInfo.companyName)
if(res.code==200){ if(res.code==200){
...@@ -711,6 +735,12 @@ export default { ...@@ -711,6 +735,12 @@ export default {
text-align: center; text-align: center;
padding-bottom: 24px; padding-bottom: 24px;
} }
.el-dialog__header{
text-align: center;
.el-dialog__title{
font-size: 16px;
}
}
.el-dialog__footer{ .el-dialog__footer{
padding: 0px; padding: 0px;
padding-bottom: 24px; padding-bottom: 24px;
......
...@@ -174,7 +174,7 @@ export default { ...@@ -174,7 +174,7 @@ export default {
.left{ .left{
float: left; float: left;
width: 730px; width: 730px;
margin-right: 170px; /*margin-right: 170px;*/
} }
.logo{ .logo{
width: 253px; width: 253px;
......
<template> <template>
<div class="region"> <div class="region">
<div class="region_left"> <div class="region_left">
<div>
<span class="province">{{province}}</span> <span class="province">{{province}}</span>
<span class="icon"> <span class="icon">
<i class="el-icon-location"></i> <i class="el-icon-location"></i>切换
切换
</span>
<el-cascader ref="address" class="cascader-region" popper-class='cascader-region-addd' <el-cascader ref="address" class="cascader-region" popper-class='cascader-region-addd'
@change="addressListbtn" v-model="address" :options="addressList" :props="props" collapse-tags></el-cascader> @change="addressListbtn" v-model="address" :options="addressList" :props="props" collapse-tags></el-cascader>
</span>
</div>
</div> </div>
</div> </div>
</template> </template>
...@@ -49,6 +50,7 @@ ...@@ -49,6 +50,7 @@
data.provinceId=this.provinceId data.provinceId=this.provinceId
data.provinces=nodesObj.pathLabels data.provinces=nodesObj.pathLabels
this.$parent.addressListbtn(data) this.$parent.addressListbtn(data)
localStorage.setItem('location', true)
}, },
//地区 //地区
async dataRegion() { async dataRegion() {
...@@ -118,7 +120,6 @@ ...@@ -118,7 +120,6 @@
background-size: 100%; background-size: 100%;
width: 603px; width: 603px;
height: 48px; height: 48px;
position: relative;
padding-left: 16px; padding-left: 16px;
.province{ .province{
font-size: 20px; font-size: 20px;
...@@ -136,6 +137,7 @@ ...@@ -136,6 +137,7 @@
font-size: 12px; font-size: 12px;
display: inline-block; display: inline-block;
height: 48px; height: 48px;
position: relative;
i{ i{
margin-left: 4px; margin-left: 4px;
font-size: 16px; font-size: 16px;
...@@ -145,11 +147,11 @@ ...@@ -145,11 +147,11 @@
} }
.cascader-region { .cascader-region {
position: absolute; position: absolute;
left: 20px; left: -50px;
top: 8px; top: 8px;
opacity: 0; opacity: 0;
line-height: 22px; line-height: 22px;
width: 100px; width: 80px;
} }
} }
} }
......
...@@ -45,6 +45,12 @@ ...@@ -45,6 +45,12 @@
</el-table> </el-table>
</div> </div>
</div> </div>
<!--<div class="content content-box" v-else>-->
<!--<div class="empty">-->
<!--<img class="img" src="@/assets/images/project/empty.png">-->
<!--<div class="p1">抱歉,暂无专项债项目数据</div>-->
<!--</div>-->
<!--</div>-->
</div> </div>
</template> </template>
...@@ -66,11 +72,13 @@ export default { ...@@ -66,11 +72,13 @@ export default {
data:[], data:[],
oneYear:'', oneYear:'',
twoYear:'', twoYear:'',
state:false
} }
}, },
watch: { watch: {
provinceId(newValue, oldValue){ provinceId(newValue, oldValue){
this.getData() this.getData()
this.getGroupCount()
} }
}, },
created() { created() {
...@@ -116,10 +124,10 @@ export default { ...@@ -116,10 +124,10 @@ export default {
} }
} }
for(let i=0; i<list.length; i++){ for(let i=0; i<list.length; i++){
list[i].money=Number(list[i].money).toFixed(2) list[i].money=list[i].money ? Number(list[i].money).toFixed(2) : '-';
list[i].rate=Number(list[i].rate).toFixed(2) list[i].rate=list[i].rate ? Number(list[i].rate).toFixed(2) : '-';
list[i].lastMoney=Number(list[i].lastMoney).toFixed(2) list[i].lastMoney=list[i].lastMoney ? Number(list[i].lastMoney).toFixed(2) : '-';
list[i].lastRate=Number(list[i].lastRate).toFixed(2) list[i].lastRate=list[i].lastRate ? Number(list[i].lastRate).toFixed(2) : '-';
} }
this.tableData=list.reverse() this.tableData=list.reverse()
} }
...@@ -136,7 +144,17 @@ export default { ...@@ -136,7 +144,17 @@ export default {
startTime=this.queryParams.year+'-01-01'; startTime=this.queryParams.year+'-01-01';
endTime=this.queryParams.year+'-12-31'; endTime=this.queryParams.year+'-12-31';
} }
bidGroupCountByProjectType({startDate:startTime,endDate:endTime}).then(res => { let params={startDate:startTime,endDate:endTime}
if(this.provinceId.length >= 0){
params.province=this.provinceId[0]
}
if(this.provinceId.length >= 1){
params.city=this.provinceId[1]
}
if(this.provinceId.length >= 2){
params.county=this.provinceId[2]
}
bidGroupCountByProjectType(params).then(res => {
if(res.code === 200){ if(res.code === 200){
let list=[] let list=[]
for(let i=0; i<res.data.length; i++){ for(let i=0; i<res.data.length; i++){
...@@ -318,6 +336,26 @@ export default { ...@@ -318,6 +336,26 @@ export default {
} }
} }
} }
.empty{
margin: 0 auto;
height: 550px;
text-align: center;
.img{
width: 108px;
height: 108px;
margin-bottom: 24px;
margin-top: 150px;
}
.p1{
color: #333333;
font-size: 16px;
}
.p2{
color: #999999;
font-size: 14px;
margin-top: 8px;
}
}
} }
} }
</style> </style>
...@@ -279,10 +279,10 @@ export default { ...@@ -279,10 +279,10 @@ export default {
} }
}, },
created() { created() {
this.getData()
let mydate=new Date(); let mydate=new Date();
this.labelData=[mydate.getFullYear()-2,mydate.getFullYear()-1] this.labelData=[mydate.getFullYear()-2,mydate.getFullYear()-1]
this.$nextTick(()=>{ this.$nextTick(()=>{
this.getData()
// console.log(this.dataQuery) // console.log(this.dataQuery)
}) })
}, },
...@@ -300,11 +300,6 @@ export default { ...@@ -300,11 +300,6 @@ export default {
// } // }
}, },
watch: { watch: {
dataQuery: {
handler(newValue, oldValue) {
},
deep: true
},
provinceId(newValue, oldValue){ provinceId(newValue, oldValue){
this.getData() this.getData()
} }
......
...@@ -63,7 +63,9 @@ export default { ...@@ -63,7 +63,9 @@ export default {
} }
}, },
created() { created() {
this.dataQuery=this.$route.query; //使用JSON方法深拷贝
let data = JSON.parse(JSON.stringify(this.$route.query))
this.dataQuery=data;
if(this.dataQuery.provinceId){ if(this.dataQuery.provinceId){
if(Array.isArray(this.dataQuery.province)){ if(Array.isArray(this.dataQuery.province)){
this.province=this.dataQuery.province[0]; this.province=this.dataQuery.province[0];
...@@ -71,9 +73,14 @@ export default { ...@@ -71,9 +73,14 @@ export default {
this.province=this.dataQuery.province this.province=this.dataQuery.province
this.dataQuery.province = [this.dataQuery.province]; this.dataQuery.province = [this.dataQuery.province];
} }
if(Array.isArray(this.dataQuery.provinceId)){
this.provinceId=this.dataQuery.provinceId
}else {
this.provinceId.push(this.dataQuery.provinceId) this.provinceId.push(this.dataQuery.provinceId)
}
}else { }else {
location({}).then(res => { location({}).then(res => {
if(localStorage.getItem('location')){
if(res.data.area){ if(res.data.area){
this.province=res.data.area this.province=res.data.area
}else { }else {
...@@ -99,13 +106,21 @@ export default { ...@@ -99,13 +106,21 @@ export default {
}else { }else {
this.provinceId=this.dataQuery.provinceId this.provinceId=this.dataQuery.provinceId
} }
}else {
this.province=res.data.province
if(!this.dataQuery.provinceId){
this.provinceId=[res.data.provinceId]
let arr=[res.data.province]
this.dataQuery.province=arr;
}else {
this.provinceId=this.dataQuery.provinceId
}
}
}) })
} }
if(this.dataQuery.activeName){ if(this.dataQuery.activeName){
this.activeName=this.dataQuery.activeName; this.activeName=this.dataQuery.activeName;
} }
// let name = sessionStorage.getItem('currentTab') // let name = sessionStorage.getItem('currentTab')
// if (name != "undefined" && name){ // if (name != "undefined" && name){
// this.activeName = name; // this.activeName = name;
......
...@@ -110,6 +110,7 @@ export default { ...@@ -110,6 +110,7 @@ export default {
}, },
created() { created() {
location({}).then(res => { location({}).then(res => {
if(localStorage.getItem('location')){
if(res.data.area){ if(res.data.area){
this.province=res.data.area this.province=res.data.area
}else { }else {
...@@ -135,6 +136,16 @@ export default { ...@@ -135,6 +136,16 @@ export default {
}else { }else {
this.provinceId=this.dataQuery.provinceId this.provinceId=this.dataQuery.provinceId
} }
}else {
this.province=res.data.province;
if(!this.dataQuery.provinceId){
this.provinceId=[res.data.provinceId]
let arr=[res.data.province]
this.dataQuery.province=arr;
}else {
this.provinceId=this.dataQuery.provinceId
}
}
this.$nextTick(() => { this.$nextTick(() => {
this.getData() this.getData()
this.getStatistics() this.getStatistics()
......
...@@ -244,7 +244,7 @@ ...@@ -244,7 +244,7 @@
<el-pagination background :current-page="pageIndex" :page-size="pageSize" :total="tableDataTotal" layout="prev, pager, next, jumper" @current-change="handleCurrentChange" @size-change="handleSizeChange" /> <el-pagination background :current-page="pageIndex" :page-size="pageSize" :total="tableDataTotal" layout="prev, pager, next, jumper" @current-change="handleCurrentChange" @size-change="handleSizeChange" />
</div> </div>
</div> </div>
<el-dialog :visible.sync="claimVisible" width="244" :show-close="false"> <el-dialog :visible.sync="claimVisible" width="244" custom-class='dialog-claim' :show-close="false">
<div>认领成功,是否完善客户信息?</div> <div>认领成功,是否完善客户信息?</div>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="innerVisible = true"> <el-button @click="innerVisible = true">
...@@ -255,6 +255,13 @@ ...@@ -255,6 +255,13 @@
<el-button @click="claimVisible = false">稍后</el-button> <el-button @click="claimVisible = false">稍后</el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog :visible.sync="claimVisible1" custom-class='historyClaim' title="重新认领" width="260" :show-close="false">
<div>再次认领将会恢复客户数据</div>
<div slot="footer" class="dialog-footer">
<el-button @click="handleHistoryClaim">确认</el-button>
<el-button @click="claimVisible1 = false">取消</el-button>
</div>
</el-dialog>
<el-dialog <el-dialog
title="取消认领" title="取消认领"
:visible.sync="dialogVisible1" :visible.sync="dialogVisible1"
...@@ -278,7 +285,7 @@ ...@@ -278,7 +285,7 @@
import dataRegion from '@/assets/json/dataRegion' import dataRegion from '@/assets/json/dataRegion'
import api from '@/api/enterpriseData/enterpriseData.js'; import api from '@/api/enterpriseData/enterpriseData.js';
import elementResizeDetectorMaker from "element-resize-detector" import elementResizeDetectorMaker from "element-resize-detector"
import { uipGroupData,urbanInvestmentPage,urbanInvestmentStatistics,claim,location } from '@/api/macro/macro' import { uipGroupData,urbanInvestmentPage,urbanInvestmentStatistics,claim,location,customerStatus,historyClaim } from '@/api/macro/macro'
import { infoHeader } from '@/api/detail/party-a/index' import { infoHeader } from '@/api/detail/party-a/index'
import Region from '../component/region' import Region from '../component/region'
export default { export default {
...@@ -317,9 +324,11 @@ export default { ...@@ -317,9 +324,11 @@ export default {
typeList:[], typeList:[],
statistics:{}, statistics:{},
claimVisible:false, claimVisible:false,
claimVisible1:false,
dialogVisible1: false, dialogVisible1: false,
customerId:'', customerId:'',
companyId:'', companyId:'',
companyName:'',
show_page:true, show_page:true,
MaxPage:500, MaxPage:500,
// 表格高度 // 表格高度
...@@ -346,7 +355,6 @@ export default { ...@@ -346,7 +355,6 @@ export default {
}, },
mounted(){ mounted(){
window.addEventListener("scroll",this.scrolling) window.addEventListener("scroll",this.scrolling)
window.addEventListener('scroll', this.handleScroll);
const _this = this, erd = elementResizeDetectorMaker(), partBox = document.getElementById("content") const _this = this, erd = elementResizeDetectorMaker(), partBox = document.getElementById("content")
erd.listenTo(partBox, element => { erd.listenTo(partBox, element => {
_this.$nextTick(() => { _this.$nextTick(() => {
...@@ -354,9 +362,6 @@ export default { ...@@ -354,9 +362,6 @@ export default {
}) })
}) })
}, },
destroyed () {
window.removeEventListener('scroll', this.handleScroll)
},
beforeDestroy() { beforeDestroy() {
window.removeEventListener("scroll", this.scrolling); window.removeEventListener("scroll", this.scrolling);
}, },
...@@ -379,6 +384,7 @@ export default { ...@@ -379,6 +384,7 @@ export default {
this.querySubmit() this.querySubmit()
}else { }else {
location({}).then(res => { location({}).then(res => {
if(localStorage.getItem('location')){
if(res.data.area){ if(res.data.area){
this.province=res.data.area this.province=res.data.area
}else { }else {
...@@ -406,6 +412,17 @@ export default { ...@@ -406,6 +412,17 @@ export default {
}else { }else {
this.provinceId=this.dataQuery.provinceId this.provinceId=this.dataQuery.provinceId
} }
}else {
this.province=res.data.province
if(!this.dataQuery.provinceId){
this.provinceId=[res.data.provinceId]
let arr=[res.data.province]
this.dataQuery.province=arr;
}else {
this.provinceId=this.dataQuery.provinceId
}
}
this.querySubmit() this.querySubmit()
}) })
} }
...@@ -416,21 +433,24 @@ export default { ...@@ -416,21 +433,24 @@ export default {
methods: { methods: {
scrolling() { scrolling() {
let el = document.getElementsByClassName("el-table__fixed-header-wrapper")[0] let el = document.getElementsByClassName("el-table__fixed-header-wrapper")[0]
let scrollTop =window.pageYOffset ||document.documentElement.scrollTop ||document.body.scrollTop; // let scrollTop =window.pageYOffset ||document.documentElement.scrollTop ||document.body.scrollTop;
if (scrollTop>368){ // if (scrollTop>368){
let top = scrollTop-368 // let top = scrollTop-368
// el.style.top = top+'px'
// }else{
// el.style.top = 0
// }
let el1 = document.getElementsByClassName("el-table")[0].offsetTop
let el2 = document.getElementsByClassName("content")[1].offsetTop
let scrollTop = document.documentElement.scrollTop ||document.body.scrollTop;
this.$nextTick(() => {
if (scrollTop>(el1+el2)){
let top = scrollTop-(el1+el2)-13
el.style.top = top+'px' el.style.top = top+'px'
}else{ }else{
el.style.top = 0 el.style.top = 0
} }
}, })
handleScroll () {
let scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop
if (scrollTop > 300) {
this.fixed = true
} else {
this.fixed = false
}
}, },
getType(){ getType(){
uipGroupData({}).then(res => { uipGroupData({}).then(res => {
...@@ -736,8 +756,17 @@ export default { ...@@ -736,8 +756,17 @@ export default {
} }
}) })
}, },
handleHistoryClaim(){
historyClaim(this.companyName).then(res => {
if(res.code === 200){
this.claimVisible1=false;
this.querySubmit()
}
})
},
handleClick(item){ handleClick(item){
this.companyId=item.companyId; this.companyId=item.companyId;
this.companyName=item.companyName;
infoHeader({companyId:this.companyId}).then(res => { infoHeader({companyId:this.companyId}).then(res => {
if(res.code === 200){ if(res.code === 200){
let registerAddress=res.data.provinceName let registerAddress=res.data.provinceName
...@@ -760,6 +789,10 @@ export default { ...@@ -760,6 +789,10 @@ export default {
registerAddress:registerAddress, registerAddress:registerAddress,
creditCode:res.data.creditCode, creditCode:res.data.creditCode,
} }
customerStatus(item.companyName).then(res => {
if(res.data === 1){
this.claimVisible1=true;
}else {
claim(params).then(res => { claim(params).then(res => {
if(res.code === 200){ if(res.code === 200){
this.claimVisible=true; this.claimVisible=true;
...@@ -767,6 +800,9 @@ export default { ...@@ -767,6 +800,9 @@ export default {
this.querySubmit() this.querySubmit()
} }
}) })
}
})
} }
}) })
} }
...@@ -1041,9 +1077,25 @@ export default { ...@@ -1041,9 +1077,25 @@ export default {
} }
} }
} }
::v-deep .historyClaim{
.el-dialog__header{
display: block;
padding: 12px;
text-align: center;
.el-dialog__title{
font-size: 16px;
}
}
.el-dialog__body{
padding: 0;
text-align: center;
padding-bottom: 24px;
}
}
::v-deep .dialog-renlin{ ::v-deep .dialog-renlin{
.el-dialog__header{ .el-dialog__header{
display: block; display: block;
text-align: center;
} }
.el-dialog__body{ .el-dialog__body{
padding: 0; padding: 0;
...@@ -1086,10 +1138,5 @@ export default { ...@@ -1086,10 +1138,5 @@ export default {
} }
} }
} }
.fixed{
position: fixed;
z-index: 999;
top: 56px;
}
} }
</style> </style>
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());
} }*/
} }
} }
} }
......
...@@ -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