Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dsk-cr20g
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
dsk-cr20g
Commits
2d6ab724
Commit
2d6ab724
authored
Jun 02, 2023
by
caixingbing
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://192.168.60.201/root/dsk-operate-sys
parents
ba0b2754
48837a3f
Changes
25
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
596 additions
and
72 deletions
+596
-72
BusinessBacklogController.java
...sk/web/controller/business/BusinessBacklogController.java
+1
-1
BusinessContactsController.java
...k/web/controller/business/BusinessContactsController.java
+1
-1
BusinessInfoController.java
...m/dsk/web/controller/business/BusinessInfoController.java
+22
-11
BusinessRelateCompanyController.java
.../controller/business/BusinessRelateCompanyController.java
+1
-1
RegionalEconomicDataController.java
...er/search/macroMarket/RegionalEconomicDataController.java
+2
-1
BusinessInfo.java
.../java/com/dsk/common/core/domain/entity/BusinessInfo.java
+78
-1
OpRegionalEconomicDataV1Dto.java
...java/com/dsk/common/dtos/OpRegionalEconomicDataV1Dto.java
+22
-10
OpRegionalEconomicDataV1PageDto.java
.../com/dsk/common/dtos/OpRegionalEconomicDataV1PageDto.java
+48
-0
index.vue
dsk-operate-ui/src/views/project/overview/index.vue
+1
-1
detail.vue
dsk-operate-ui/src/views/project/projectList/detail.vue
+1
-1
index.vue
dsk-operate-ui/src/views/project/projectList/index.vue
+1
-1
BusinessAddDto.java
...m/src/main/java/com/dsk/system/domain/BusinessAddDto.java
+2
-1
BusinessExcelDto.java
...src/main/java/com/dsk/system/domain/BusinessExcelDto.java
+26
-0
BusinessListDto.java
.../src/main/java/com/dsk/system/domain/BusinessListDto.java
+5
-3
BusinessListVo.java
...rc/main/java/com/dsk/system/domain/vo/BusinessListVo.java
+3
-3
BusinessInfoMapper.java
...c/main/java/com/dsk/system/mapper/BusinessInfoMapper.java
+7
-1
EconomicService.java
...src/main/java/com/dsk/system/service/EconomicService.java
+2
-1
IBusinessInfoService.java
...ain/java/com/dsk/system/service/IBusinessInfoService.java
+7
-0
BusinessInfoServiceImpl.java
.../com/dsk/system/service/impl/BusinessInfoServiceImpl.java
+58
-6
EconomicServiceImpl.java
...java/com/dsk/system/service/impl/EconomicServiceImpl.java
+7
-6
ReadBusinessInfoExcel.java
...va/com/dsk/system/service/impl/ReadBusinessInfoExcel.java
+177
-0
RegionalEnterprisesServiceImpl.java
...k/system/service/impl/RegionalEnterprisesServiceImpl.java
+1
-2
SpecialPurposeBondsServiceImpl.java
...k/system/service/impl/SpecialPurposeBondsServiceImpl.java
+4
-4
UrbanInvestmentPlatformServiceImpl.java
...stem/service/impl/UrbanInvestmentPlatformServiceImpl.java
+3
-3
BusinessInfoMapper.xml
...src/main/resources/mapper/business/BusinessInfoMapper.xml
+116
-13
No files found.
dsk-admin/src/main/java/com/dsk/web/controller/business/BusinessBacklogController.java
View file @
2d6ab724
...
...
@@ -46,7 +46,7 @@ public class BusinessBacklogController extends BaseController
*/
// @PreAuthorize("@ss.hasPermi('system:backlog:list')")
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
@RequestBody
BusinessBacklog
businessBacklog
)
public
TableDataInfo
list
(
@RequestBody
(
required
=
false
)
BusinessBacklog
businessBacklog
)
{
startPage
();
List
<
BusinessBacklog
>
list
=
businessBacklogService
.
selectBusinessBacklogList
(
businessBacklog
);
...
...
dsk-admin/src/main/java/com/dsk/web/controller/business/BusinessContactsController.java
View file @
2d6ab724
...
...
@@ -40,7 +40,7 @@ public class BusinessContactsController extends BaseController
*/
// @PreAuthorize("@ss.hasPermi('system:contacts:list')")
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
@RequestBody
BusinessContacts
businessContacts
)
public
TableDataInfo
list
(
@RequestBody
(
required
=
false
)
BusinessContacts
businessContacts
)
{
startPage
();
List
<
BusinessContacts
>
list
=
businessContactsService
.
selectBusinessContactsList
(
businessContacts
);
...
...
dsk-admin/src/main/java/com/dsk/web/controller/business/BusinessInfoController.java
View file @
2d6ab724
...
...
@@ -17,6 +17,10 @@ import com.dsk.common.core.controller.BaseController;
import
com.dsk.common.core.domain.AjaxResult
;
import
com.dsk.common.enums.BusinessType
;
import
com.dsk.common.core.page.TableDataInfo
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
/**
* 项目详情Controller
...
...
@@ -31,11 +35,18 @@ public class BusinessInfoController extends BaseController
@Autowired
private
IBusinessInfoService
businessInfoService
;
/**
* 项目批量导入
*/
@PostMapping
(
"/upload"
)
// public AjaxResult batchUpload(@RequestPart("file") MultipartFile file, HttpServletRequest request, HttpServletResponse response){
public
AjaxResult
batchUpload
(
@RequestPart
(
"file"
)
MultipartFile
file
){
return
businessInfoService
.
batchUpload
(
file
);
}
/**
* 查询所有项目名称(支持模糊查询)
*/
// @PreAuthorize("@ss.hasPermi('system:info:list')")
@PostMapping
(
"/query/project"
)
public
AjaxResult
queryprojectName
(
@RequestBody
BusinessListDto
dto
){
return
AjaxResult
.
success
(
businessInfoService
.
selectProjectName
(
dto
));
...
...
@@ -44,9 +55,9 @@ public class BusinessInfoController extends BaseController
/**
* 查询项目列表
*/
// @PreAuthorize("@ss.hasPermi('system:
info
:list')")
// @PreAuthorize("@ss.hasPermi('system:
business
:list')")
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
@RequestBody
BusinessListDto
dto
)
public
TableDataInfo
list
(
@RequestBody
(
required
=
false
)
BusinessListDto
dto
)
{
startPage
();
List
<
BusinessListVo
>
list
=
businessInfoService
.
selectBusinessInfoList
(
dto
);
...
...
@@ -56,7 +67,7 @@ public class BusinessInfoController extends BaseController
/**
* 查询项目速览
*/
// @PreAuthorize("@ss.hasPermi('system:
info:list
')")
// @PreAuthorize("@ss.hasPermi('system:
business:query
')")
@GetMapping
(
"/browse/{businessId}"
)
public
AjaxResult
browse
(
@PathVariable
Integer
id
)
{
...
...
@@ -66,7 +77,7 @@ public class BusinessInfoController extends BaseController
/**
* 获取项目建设内容
*/
// @PreAuthorize("@ss.hasPermi('system:
info
:query')")
// @PreAuthorize("@ss.hasPermi('system:
business
:query')")
@GetMapping
(
value
=
"/construction/{id}"
)
public
AjaxResult
getConstruction
(
@PathVariable
(
"id"
)
Integer
id
)
{
...
...
@@ -76,8 +87,8 @@ public class BusinessInfoController extends BaseController
/**
* 删除项目列表
*/
// @PreAuthorize("@ss.hasPermi('system:
info
:remove')")
// @Log(title = "项目详情
", businessType = BusinessType.DELETE)
// @PreAuthorize("@ss.hasPermi('system:
business
:remove')")
@Log
(
title
=
"项目管理
"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/remove/{ids}"
)
public
AjaxResult
remove
(
@PathVariable
(
value
=
"ids"
,
required
=
false
)
Long
[]
ids
)
{
...
...
@@ -87,8 +98,8 @@ public class BusinessInfoController extends BaseController
/**
* 新增项目详情
*/
// @PreAuthorize("@ss.hasPermi('system:
info
:add')")
// @Log(title = "项目详情
", businessType = BusinessType.INSERT)
// @PreAuthorize("@ss.hasPermi('system:
business
:add')")
@Log
(
title
=
"项目管理
"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
(
"/add"
)
public
AjaxResult
add
(
@RequestBody
BusinessAddDto
dto
)
{
...
...
@@ -98,8 +109,8 @@ public class BusinessInfoController extends BaseController
/**
* 修改项目详情
*/
// @PreAuthorize("@ss.hasPermi('system:
info
:edit')")
// @Log(title = "项目详情
", businessType = BusinessType.UPDATE)
// @PreAuthorize("@ss.hasPermi('system:
business
:edit')")
@Log
(
title
=
"项目管理
"
,
businessType
=
BusinessType
.
UPDATE
)
@PostMapping
(
"/edit"
)
public
AjaxResult
edit
(
@RequestBody
BusinessInfo
businessInfo
)
{
...
...
dsk-admin/src/main/java/com/dsk/web/controller/business/BusinessRelateCompanyController.java
View file @
2d6ab724
...
...
@@ -49,7 +49,7 @@ public class BusinessRelateCompanyController extends BaseController
*/
// @PreAuthorize("@ss.hasPermi('system:company:list')")
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
BusinessRelateCompany
businessRelateCompany
)
public
TableDataInfo
list
(
@RequestBody
(
required
=
false
)
BusinessRelateCompany
businessRelateCompany
)
{
startPage
();
List
<
BusinessRelateCompany
>
list
=
businessRelateCompanyService
.
selectBusinessRelateCompanyList
(
businessRelateCompany
);
...
...
dsk-admin/src/main/java/com/dsk/web/controller/search/macroMarket/RegionalEconomicDataController.java
View file @
2d6ab724
...
...
@@ -2,6 +2,7 @@ package com.dsk.web.controller.search.macroMarket;
import
com.dsk.common.core.domain.AjaxResult
;
import
com.dsk.common.dtos.OpRegionalEconomicDataV1Dto
;
import
com.dsk.common.dtos.OpRegionalEconomicDataV1PageDto
;
import
com.dsk.system.service.EconomicService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -29,7 +30,7 @@ public class RegionalEconomicDataController {
*@date: 2023/5/18 10:29
*/
@PostMapping
(
"/national/nationalPage"
)
public
AjaxResult
nationalPage
(
@RequestBody
OpRegionalEconomicDataV1Dto
dto
)
{
public
AjaxResult
nationalPage
(
@RequestBody
OpRegionalEconomicDataV1
Page
Dto
dto
)
{
return
economicService
.
nationalPage
(
dto
);
}
...
...
dsk-common/src/main/java/com/dsk/common/core/domain/entity/BusinessInfo.java
View file @
2d6ab724
...
...
@@ -118,6 +118,78 @@ public class BusinessInfo extends BaseEntity
@Excel
(
name
=
"项目状态"
)
private
Integer
status
;
/** 评标办法 */
@Excel
(
name
=
"评标办法"
)
private
String
evaluationBidWay
;
/** 开标时间 */
@Excel
(
name
=
"开标时间"
)
private
String
bidOpenTime
;
/** 开标地点 */
@Excel
(
name
=
"开标地点"
)
private
String
bidOpenPlace
;
/** 保证金缴纳 */
@Excel
(
name
=
"保证金缴纳"
)
private
String
earnestMoneyPay
;
/** 保证金金额 */
@Excel
(
name
=
"保证金金额"
)
private
String
earnestMoney
;
/** 评标委员会 */
@Excel
(
name
=
"评标委员会"
)
private
String
evaluationBidCouncil
;
public
String
getEvaluationBidWay
()
{
return
evaluationBidWay
;
}
public
void
setEvaluationBidWay
(
String
evaluationBidWay
)
{
this
.
evaluationBidWay
=
evaluationBidWay
;
}
public
String
getBidOpenTime
()
{
return
bidOpenTime
;
}
public
void
setBidOpenTime
(
String
bidOpenTime
)
{
this
.
bidOpenTime
=
bidOpenTime
;
}
public
String
getBidOpenPlace
()
{
return
bidOpenPlace
;
}
public
void
setBidOpenPlace
(
String
bidOpenPlace
)
{
this
.
bidOpenPlace
=
bidOpenPlace
;
}
public
String
getEarnestMoneyPay
()
{
return
earnestMoneyPay
;
}
public
void
setEarnestMoneyPay
(
String
earnestMoneyPay
)
{
this
.
earnestMoneyPay
=
earnestMoneyPay
;
}
public
String
getEarnestMoney
()
{
return
earnestMoney
;
}
public
void
setEarnestMoney
(
String
earnestMoney
)
{
this
.
earnestMoney
=
earnestMoney
;
}
public
String
getEvaluationBidCouncil
()
{
return
evaluationBidCouncil
;
}
public
void
setEvaluationBidCouncil
(
String
evaluationBidCouncil
)
{
this
.
evaluationBidCouncil
=
evaluationBidCouncil
;
}
public
Integer
getStatus
()
{
return
status
;
}
...
...
@@ -359,7 +431,12 @@ public class BusinessInfo extends BaseEntity
.
append
(
"createTime"
,
getCreateTime
())
.
append
(
"updateTime"
,
getUpdateTime
())
.
append
(
"customerId"
,
getCustomerId
())
.
append
(
"status"
,
getStatus
())
.
append
(
"evaluationBidWay"
,
getEvaluationBidWay
())
.
append
(
"bidOpenTime"
,
getBidOpenTime
())
.
append
(
"bidOpenPlace"
,
getBidOpenPlace
())
.
append
(
"earnestMoneyPay"
,
getEarnestMoneyPay
())
.
append
(
"earnestMoney"
,
getEarnestMoney
())
.
append
(
"evaluationBidCouncil"
,
getEvaluationBidCouncil
())
.
toString
();
}
}
dsk-common/src/main/java/com/dsk/common/dtos/OpRegionalEconomicDataV1Dto.java
View file @
2d6ab724
package
com
.
dsk
.
common
.
dtos
;
import
com.dsk.common.core.domain.model.BasePage
;
import
lombok.Data
;
/**
...
...
@@ -11,27 +10,40 @@ import lombok.Data;
* @Version
*/
@Data
public
class
OpRegionalEconomicDataV1Dto
extends
BasePage
{
public
class
OpRegionalEconomicDataV1Dto
{
/**
* id
*/
private
Integer
id
;
/**
* 年份
*/
private
Integer
year
;
/**
* 省
* 省
Id
*/
private
String
provinceId
;
private
Integer
provinceId
;
/**
* 市
* 市
Id
*/
private
String
cityId
;
private
Integer
cityId
;
/**
* 区Id
*/
private
Integer
areaId
;
/**
*
区
*
城市类型 1:直辖市
*/
private
String
areaId
;
private
Integer
cityType
;
/**
*
全国宏观经济:1 / 辖区经济:2 / 地区对比:3
*
城市类型 1:直辖市
*/
private
Integer
t
ype
;
private
Integer
provinceT
ype
;
}
dsk-common/src/main/java/com/dsk/common/dtos/OpRegionalEconomicDataV1PageDto.java
0 → 100644
View file @
2d6ab724
package
com
.
dsk
.
common
.
dtos
;
import
com.dsk.common.core.domain.model.BasePage
;
import
lombok.Data
;
import
java.util.List
;
/**
* @ClassName OpRegionalEconomicDataV1PageDto
* @Description 专项债-项目类别统计
* @Author Dgm
* @Date 2023/5/23 14:05
* @Version
*/
@Data
public
class
OpRegionalEconomicDataV1PageDto
extends
BasePage
{
/**
* 年份
*/
private
Integer
year
;
/**
* 省
*/
private
List
<
String
>
provinceIds
;
/**
* 市
*/
private
List
<
String
>
cityIds
;
/**
* 区
*/
private
List
<
String
>
areaIds
;
/**
* 全国宏观经济:1 / 辖区经济:2 / 地区对比:3
*/
private
Integer
type
;
/**
* 排序字段 默认gdp
*/
private
String
field
=
"gdp"
;
/**
* 排序 (降序desc 升序asc)
*/
private
String
order
=
"desc"
;
}
dsk-operate-ui/src/views/project/overview/index.vue
View file @
2d6ab724
...
...
@@ -58,7 +58,7 @@
</div>
</div>
<el-divider></el-divider>
<div
class=
"cardtitles i"
>
储备项目类
</div>
<div
class=
"cardtitles i"
>
储备项目类
型
</div>
<div
class=
"gzlist"
>
<div>
<img
src=
"@/assets/images/project/EPC.png"
>
...
...
dsk-operate-ui/src/views/project/projectList/detail.vue
View file @
2d6ab724
...
...
@@ -148,7 +148,7 @@
{
tag
:
'zlwd'
,
name
:
'资料文档'
},
{
tag
:
'xgqy'
,
name
:
'相关企业'
},
],
thistag
:
'x
gqy
'
,
thistag
:
'x
msl
'
,
xmlx
:
'请选择'
,
//项目类型
xmlb
:
'请选择'
,
//项目类别
islock
:
true
,
//仅自己可见
...
...
dsk-operate-ui/src/views/project/projectList/index.vue
View file @
2d6ab724
...
...
@@ -227,7 +227,7 @@ export default {
getList
(
pageNum
){
this
.
searchParam
.
pageNum
=
pageNum
console
.
log
(
this
.
searchParam
)
return
false
//
return false
getProjectlist
(
this
.
searchParam
).
then
(
result
=>
{
console
.
log
(
result
)
})
...
...
dsk-system/src/main/java/com/dsk/system/domain/BusinessAddDto.java
View file @
2d6ab724
package
com
.
dsk
.
system
.
domain
;
import
com.dsk.common.utils.StringUtils
;
import
lombok.Data
;
/**
...
...
@@ -60,6 +61,6 @@ public class BusinessAddDto {
private
String
customerId
;
public
Double
getInvestmentAmount
()
{
return
Double
.
parseDouble
(
investmentAmount
);
return
StringUtils
.
isEmpty
(
investmentAmount
)
?
0
:
Double
.
parseDouble
(
investmentAmount
);
}
}
dsk-system/src/main/java/com/dsk/system/domain/BusinessExcelDto.java
0 → 100644
View file @
2d6ab724
package
com
.
dsk
.
system
.
domain
;
import
com.dsk.common.utils.StringUtils
;
import
lombok.Data
;
/**
* @author lxl
* @Description:
* @Date 2023/6/1 下午 6:41
**/
@Data
public
class
BusinessExcelDto
{
/**
* 项目名称
*/
private
String
projectName
;
/**
* 投资估算(万元)
*/
private
String
investmentAmount
;
/**
* 业主单位
*/
private
String
ownerCompany
;
}
dsk-system/src/main/java/com/dsk/system/domain/BusinessListDto.java
View file @
2d6ab724
...
...
@@ -2,6 +2,8 @@ package com.dsk.system.domain;
import
lombok.Data
;
import
java.util.List
;
/**
* @author lxl
* @Description:
...
...
@@ -28,17 +30,17 @@ public class BusinessListDto {
/**
* 省id
*/
private
Integer
provinceId
;
private
List
<
Integer
>
provinceId
;
/**
* 市id
*/
private
Integer
cityId
;
private
List
<
Integer
>
cityId
;
/**
* 区id
*/
private
Integer
districtId
;
private
List
<
Integer
>
districtId
;
/**
* 项目类型
...
...
dsk-system/src/main/java/com/dsk/system/domain/vo/BusinessListVo.java
View file @
2d6ab724
...
...
@@ -26,17 +26,17 @@ public class BusinessListVo {
/**
* 省
*/
private
Integer
provinceName
;
private
String
provinceName
;
/**
* 市
*/
private
Integer
cityName
;
private
String
cityName
;
/**
* 区
*/
private
Integer
districtName
;
private
String
districtName
;
/**
* 投资估算
...
...
dsk-system/src/main/java/com/dsk/system/mapper/BusinessInfoMapper.java
View file @
2d6ab724
...
...
@@ -90,7 +90,13 @@ public interface BusinessInfoMapper extends BaseMapper<BusinessInfo>
*/
BusinessBrowseVo
selectTotal
(
Integer
business
);
/**
* 查询项目名称是否存在
* @param projectName
* @param userId
* @return
*/
int
isRepetitionProjectName
(
@Param
(
"projectName"
)
String
projectName
,
@Param
(
"userId"
)
Integer
userId
);
int
selectCountByStatusAndCustomerId
(
@Param
(
"status"
)
Integer
status
,
@Param
(
"customerId"
)
String
customerId
);
...
...
dsk-system/src/main/java/com/dsk/system/service/EconomicService.java
View file @
2d6ab724
...
...
@@ -2,6 +2,7 @@ package com.dsk.system.service;
import
com.dsk.common.core.domain.AjaxResult
;
import
com.dsk.common.dtos.OpRegionalEconomicDataV1Dto
;
import
com.dsk.common.dtos.OpRegionalEconomicDataV1PageDto
;
/**
* @ClassName EconomicService
...
...
@@ -19,7 +20,7 @@ public interface EconomicService {
*@Author: Dgm
*@date: 2023/5/18 10:25
*/
AjaxResult
nationalPage
(
OpRegionalEconomicDataV1Dto
dto
);
AjaxResult
nationalPage
(
OpRegionalEconomicDataV1
Page
Dto
dto
);
/***
*@Description: 全国经济大全详情
...
...
dsk-system/src/main/java/com/dsk/system/service/IBusinessInfoService.java
View file @
2d6ab724
...
...
@@ -8,7 +8,9 @@ import com.dsk.system.domain.customer.dto.CustomerBusinessSearchDto;
import
com.dsk.system.domain.customer.vo.CustomerBusinessListVo
;
import
com.dsk.system.domain.vo.BusinessBrowseVo
;
import
com.dsk.system.domain.vo.BusinessListVo
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
/**
...
...
@@ -56,6 +58,11 @@ public interface IBusinessInfoService
*/
List
<
String
>
selectProjectName
(
BusinessListDto
dto
);
/**
* 项目批量导入
*/
AjaxResult
batchUpload
(
MultipartFile
file
);
/**
* 新增项目详情
*
...
...
dsk-system/src/main/java/com/dsk/system/service/impl/BusinessInfoServiceImpl.java
View file @
2d6ab724
package
com
.
dsk
.
system
.
service
.
impl
;
import
java.util.
Arrays
;
import
java.util.
LinkedList
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.dsk.common.constant.HttpStatus
;
import
com.dsk.common.core.domain.AjaxResult
;
import
com.dsk.common.core.domain.entity.BusinessInfo
;
import
com.dsk.common.core.domain.entity.BusinessLabel
;
import
com.dsk.common.core.domain.entity.BusinessRelateCompany
;
import
com.dsk.common.core.domain.entity.BusinessUser
;
import
com.dsk.common.
dtos.BusinessInfoDto
;
import
com.dsk.common.
exception.base.BaseException
;
import
com.dsk.common.utils.DateUtils
;
import
com.dsk.common.utils.SecurityUtils
;
import
com.dsk.system.domain.BusinessExcelDto
;
import
com.dsk.system.domain.BusinessAddDto
;
import
com.dsk.system.domain.BusinessListDto
;
import
com.dsk.system.domain.customer.dto.CustomerBusinessSearchDto
;
...
...
@@ -24,11 +29,14 @@ import com.dsk.system.mapper.BusinessLabelMapper;
import
com.dsk.system.mapper.BusinessRelateCompanyMapper
;
import
com.dsk.system.mapper.BusinessUserMapper
;
import
com.dsk.system.service.IBusinessInfoService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.val
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletResponse
;
/**
* 项目详情Service业务层处理
...
...
@@ -37,6 +45,7 @@ import javax.annotation.Resource;
* @date 2023-05-17
*/
@Service
@Slf4j
public
class
BusinessInfoServiceImpl
implements
IBusinessInfoService
{
@Resource
private
BusinessInfoMapper
businessInfoMapper
;
...
...
@@ -46,6 +55,8 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
private
BusinessRelateCompanyMapper
businessRelateCompanyMapper
;
@Resource
private
BusinessLabelMapper
businessLabelMapper
;
@Resource
private
ReadBusinessInfoExcel
readBusinessInfoExcel
;
/**
* 查询项目详情
...
...
@@ -71,6 +82,11 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
*/
@Override
public
List
<
BusinessListVo
>
selectBusinessInfoList
(
BusinessListDto
dto
)
{
if
(
dto
.
getUserId
()
==
null
)
{
Long
deptId
=
SecurityUtils
.
getLoginUser
().
getDeptId
();
if
(
deptId
==
null
)
throw
new
BaseException
(
"请登录"
);
dto
.
setDeptId
(
deptId
.
intValue
());
}
return
businessInfoMapper
.
selectBusinessInfoList
(
dto
);
}
...
...
@@ -79,7 +95,7 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
BusinessBrowseVo
businessBrowseVo
=
new
BusinessBrowseVo
();
//查询项目基本信息
BusinessInfo
businessInfo
=
businessInfoMapper
.
selectBusinessInfoById
(
businessId
);
BeanUtil
.
copyProperties
(
businessInfo
,
businessBrowseVo
);
BeanUtil
.
copyProperties
(
businessInfo
,
businessBrowseVo
);
//查询项目标签
businessBrowseVo
.
setLabelList
(
businessLabelMapper
.
selectBusinessLabelList
(
new
BusinessLabel
(
businessId
)).
stream
().
map
(
p
->
p
.
getLabel
()).
collect
(
Collectors
.
toList
()));
//查询关键企业
...
...
@@ -97,6 +113,40 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
return
businessInfoMapper
.
selectProjectName
(
dto
);
}
@Override
public
AjaxResult
batchUpload
(
MultipartFile
file
)
{
//获取当前登录用户id
Long
userId
=
SecurityUtils
.
getLoginUser
().
getUserId
();
// Long userId = 103L;
if
(
userId
==
null
)
return
AjaxResult
.
error
(
"请登录"
);
int
row
=
3
;
//起始行数
int
rowSuccess
=
0
;
//成功条数
Integer
errorCount
=
0
;
//失败条数
List
<
String
>
result
=
new
LinkedList
();
//导入结果汇总
List
<
BusinessExcelDto
>
businessInfoList
=
readBusinessInfoExcel
.
getExcelInfo
(
file
);
for
(
BusinessExcelDto
businessInfo
:
businessInfoList
)
{
//查询已有的项目名称
Integer
count
=
businessInfoMapper
.
isRepetitionProjectName
(
businessInfo
.
getProjectName
(),
userId
.
intValue
());
row
++;
if
(
count
>
0
)
{
//如果存在,跳过该项目,不保存
result
.
add
(
"第"
+
row
+
"行的"
+
businessInfo
.
getProjectName
()
+
"的项目已存在,跳过该项目,保存下一条"
);
errorCount
++;
}
else
{
//保存到数据库
BusinessAddDto
businessAddDto
=
new
BusinessAddDto
();
BeanUtil
.
copyProperties
(
businessInfo
,
businessAddDto
);
businessAddDto
.
setUserId
(
userId
.
intValue
());
businessAddDto
.
setCompanyId
(
0
);
AjaxResult
add
=
insertBusinessInfo
(
businessAddDto
);
if
(
add
.
get
(
"code"
).
equals
(
HttpStatus
.
SUCCESS
))
rowSuccess
++;
}
}
result
.
add
(
"导入项目成功条数"
+
rowSuccess
);
result
.
add
(
"导入项目失败条数"
+
errorCount
);
return
errorCount
==
businessInfoList
.
size
()
?
AjaxResult
.
error
(
String
.
join
(
","
,
result
))
:
AjaxResult
.
success
(
String
.
join
(
","
,
result
));
}
/**
* 新增项目详情
*
...
...
@@ -106,6 +156,9 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
@Override
@Transactional
public
AjaxResult
insertBusinessInfo
(
BusinessAddDto
dto
)
{
//新增前查询是否已存在
int
count
=
businessInfoMapper
.
isRepetitionProjectName
(
dto
.
getProjectName
(),
dto
.
getUserId
());
if
(
count
>
0
)
return
AjaxResult
.
error
(
"项目名称已存在"
);
//新增项目主信息
BusinessInfo
businessInfo
=
new
BusinessInfo
();
BeanUtil
.
copyProperties
(
dto
,
businessInfo
);
...
...
@@ -132,8 +185,7 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
*/
@Override
@Transactional
public
int
updateBusinessInfo
(
BusinessInfo
businessInfo
)
{
public
int
updateBusinessInfo
(
BusinessInfo
businessInfo
)
{
businessInfo
.
setUpdateTime
(
DateUtils
.
getNowDate
());
return
businessInfoMapper
.
updateBusinessInfo
(
businessInfo
);
}
...
...
dsk-system/src/main/java/com/dsk/system/service/impl/EconomicServiceImpl.java
View file @
2d6ab724
...
...
@@ -3,6 +3,7 @@ package com.dsk.system.service.impl;
import
cn.hutool.core.bean.BeanUtil
;
import
com.dsk.common.core.domain.AjaxResult
;
import
com.dsk.common.dtos.OpRegionalEconomicDataV1Dto
;
import
com.dsk.common.dtos.OpRegionalEconomicDataV1PageDto
;
import
com.dsk.common.utils.DskOpenApiUtil
;
import
com.dsk.system.service.EconomicService
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -25,8 +26,8 @@ public class EconomicServiceImpl implements EconomicService {
private
DskOpenApiUtil
dskOpenApiUtil
;
@Override
public
AjaxResult
nationalPage
(
OpRegionalEconomicDataV1Dto
dto
)
{
Map
<
String
,
Object
>
map
=
dskOpenApiUtil
.
requestBody
(
"/
api/
economic/national/nationalPage"
,
BeanUtil
.
beanToMap
(
dto
,
false
,
false
));
public
AjaxResult
nationalPage
(
OpRegionalEconomicDataV1
Page
Dto
dto
)
{
Map
<
String
,
Object
>
map
=
dskOpenApiUtil
.
requestBody
(
"/economic/national/nationalPage"
,
BeanUtil
.
beanToMap
(
dto
,
false
,
false
));
return
BeanUtil
.
toBean
(
map
,
AjaxResult
.
class
);
}
...
...
@@ -34,25 +35,25 @@ public class EconomicServiceImpl implements EconomicService {
public
AjaxResult
details
(
Integer
id
)
{
Map
<
String
,
Object
>
bodyMap
=
new
HashMap
<>(
1
);
bodyMap
.
put
(
"id"
,
id
);
Map
<
String
,
Object
>
map
=
dskOpenApiUtil
.
requestBody
(
"/
api/
economic/details"
,
bodyMap
);
Map
<
String
,
Object
>
map
=
dskOpenApiUtil
.
requestBody
(
"/economic/details"
,
bodyMap
);
return
BeanUtil
.
toBean
(
map
,
AjaxResult
.
class
);
}
@Override
public
AjaxResult
statisticsRegional
(
OpRegionalEconomicDataV1Dto
dto
)
{
Map
<
String
,
Object
>
map
=
dskOpenApiUtil
.
requestBody
(
"/
api/
economic/statistics/regional"
,
BeanUtil
.
beanToMap
(
dto
,
false
,
false
));
Map
<
String
,
Object
>
map
=
dskOpenApiUtil
.
requestBody
(
"/economic/statistics/regional"
,
BeanUtil
.
beanToMap
(
dto
,
false
,
false
));
return
BeanUtil
.
toBean
(
map
,
AjaxResult
.
class
);
}
@Override
public
AjaxResult
regionalList
(
OpRegionalEconomicDataV1Dto
dto
)
{
Map
<
String
,
Object
>
map
=
dskOpenApiUtil
.
requestBody
(
"/
api/
economic/regional/list"
,
BeanUtil
.
beanToMap
(
dto
,
false
,
false
));
Map
<
String
,
Object
>
map
=
dskOpenApiUtil
.
requestBody
(
"/economic/regional/list"
,
BeanUtil
.
beanToMap
(
dto
,
false
,
false
));
return
BeanUtil
.
toBean
(
map
,
AjaxResult
.
class
);
}
@Override
public
AjaxResult
regionalComparison
(
OpRegionalEconomicDataV1Dto
dto
)
{
Map
<
String
,
Object
>
map
=
dskOpenApiUtil
.
requestBody
(
"/
api/
economic/xx"
,
BeanUtil
.
beanToMap
(
dto
,
false
,
false
));
Map
<
String
,
Object
>
map
=
dskOpenApiUtil
.
requestBody
(
"/economic/xx"
,
BeanUtil
.
beanToMap
(
dto
,
false
,
false
));
return
BeanUtil
.
toBean
(
map
,
AjaxResult
.
class
);
}
...
...
dsk-system/src/main/java/com/dsk/system/service/impl/ReadBusinessInfoExcel.java
0 → 100644
View file @
2d6ab724
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
lombok.extern.slf4j.Slf4j
;
import
org.apache.poi.hssf.usermodel.HSSFWorkbook
;
import
org.apache.poi.ss.usermodel.*
;
import
org.apache.poi.xssf.usermodel.XSSFWorkbook
;
import
org.springframework.stereotype.Service
;
import
org.springframework.web.multipart.MultipartFile
;
/**
* @author lxl
* @Description:
* @Date 2023/6/1 下午 4:30
**/
@Slf4j
@Service
public
class
ReadBusinessInfoExcel
{
// 总行数
private
int
totalRows
=
0
;
// 总条数
private
int
totalCells
=
0
;
public
int
getTotalRows
()
{
return
totalRows
;
}
public
void
setTotalRows
(
int
totalRows
)
{
this
.
totalRows
=
totalRows
;
}
public
int
getTotalCells
()
{
return
totalCells
;
}
public
void
setTotalCells
(
int
totalCells
)
{
this
.
totalCells
=
totalCells
;
}
/**
* 读EXCEL文件,获取信息集合
*
* @param mFile
* @return
*/
public
List
<
BusinessExcelDto
>
getExcelInfo
(
MultipartFile
mFile
)
{
String
fileName
=
mFile
.
getOriginalFilename
();
// 获取文件名
try
{
// 验证文件名是否合格
if
(!
validateExcel
(
fileName
))
return
null
;
// 根据文件名判断文件是2003版本还是2007版本
boolean
isExcel2003
=
true
;
if
(
isExcel2007
(
fileName
))
isExcel2003
=
false
;
return
createExcel
(
mFile
.
getInputStream
(),
isExcel2003
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
null
;
}
/**
* 根据excel里面的内容读取信息
*
* @param is 输入流
* @param isExcel2003 excel是2003还是2007版本
* @return
*/
public
List
<
BusinessExcelDto
>
createExcel
(
InputStream
is
,
boolean
isExcel2003
)
{
try
{
Workbook
wb
=
null
;
// 当excel是2003时,创建excel2003
if
(
isExcel2003
)
{
wb
=
new
HSSFWorkbook
(
is
);
}
else
{
// 当excel是2007时,创建excel2007
wb
=
new
XSSFWorkbook
(
is
);
}
return
readExcelValue
(
wb
);
// 读取Excel里面客户的信息
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
return
null
;
}
/**
* 读取Excel内容
*
* @param wb
* @return
*/
private
List
<
BusinessExcelDto
>
readExcelValue
(
Workbook
wb
)
{
//得到第一个shell
Sheet
sheet
=
wb
.
getSheetAt
(
0
);
//得到Excel的行数
this
.
totalRows
=
sheet
.
getPhysicalNumberOfRows
();
//得到Excel的列数(前提是有行数)
if
(
totalRows
>
1
&&
sheet
.
getRow
(
0
)
!=
null
)
{
this
.
totalCells
=
sheet
.
getRow
(
0
).
getPhysicalNumberOfCells
();
}
// List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
ArrayList
<
BusinessExcelDto
>
list
=
new
ArrayList
<>();
//循环Excel行数
//
for
(
int
r
=
3
;
r
<
totalRows
;
r
++)
{
Row
row
=
sheet
.
getRow
(
r
);
if
(
row
==
null
)
{
continue
;
}
//循环Excel的列
// Map<String, Object> map = new HashMap<String, Object>();
BusinessExcelDto
businessExcelDto
=
new
BusinessExcelDto
();
for
(
int
c
=
0
;
c
<
this
.
totalCells
;
c
++)
{
Cell
cell
=
row
.
getCell
(
c
);
if
(
null
!=
cell
)
{
if
(
c
==
0
)
{
//如果是纯数字,比如你写的是25,cell.getNumericCellValue()获得是25.0,通过截取字符串去掉.0获得25
if
(
cell
.
getCellType
()
==
CellType
.
NUMERIC
)
{
String
name
=
String
.
valueOf
(
cell
.
getNumericCellValue
());
businessExcelDto
.
setProjectName
(
name
.
substring
(
0
,
name
.
length
()
-
2
>
0
?
name
.
length
()
-
2
:
1
));
//项目名称
}
else
{
businessExcelDto
.
setProjectName
(
cell
.
getStringCellValue
());
//名称
}
}
else
if
(
c
==
1
)
{
if
(
cell
.
getCellType
()
==
CellType
.
NUMERIC
)
{
String
company
=
String
.
valueOf
(
cell
.
getNumericCellValue
());
businessExcelDto
.
setOwnerCompany
(
company
.
substring
(
0
,
company
.
length
()
-
2
>
0
?
company
.
length
()
-
2
:
1
));
//业主单位
}
else
{
businessExcelDto
.
setOwnerCompany
(
cell
.
getStringCellValue
());
//性别
}
}
else
if
(
c
==
2
)
{
if
(
cell
.
getCellType
()
==
CellType
.
NUMERIC
)
{
String
amount
=
String
.
valueOf
(
cell
.
getNumericCellValue
());
businessExcelDto
.
setInvestmentAmount
(
amount
.
substring
(
0
,
amount
.
length
()
-
2
>
0
?
amount
.
length
()
-
2
:
1
));
//投资估算(万元)
}
else
{
businessExcelDto
.
setInvestmentAmount
(
cell
.
getStringCellValue
());
}
}
}
}
//添加到list
list
.
add
(
businessExcelDto
);
}
log
.
info
(
"项目批量导入Excel数据,{}"
,
list
);
return
list
;
}
/**
* 验证EXCEL文件
* @param filePath
* @return
*/
public
boolean
validateExcel
(
String
filePath
)
{
if
(
filePath
==
null
||
!(
isExcel2003
(
filePath
)
||
isExcel2007
(
filePath
)))
{
log
.
info
(
"文件不是excel格式"
);
return
false
;
}
return
true
;
}
// @描述:是否是2003的excel,返回true是2003
public
static
boolean
isExcel2003
(
String
filePath
)
{
return
filePath
.
matches
(
"^.+\\.(?i)(xls)$"
);
}
// @描述:是否是2007的excel,返回true是2007
public
static
boolean
isExcel2007
(
String
filePath
)
{
return
filePath
.
matches
(
"^.+\\.(?i)(xlsx)$"
);
}
}
dsk-system/src/main/java/com/dsk/system/service/impl/RegionalEnterprisesServiceImpl.java
View file @
2d6ab724
...
...
@@ -5,7 +5,6 @@ import com.dsk.common.core.domain.AjaxResult;
import
com.dsk.common.dtos.ComposeQueryDto
;
import
com.dsk.common.utils.DskOpenApiUtil
;
import
com.dsk.system.service.RegionalEnterprisesService
;
import
com.dsk.system.service.SpecialPurposeBondsService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -26,7 +25,7 @@ public class RegionalEnterprisesServiceImpl implements RegionalEnterprisesServic
@Override
public
AjaxResult
page
(
ComposeQueryDto
compose
)
{
Map
<
String
,
Object
>
map
=
dskOpenApiUtil
.
requestBody
(
"/
api/jsk/search/enterpriseP
age"
,
BeanUtil
.
beanToMap
(
compose
,
false
,
false
));
Map
<
String
,
Object
>
map
=
dskOpenApiUtil
.
requestBody
(
"/
nationzj/enterprice/p
age"
,
BeanUtil
.
beanToMap
(
compose
,
false
,
false
));
return
BeanUtil
.
toBean
(
map
,
AjaxResult
.
class
);
}
}
dsk-system/src/main/java/com/dsk/system/service/impl/SpecialPurposeBondsServiceImpl.java
View file @
2d6ab724
...
...
@@ -28,7 +28,7 @@ public class SpecialPurposeBondsServiceImpl implements SpecialPurposeBondsServic
@Override
public
AjaxResult
page
(
SpecialPurposeBondsPageDto
dto
)
{
Map
<
String
,
Object
>
map
=
dskOpenApiUtil
.
requestBody
(
"/
api/
specialPurposeBonds/projects/page"
,
BeanUtil
.
beanToMap
(
dto
,
false
,
false
));
Map
<
String
,
Object
>
map
=
dskOpenApiUtil
.
requestBody
(
"/specialPurposeBonds/projects/page"
,
BeanUtil
.
beanToMap
(
dto
,
false
,
false
));
return
BeanUtil
.
toBean
(
map
,
AjaxResult
.
class
);
}
...
...
@@ -36,19 +36,19 @@ public class SpecialPurposeBondsServiceImpl implements SpecialPurposeBondsServic
public
AjaxResult
details
(
String
id
)
{
Map
<
String
,
Object
>
bodyMap
=
new
HashMap
<>(
1
);
bodyMap
.
put
(
"id"
,
id
);
Map
<
String
,
Object
>
map
=
dskOpenApiUtil
.
requestBody
(
"/
api/
specialPurposeBonds/details"
,
bodyMap
);
Map
<
String
,
Object
>
map
=
dskOpenApiUtil
.
requestBody
(
"/specialPurposeBonds/details"
,
bodyMap
);
return
BeanUtil
.
toBean
(
map
,
AjaxResult
.
class
);
}
@Override
public
AjaxResult
bondStatistics
(
SpecialPurposeBondsDto
dto
)
{
Map
<
String
,
Object
>
map
=
dskOpenApiUtil
.
requestBody
(
"/
api/
specialPurposeBonds/bond/statistics"
,
BeanUtil
.
beanToMap
(
dto
,
false
,
false
));
Map
<
String
,
Object
>
map
=
dskOpenApiUtil
.
requestBody
(
"/specialPurposeBonds/bond/statistics"
,
BeanUtil
.
beanToMap
(
dto
,
false
,
false
));
return
BeanUtil
.
toBean
(
map
,
AjaxResult
.
class
);
}
@Override
public
AjaxResult
bondPage
(
SpecialBondInformationPageDto
pageDto
)
{
Map
<
String
,
Object
>
map
=
dskOpenApiUtil
.
requestBody
(
"/
api/
specialPurposeBonds/bond/page"
,
BeanUtil
.
beanToMap
(
pageDto
,
false
,
false
));
Map
<
String
,
Object
>
map
=
dskOpenApiUtil
.
requestBody
(
"/specialPurposeBonds/bond/page"
,
BeanUtil
.
beanToMap
(
pageDto
,
false
,
false
));
return
BeanUtil
.
toBean
(
map
,
AjaxResult
.
class
);
}
}
dsk-system/src/main/java/com/dsk/system/service/impl/UrbanInvestmentPlatformServiceImpl.java
View file @
2d6ab724
...
...
@@ -26,7 +26,7 @@ public class UrbanInvestmentPlatformServiceImpl implements UrbanInvestmentPlatfo
@Override
public
AjaxResult
page
(
UrbanInvestmentPlatformDto
pageDto
)
{
Map
<
String
,
Object
>
map
=
dskOpenApiUtil
.
requestBody
(
"/
api/
urbanInvestment/page"
,
BeanUtil
.
beanToMap
(
pageDto
,
false
,
false
));
Map
<
String
,
Object
>
map
=
dskOpenApiUtil
.
requestBody
(
"/urbanInvestment/page"
,
BeanUtil
.
beanToMap
(
pageDto
,
false
,
false
));
return
BeanUtil
.
toBean
(
map
,
AjaxResult
.
class
);
}
...
...
@@ -34,13 +34,13 @@ public class UrbanInvestmentPlatformServiceImpl implements UrbanInvestmentPlatfo
public
AjaxResult
details
(
String
id
)
{
Map
<
String
,
Object
>
bodyMap
=
new
HashMap
<>(
1
);
bodyMap
.
put
(
"id"
,
id
);
Map
<
String
,
Object
>
map
=
dskOpenApiUtil
.
requestBody
(
"/
api/
urbanInvestment/details"
,
bodyMap
);
Map
<
String
,
Object
>
map
=
dskOpenApiUtil
.
requestBody
(
"/urbanInvestment/details"
,
bodyMap
);
return
BeanUtil
.
toBean
(
map
,
AjaxResult
.
class
);
}
@Override
public
AjaxResult
statistics
(
UrbanInvestmentPlatformDto
dto
)
{
Map
<
String
,
Object
>
map
=
dskOpenApiUtil
.
requestBody
(
"/
api/
urbanInvestment/statistics"
,
BeanUtil
.
beanToMap
(
dto
,
false
,
false
));
Map
<
String
,
Object
>
map
=
dskOpenApiUtil
.
requestBody
(
"/urbanInvestment/statistics"
,
BeanUtil
.
beanToMap
(
dto
,
false
,
false
));
return
BeanUtil
.
toBean
(
map
,
AjaxResult
.
class
);
}
}
dsk-system/src/main/resources/mapper/business/BusinessInfoMapper.xml
View file @
2d6ab724
...
...
@@ -29,7 +29,12 @@
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"status"
column=
"status"
/>
<result
property=
"customerId"
column=
"customer_id"
/>
<result
property=
"evaluationBidWay"
column=
"evaluation_bid_way"
/>
<result
property=
"bidOpenTime"
column=
"bid_open_time"
/>
<result
property=
"bidOpenPlace"
column=
"bid_open_place"
/>
<result
property=
"earnestMoneyPay"
column=
"earnest_money_pay"
/>
<result
property=
"earnestMoney"
column=
"earnest_money"
/>
<result
property=
"evaluationBidCouncil"
column=
"evaluation_bid_council"
/>
</resultMap>
<sql
id=
"selectBusinessInfoVo"
>
...
...
@@ -57,7 +62,13 @@
create_time,
update_time,
status,
customer_id
customer_id,
evaluation_bid_way,
bid_open_time,
bid_open_place,
earnest_money_pay,
earnest_money,
evaluation_bid_council
from business_info
</sql>
...
...
@@ -80,15 +91,6 @@
LEFT JOIN business_user bu on bu.business_id = i.id
LEFT JOIN sys_user u on u.user_id = f.user_id
<where>
<if
test=
"provinceId != null"
>
and i.province_id = #{provinceId}
</if>
<if
test=
"cityId != null"
>
and i.city_id = #{cityId}
</if>
<if
test=
"districtId != null"
>
and i.district_id = #{districtId}
</if>
<if
test=
"projectType != null and projectType != ''"
>
and i.project_type = #{projectType}
</if>
...
...
@@ -116,6 +118,77 @@
<if
test=
"deptId != null"
>
and bu.dept_id = #{deptId} and i.is_private = 1
</if>
<if
test=
"provinceId != null and provinceId.size > 0 and cityId == null and districtId == null"
>
and i.province_id in
<foreach
collection=
"provinceId"
item=
"provinceId"
open=
"("
separator=
","
close=
")"
>
#{provinceId}
</foreach>
</if>
<if
test=
"cityId != null and cityId.size > 0 and provinceId == null and districtId == null"
>
and i.city_id in
<foreach
collection=
"cityId"
item=
"cityId"
open=
"("
separator=
","
close=
")"
>
#{cityId}
</foreach>
</if>
<if
test=
"districtId != null and districtId.size > 0 and provinceId == null and cityId == null"
>
and i.district_id in
<foreach
collection=
"districtId"
item=
"districtId"
open=
"("
separator=
","
close=
")"
>
#{districtId}
</foreach>
</if>
<if
test=
"provinceId != null and provinceId.size > 0 and cityId != null and cityId.size > 0 and districtId == null"
>
and (
i.province_id in
<foreach
collection=
"provinceId"
item=
"provinceId"
open=
"("
separator=
","
close=
")"
>
#{provinceId}
</foreach>
or i.city_id in
<foreach
collection=
"cityId"
item=
"cityId"
open=
"("
separator=
","
close=
")"
>
#{cityId}
</foreach>
)
</if>
<if
test=
"provinceId != null and provinceId.size > 0 and districtId != null and districtId.size > 0 and cityId == null"
>
and (
i.province_id in
<foreach
collection=
"provinceId"
item=
"provinceId"
open=
"("
separator=
","
close=
")"
>
#{provinceId}
</foreach>
or i.district_id in
<foreach
collection=
"districtId"
item=
"districtId"
open=
"("
separator=
","
close=
")"
>
#{districtId}
</foreach>
)
</if>
<if
test=
"cityId != null and cityId.size > 0 and districtId != null and districtId.size > 0 and provinceId ==null"
>
and (
i.city_id in
<foreach
collection=
"cityId"
item=
"cityId"
open=
"("
separator=
","
close=
")"
>
#{cityId}
</foreach>
or i.district_id in
<foreach
collection=
"districtId"
item=
"districtId"
open=
"("
separator=
","
close=
")"
>
#{districtId}
</foreach>
)
</if>
<if
test=
"provinceId != null and provinceId.size > 0 and cityId != null and cityId.size > 0 and districtId != null and districtId.size > 0"
>
and (
i.province_id in
<foreach
collection=
"provinceId"
item=
"provinceId"
open=
"("
separator=
","
close=
")"
>
#{provinceId}
</foreach>
or i.city_id in
<foreach
collection=
"cityId"
item=
"cityId"
open=
"("
separator=
","
close=
")"
>
#{cityId}
</foreach>
or i.district_id in
<foreach
collection=
"districtId"
item=
"districtId"
open=
"("
separator=
","
close=
")"
>
#{districtId}
</foreach>
)
</if>
</where>
GROUP BY i.id
ORDER BY i.create_time DESC
...
...
@@ -178,7 +251,12 @@
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"status != null"
>
status,
</if>
<if
test=
"customerId != null"
>
customer_id,
</if>
<if
test=
"evaluationBidWay != null"
>
evaluation_bid_way,
</if>
<if
test=
"bidOpenTime != null"
>
bid_open_time,
</if>
<if
test=
"bidOpenPlace != null"
>
bid_open_place,
</if>
<if
test=
"earnestMoneyPay != null"
>
earnest_money_pay,
</if>
<if
test=
"earnestMoney != null"
>
earnest_money,
</if>
<if
test=
"evaluationBidCouncil != null"
>
evaluation_bid_council,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"projectName != null"
>
#{projectName},
</if>
...
...
@@ -205,6 +283,12 @@
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
<if
test=
"status != null"
>
#{status},
</if>
<if
test=
"customerId != null"
>
#{customerId},
</if>
<if
test=
"evaluationBidWay != null"
>
#{evaluationBidWay},
</if>
<if
test=
"bidOpenTime != null"
>
#{bidOpenTime},
</if>
<if
test=
"bidOpenPlace != null"
>
#{bidOpenPlace},
</if>
<if
test=
"earnestMoneyPay != null"
>
#{earnestMoneyPay},
</if>
<if
test=
"earnestMoney != null"
>
#{earnestMoney},
</if>
<if
test=
"evaluationBidCouncil != null"
>
#{evaluationBidCouncil},
</if>
</trim>
</insert>
...
...
@@ -235,6 +319,12 @@
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
<if
test=
"status != null"
>
status = #{status},
</if>
<if
test=
"customerId != null"
>
customer_id = #{customerId},
</if>
<if
test=
"evaluationBidWay != null"
>
evaluation_bid_way = #{evaluationBidWay},
</if>
<if
test=
"bidOpenTime != null"
>
bid_open_time = #{bidOpenTime},
</if>
<if
test=
"bidOpenPlace != null"
>
bid_open_place = #{bidOpenPlace},
</if>
<if
test=
"earnestMoneyPay != null"
>
earnest_money_pay = #{earnestMoneyPay},
</if>
<if
test=
"earnestMoney != null"
>
earnest_money = #{earnestMoney},
</if>
<if
test=
"evaluationBidCouncil != null"
>
evaluation_bid_council = #{evaluationBidCouncil},
</if>
</trim>
where id = #{id}
</update>
...
...
@@ -278,8 +368,21 @@
plan_start_time,
plan_complete_time,
build_property,
project_details
project_details,
evaluation_bid_way,
bid_open_time,
bid_open_place,
earnest_money_pay,
earnest_money,
evaluation_bid_council
from business_info
where id = #{id}
</select>
<select
id=
"isRepetitionProjectName"
resultType=
"java.lang.Integer"
>
select count(i.id)
from business_info i
inner join business_user u on u.business_id = i.id
where i.project_name = #{projectName}
and u.user_id = #{userId}
</select>
</mapper>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment