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
9c873f37
Commit
9c873f37
authored
Sep 14, 2023
by
danfuman
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'zuhuduan' of
http://192.168.60.201/root/dsk-operate-sys
into zuhuduan
parents
52a9ba95
964dd2f6
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
207 additions
and
21 deletions
+207
-21
SysRegionController.java
...va/com/dsk/web/controller/system/SysRegionController.java
+37
-0
application.yml
dsk-admin/src/main/resources/application.yml
+1
-0
BusinessInfoServiceImpl.java
...ava/com/dsk/biz/service/impl/BusinessInfoServiceImpl.java
+15
-14
index.vue
dsk-operate-ui/src/views/project/overview/index.vue
+12
-7
SysRegion.java
...system/src/main/java/com/dsk/system/domain/SysRegion.java
+75
-0
SysRegionMapper.java
.../src/main/java/com/dsk/system/mapper/SysRegionMapper.java
+18
-0
SysRegionService.java
...rc/main/java/com/dsk/system/service/SysRegionService.java
+17
-0
SysRegionServiceImpl.java
...ava/com/dsk/system/service/impl/SysRegionServiceImpl.java
+32
-0
No files found.
dsk-admin/src/main/java/com/dsk/web/controller/system/SysRegionController.java
0 → 100644
View file @
9c873f37
package
com
.
dsk
.
web
.
controller
.
system
;
import
com.dsk.common.core.controller.BaseController
;
import
com.dsk.common.core.domain.AjaxResult
;
import
com.dsk.common.core.domain.R
;
import
com.dsk.system.domain.SysRegion
;
import
com.dsk.system.service.SysRegionService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
/**
* 地区信息
*
* @author lcl
* @create 2023/6/28
*/
@RestController
@RequestMapping
(
"/system/region"
)
public
class
SysRegionController
extends
BaseController
{
@Autowired
private
SysRegionService
baseService
;
/**
* 通过父id获取下级地区信息
*/
@GetMapping
(
"/list/{parentId}"
)
public
R
<
List
<
SysRegion
>>
listByParentId
(
@PathVariable
Integer
parentId
)
{
return
R
.
ok
(
baseService
.
selectByParentId
(
parentId
));
}
}
dsk-admin/src/main/resources/application.yml
View file @
9c873f37
...
@@ -157,6 +157,7 @@ tenant:
...
@@ -157,6 +157,7 @@ tenant:
-
sys_user_post
-
sys_user_post
-
sys_user_role
-
sys_user_role
-
sys_client
-
sys_client
-
sys_region
-
contact_info
-
contact_info
-
customer_user
-
customer_user
-
customer_follow_record
-
customer_follow_record
...
...
dsk-module/dsk-biz-api/src/main/java/com/dsk/biz/service/impl/BusinessInfoServiceImpl.java
View file @
9c873f37
...
@@ -190,33 +190,34 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
...
@@ -190,33 +190,34 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
List
<
String
>
result
=
new
LinkedList
();
//导入结果汇总
List
<
String
>
result
=
new
LinkedList
();
//导入结果汇总
List
<
BusinessExcelDto
>
businessInfoList
=
null
;
List
<
BusinessExcelDto
>
businessInfoList
=
null
;
try
{
try
{
businessInfoList
=
new
ExcelUtils
<>(
BusinessExcelDto
.
class
).
importExcel
(
file
.
getInputStream
(),
2
);
businessInfoList
=
new
ExcelUtils
<>(
BusinessExcelDto
.
class
).
importExcel
(
file
.
getInputStream
(),
2
);
if
(
CollectionUtil
.
isEmpty
(
businessInfoList
))
return
AjaxResult
.
error
(
"文档中无项目信息,请按照模板文档格式上传"
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
(
);
throw
new
ServiceException
(
"数据导入失败,请检查文档格式是否有误!"
);
}
}
// List<BusinessExcelDto> businessInfoList = readBusinessInfoExcel.getExcelInfo(file);
// List<BusinessExcelDto> businessInfoList = readBusinessInfoExcel.getExcelInfo(file);
if
(
CollectionUtil
.
isEmpty
(
businessInfoList
))
return
AjaxResult
.
error
(
"文档中无项目信息,请按照模板文档格式上传"
);
for
(
BusinessExcelDto
businessInfo
:
businessInfoList
)
{
for
(
BusinessExcelDto
businessInfo
:
businessInfoList
)
{
//查询已有的项目名称
//
//查询已有的项目名称
Integer
count
=
businessInfoMapper
.
isRepetitionProjectName
(
businessInfo
.
getProjectName
(),
userId
,
businessInfo
.
getOwnerCompany
());
//
Integer count = businessInfoMapper.isRepetitionProjectName(businessInfo.getProjectName(), userId, businessInfo.getOwnerCompany());
row
++;
//
row++;
if
(
count
>
0
)
{
//
if (count > 0) {
//如果存在,跳过该项目,不保存
//
//如果存在,跳过该项目,不保存
// result.add("第" + row + "行的" + businessInfo.getProjectName() + "的项目已存在,跳过该项目,保存下一条");
//
//
result.add("第" + row + "行的" + businessInfo.getProjectName() + "的项目已存在,跳过该项目,保存下一条");
log
.
info
(
"第"
+
row
+
"行的"
+
businessInfo
.
getProjectName
()
+
"的项目已存在,跳过该项目,保存下一条"
);
//
log.info("第" + row + "行的" + businessInfo.getProjectName() + "的项目已存在,跳过该项目,保存下一条");
errorCount
++;
//
errorCount++;
}
else
{
//
} else {
//保存到数据库
//保存到数据库
BusinessAddDto
businessAddDto
=
new
BusinessAddDto
();
BusinessAddDto
businessAddDto
=
new
BusinessAddDto
();
BeanUtil
.
copyProperties
(
businessInfo
,
businessAddDto
);
BeanUtil
.
copyProperties
(
businessInfo
,
businessAddDto
);
businessAddDto
.
setUserId
(
userId
);
businessAddDto
.
setUserId
(
userId
);
try
{
try
{
new
BusinessInfoServiceImpl
().
insertBusinessInfo
(
businessAddDto
);
// new BusinessInfoServiceImpl().insertBusinessInfo(businessAddDto);
this
.
insertBusinessInfo
(
businessAddDto
);
rowSuccess
++;
rowSuccess
++;
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
errorCount
++;
errorCount
++;
}
}
}
//
}
}
}
result
.
add
(
"导入项目成功条数"
+
rowSuccess
);
result
.
add
(
"导入项目成功条数"
+
rowSuccess
);
result
.
add
(
"导入项目去重条数"
+
errorCount
);
result
.
add
(
"导入项目去重条数"
+
errorCount
);
...
...
dsk-operate-ui/src/views/project/overview/index.vue
View file @
9c873f37
...
@@ -931,13 +931,15 @@ export default {
...
@@ -931,13 +931,15 @@ export default {
Day
=
datetime
.
getDate
();
Day
=
datetime
.
getDate
();
if
(
this
.
radio4
==
'近三天'
){
if
(
this
.
radio4
==
'近三天'
){
var
newTime
=
datetime
.
getTime
()
-
3
*
24
*
60
*
60
*
1000
;
var
newTime
=
datetime
.
getTime
()
-
3
*
24
*
60
*
60
*
1000
;
this
.
startDate4
=
new
Date
(
newTime
).
getFullYear
()
+
"-"
+
((
new
Date
(
newTime
).
getMonth
()
+
1
)
<
10
?
'0'
+
(
new
Date
(
newTime
).
getMonth
()
+
1
):(
new
Date
(
newTime
).
getMonth
()
+
1
))
+
"-"
+
new
Date
(
newTime
).
getDate
();
let
endDay
=
(
new
Date
(
newTime
).
getDate
()
<
10
?
'0'
:
''
)
+
new
Date
(
newTime
).
getDate
()
this
.
startDate4
=
new
Date
(
newTime
).
getFullYear
()
+
"-"
+
((
new
Date
(
newTime
).
getMonth
()
+
1
)
<
10
?
'0'
+
(
new
Date
(
newTime
).
getMonth
()
+
1
):(
new
Date
(
newTime
).
getMonth
()
+
1
))
+
"-"
+
endDay
;
this
.
endDate4
=
Year
+
"-"
+
(
Month
<
10
?
'0'
+
Month
:
Month
)
+
"-"
+
Day
;
this
.
endDate4
=
Year
+
"-"
+
(
Month
<
10
?
'0'
+
Month
:
Month
)
+
"-"
+
Day
;
this
.
getcountGroupByProvince
()
this
.
getcountGroupByProvince
()
}
}
if
(
this
.
radio4
==
'近七天'
){
if
(
this
.
radio4
==
'近七天'
){
var
newTime
=
datetime
.
getTime
()
-
7
*
24
*
60
*
60
*
1000
;
var
newTime
=
datetime
.
getTime
()
-
7
*
24
*
60
*
60
*
1000
;
this
.
startDate4
=
new
Date
(
newTime
).
getFullYear
()
+
"-"
+
((
new
Date
(
newTime
).
getMonth
()
+
1
)
<
10
?
'0'
+
(
new
Date
(
newTime
).
getMonth
()
+
1
):(
new
Date
(
newTime
).
getMonth
()
+
1
))
+
"-"
+
new
Date
(
newTime
).
getDate
();
let
endDay
=
(
new
Date
(
newTime
).
getDate
()
<
10
?
'0'
:
''
)
+
new
Date
(
newTime
).
getDate
()
this
.
startDate4
=
new
Date
(
newTime
).
getFullYear
()
+
"-"
+
((
new
Date
(
newTime
).
getMonth
()
+
1
)
<
10
?
'0'
+
(
new
Date
(
newTime
).
getMonth
()
+
1
):(
new
Date
(
newTime
).
getMonth
()
+
1
))
+
"-"
+
endDay
;
this
.
endDate4
=
Year
+
"-"
+
(
Month
<
10
?
'0'
+
Month
:
Month
)
+
"-"
+
Day
;
this
.
endDate4
=
Year
+
"-"
+
(
Month
<
10
?
'0'
+
Month
:
Month
)
+
"-"
+
Day
;
this
.
getcountGroupByProvince
()
this
.
getcountGroupByProvince
()
}
}
...
@@ -950,13 +952,15 @@ export default {
...
@@ -950,13 +952,15 @@ export default {
Day
=
datetime
.
getDate
();
Day
=
datetime
.
getDate
();
if
(
this
.
radio5
==
'近三天'
){
if
(
this
.
radio5
==
'近三天'
){
var
newTime
=
datetime
.
getTime
()
-
3
*
24
*
60
*
60
*
1000
;
var
newTime
=
datetime
.
getTime
()
-
3
*
24
*
60
*
60
*
1000
;
this
.
startDate5
=
new
Date
(
newTime
).
getFullYear
()
+
"-"
+
((
new
Date
(
newTime
).
getMonth
()
+
1
)
<
10
?
'0'
+
(
new
Date
(
newTime
).
getMonth
()
+
1
):(
new
Date
(
newTime
).
getMonth
()
+
1
))
+
"-"
+
new
Date
(
newTime
).
getDate
();
let
endDay
=
(
new
Date
(
newTime
).
getDate
()
<
10
?
'0'
:
''
)
+
new
Date
(
newTime
).
getDate
()
this
.
startDate5
=
new
Date
(
newTime
).
getFullYear
()
+
"-"
+
((
new
Date
(
newTime
).
getMonth
()
+
1
)
<
10
?
'0'
+
(
new
Date
(
newTime
).
getMonth
()
+
1
):(
new
Date
(
newTime
).
getMonth
()
+
1
))
+
"-"
+
endDay
;
this
.
endDate5
=
Year
+
"-"
+
(
Month
<
10
?
'0'
+
Month
:
Month
)
+
"-"
+
Day
;
this
.
endDate5
=
Year
+
"-"
+
(
Month
<
10
?
'0'
+
Month
:
Month
)
+
"-"
+
Day
;
this
.
getRangByMoney
()
this
.
getRangByMoney
()
}
}
if
(
this
.
radio5
==
'近七天'
){
if
(
this
.
radio5
==
'近七天'
){
var
newTime
=
datetime
.
getTime
()
-
7
*
24
*
60
*
60
*
1000
;
var
newTime
=
datetime
.
getTime
()
-
7
*
24
*
60
*
60
*
1000
;
this
.
startDate5
=
new
Date
(
newTime
).
getFullYear
()
+
"-"
+
((
new
Date
(
newTime
).
getMonth
()
+
1
)
<
10
?
'0'
+
(
new
Date
(
newTime
).
getMonth
()
+
1
):(
new
Date
(
newTime
).
getMonth
()
+
1
))
+
"-"
+
new
Date
(
newTime
).
getDate
();
let
endDay
=
(
new
Date
(
newTime
).
getDate
()
<
10
?
'0'
:
''
)
+
new
Date
(
newTime
).
getDate
()
this
.
startDate5
=
new
Date
(
newTime
).
getFullYear
()
+
"-"
+
((
new
Date
(
newTime
).
getMonth
()
+
1
)
<
10
?
'0'
+
(
new
Date
(
newTime
).
getMonth
()
+
1
):(
new
Date
(
newTime
).
getMonth
()
+
1
))
+
"-"
+
endDay
;
this
.
endDate5
=
Year
+
"-"
+
(
Month
<
10
?
'0'
+
Month
:
Month
)
+
"-"
+
Day
;
this
.
endDate5
=
Year
+
"-"
+
(
Month
<
10
?
'0'
+
Month
:
Month
)
+
"-"
+
Day
;
this
.
getRangByMoney
()
this
.
getRangByMoney
()
}
}
...
@@ -968,7 +972,6 @@ export default {
...
@@ -968,7 +972,6 @@ export default {
Month
=
datetime
.
getMonth
()
+
1
;
Month
=
datetime
.
getMonth
()
+
1
;
Day
=
datetime
.
getDate
();
Day
=
datetime
.
getDate
();
if
(
this
.
radio6
==
'今日'
){
if
(
this
.
radio6
==
'今日'
){
var
newTime
=
datetime
.
getTime
()
-
3
*
24
*
60
*
60
*
1000
;
this
.
startDate6
=
Year
+
"-"
+
(
Month
<
10
?
'0'
+
Month
:
Month
)
+
"-"
+
Day
;
this
.
startDate6
=
Year
+
"-"
+
(
Month
<
10
?
'0'
+
Month
:
Month
)
+
"-"
+
Day
;
this
.
endDate6
=
Year
+
"-"
+
(
Month
<
10
?
'0'
+
Month
:
Month
)
+
"-"
+
Day
;
this
.
endDate6
=
Year
+
"-"
+
(
Month
<
10
?
'0'
+
Month
:
Month
)
+
"-"
+
Day
;
this
.
recordParams
.
startTime
=
this
.
startDate6
;
this
.
recordParams
.
startTime
=
this
.
startDate6
;
...
@@ -977,7 +980,8 @@ export default {
...
@@ -977,7 +980,8 @@ export default {
}
}
if
(
this
.
radio6
==
'近三天'
){
if
(
this
.
radio6
==
'近三天'
){
var
newTime
=
datetime
.
getTime
()
-
3
*
24
*
60
*
60
*
1000
;
var
newTime
=
datetime
.
getTime
()
-
3
*
24
*
60
*
60
*
1000
;
this
.
startDate6
=
new
Date
(
newTime
).
getFullYear
()
+
"-"
+
((
new
Date
(
newTime
).
getMonth
()
+
1
)
<
10
?
'0'
+
(
new
Date
(
newTime
).
getMonth
()
+
1
):(
new
Date
(
newTime
).
getMonth
()
+
1
))
+
"-"
+
new
Date
(
newTime
).
getDate
();
let
endDay
=
(
new
Date
(
newTime
).
getDate
()
<
10
?
'0'
:
''
)
+
new
Date
(
newTime
).
getDate
()
this
.
startDate6
=
new
Date
(
newTime
).
getFullYear
()
+
"-"
+
((
new
Date
(
newTime
).
getMonth
()
+
1
)
<
10
?
'0'
+
(
new
Date
(
newTime
).
getMonth
()
+
1
):(
new
Date
(
newTime
).
getMonth
()
+
1
))
+
"-"
+
endDay
;
this
.
endDate6
=
Year
+
"-"
+
(
Month
<
10
?
'0'
+
Month
:
Month
)
+
"-"
+
Day
;
this
.
endDate6
=
Year
+
"-"
+
(
Month
<
10
?
'0'
+
Month
:
Month
)
+
"-"
+
Day
;
this
.
recordParams
.
startTime
=
this
.
startDate6
;
this
.
recordParams
.
startTime
=
this
.
startDate6
;
this
.
recordParams
.
endTime
=
this
.
endDate6
;
this
.
recordParams
.
endTime
=
this
.
endDate6
;
...
@@ -985,7 +989,8 @@ export default {
...
@@ -985,7 +989,8 @@ export default {
}
}
if
(
this
.
radio6
==
'近七天'
){
if
(
this
.
radio6
==
'近七天'
){
var
newTime
=
datetime
.
getTime
()
-
7
*
24
*
60
*
60
*
1000
;
var
newTime
=
datetime
.
getTime
()
-
7
*
24
*
60
*
60
*
1000
;
this
.
startDate6
=
new
Date
(
newTime
).
getFullYear
()
+
"-"
+
((
new
Date
(
newTime
).
getMonth
()
+
1
)
<
10
?
'0'
+
(
new
Date
(
newTime
).
getMonth
()
+
1
):(
new
Date
(
newTime
).
getMonth
()
+
1
))
+
"-"
+
new
Date
(
newTime
).
getDate
();
let
endDay
=
(
new
Date
(
newTime
).
getDate
()
<
10
?
'0'
:
''
)
+
new
Date
(
newTime
).
getDate
()
this
.
startDate6
=
new
Date
(
newTime
).
getFullYear
()
+
"-"
+
((
new
Date
(
newTime
).
getMonth
()
+
1
)
<
10
?
'0'
+
(
new
Date
(
newTime
).
getMonth
()
+
1
):(
new
Date
(
newTime
).
getMonth
()
+
1
))
+
"-"
+
endDay
;
this
.
endDate6
=
Year
+
"-"
+
(
Month
<
10
?
'0'
+
Month
:
Month
)
+
"-"
+
Day
;
this
.
endDate6
=
Year
+
"-"
+
(
Month
<
10
?
'0'
+
Month
:
Month
)
+
"-"
+
Day
;
this
.
recordParams
.
startTime
=
this
.
startDate6
;
this
.
recordParams
.
startTime
=
this
.
startDate6
;
this
.
recordParams
.
endTime
=
this
.
endDate6
;
this
.
recordParams
.
endTime
=
this
.
endDate6
;
...
...
dsk-system/src/main/java/com/dsk/system/domain/SysRegion.java
0 → 100644
View file @
9c873f37
package
com
.
dsk
.
system
.
domain
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
lombok.experimental.Accessors
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 行政区编码表(SysRegion)实体类
*
* @author makejava
* @since 2023-06-28 11:23:12
*/
@Data
@NoArgsConstructor
@Accessors
(
chain
=
true
)
@TableName
(
"sys_region"
)
public
class
SysRegion
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
17128129449360485L
;
/**
* 行政区编码(数字型)
*/
private
Integer
id
;
/**
* 行政区名称
*/
private
String
regionName
;
/**
* 行政区名称(最新)
*/
private
String
fullName
;
/**
* 行政区简称
*/
private
String
nameSimple
;
/**
* 行政区编码(字符型)
*/
private
String
regionCode
;
/**
* 行政区等级:1:省级,2:地市,3:区县,4:乡镇,
*/
private
Integer
regionLevel
;
/**
* 父级id
*/
private
Integer
parentId
;
/**
* 行政区类型:0:其他,1:省,2:直辖市,3:特别行政区,4:自治区
*/
private
Integer
regionType
;
/**
* 权重
*/
private
Integer
weight
;
/**
* 备注
*/
private
String
remark
;
/**
* 0:开启,1:准备中,2:关闭
*/
private
Integer
status
;
private
Date
createTime
;
private
Date
updateTime
;
private
Integer
updateId
;
}
dsk-system/src/main/java/com/dsk/system/mapper/SysRegionMapper.java
0 → 100644
View file @
9c873f37
package
com
.
dsk
.
system
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.dsk.system.domain.SysRegion
;
import
org.apache.ibatis.annotations.Mapper
;
/**
* 行政区编码表(SysRegion)表数据库访问层
*
* @author makejava
* @since 2023-06-28 11:23:13
*/
@Mapper
public
interface
SysRegionMapper
extends
BaseMapper
<
SysRegion
>
{
}
dsk-system/src/main/java/com/dsk/system/service/SysRegionService.java
0 → 100644
View file @
9c873f37
package
com
.
dsk
.
system
.
service
;
import
com.dsk.system.domain.SysRegion
;
import
java.util.List
;
/**
* 行政区编码表(SysRegion)表服务接口
*
* @author makejava
* @since 2023-06-28 11:23:12
*/
public
interface
SysRegionService
{
List
<
SysRegion
>
selectByParentId
(
Integer
parentId
);
}
dsk-system/src/main/java/com/dsk/system/service/impl/SysRegionServiceImpl.java
0 → 100644
View file @
9c873f37
package
com
.
dsk
.
system
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.dsk.system.domain.SysRegion
;
import
com.dsk.system.mapper.SysRegionMapper
;
import
com.dsk.system.service.SysRegionService
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* 行政区编码表(SysRegion)表服务实现类
*
* @author makejava
* @since 2023-06-28 11:23:12
*/
@Service
(
"sysRegionService"
)
public
class
SysRegionServiceImpl
implements
SysRegionService
{
@Resource
private
SysRegionMapper
baseMapper
;
private
static
final
Integer
ACQUIESCE_PARENT_ID
=
100000
;
@Override
public
List
<
SysRegion
>
selectByParentId
(
Integer
parentId
)
{
return
baseMapper
.
selectList
(
Wrappers
.<
SysRegion
>
lambdaQuery
()
.
eq
(
SysRegion:
:
getParentId
,
ObjectUtils
.
isEmpty
(
parentId
)
?
ACQUIESCE_PARENT_ID
:
parentId
)
.
orderByAsc
(
SysRegion:
:
getId
));
}
}
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