Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Q
qianhe-ydsj
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
jiangyun
qianhe-ydsj
Commits
010835bf
Commit
010835bf
authored
Jul 31, 2024
by
jiang'yun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改问题
parent
dc05e871
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
309 additions
and
67 deletions
+309
-67
qianhe-admin/src/main/java/com/qianhe/web/controller/system/SysUserController.java
+1
-1
qianhe-ydsj/src/main/java/com/qianhe/controller/SjZdbfFjxbzController.java
+7
-7
qianhe-ydsj/src/main/java/com/qianhe/controller/SjZdbfKhpjbzController.java
+7
-7
qianhe-ydsj/src/main/java/com/qianhe/controller/SjZdbfZsdwfjxcjController.java
+10
-3
qianhe-ydsj/src/main/java/com/qianhe/controller/SjZdbfZsdwkhpjController.java
+138
-27
qianhe-ydsj/src/main/java/com/qianhe/controller/SjZdbfZsdwkhpjfjxController.java
+115
-7
qianhe-ydsj/src/main/java/com/qianhe/controller/SjZdbfZsdwwtcjController.java
+10
-3
qianhe-ydsj/src/main/java/com/qianhe/domain/SjZdbfZsdwkhpj.java
+8
-8
qianhe-ydsj/src/main/java/com/qianhe/domain/SjZdbfZsdwkhpjZb.java
+2
-2
qianhe-ydsj/src/main/java/com/qianhe/service/impl/SjZdbfZsdwkhpjServiceImpl.java
+8
-1
qianhe-ydsj/src/main/resources/mapper/SjZdbfKhpjbzMapper.xml
+2
-0
qianhe-ydsj/src/main/resources/mapper/SjZdbfZsdwkhpjZbMapper.xml
+1
-1
qianhe-ydsj/src/main/resources/static/zsdwfjx.xlsx
+0
-0
qianhe-ydsj/src/main/resources/static/zsdwkhpj.xlsx
+0
-0
No files found.
qianhe-admin/src/main/java/com/qianhe/web/controller/system/SysUserController.java
View file @
010835bf
...
@@ -242,7 +242,7 @@ public class SysUserController extends BaseController
...
@@ -242,7 +242,7 @@ public class SysUserController extends BaseController
/**
/**
* 获取部门树列表
* 获取部门树列表
*/
*/
@PreAuthorize
(
"@ss.hasPermi('system:user:list')"
)
//
@PreAuthorize("@ss.hasPermi('system:user:list')")
@GetMapping
(
"/deptTree"
)
@GetMapping
(
"/deptTree"
)
public
AjaxResult
deptTree
(
SysDept
dept
)
public
AjaxResult
deptTree
(
SysDept
dept
)
{
{
...
...
qianhe-ydsj/src/main/java/com/qianhe/controller/SjZdbfFjxbzController.java
View file @
010835bf
...
@@ -40,7 +40,7 @@ public class SjZdbfFjxbzController extends BaseController
...
@@ -40,7 +40,7 @@ public class SjZdbfFjxbzController extends BaseController
/**
/**
* 查询指导帮扶-否决项标准列表
* 查询指导帮扶-否决项标准列表
*/
*/
@PreAuthorize
(
"@ss.hasPermi('system:sjZdbfFjxbz:list')"
)
//
@PreAuthorize("@ss.hasPermi('system:sjZdbfFjxbz:list')")
@GetMapping
(
"/list"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
SjZdbfFjxbz
sjZdbfFjxbz
)
public
TableDataInfo
list
(
SjZdbfFjxbz
sjZdbfFjxbz
)
{
{
...
@@ -51,7 +51,7 @@ public class SjZdbfFjxbzController extends BaseController
...
@@ -51,7 +51,7 @@ public class SjZdbfFjxbzController extends BaseController
/**
/**
* 查询指导帮扶-否决项标准列表
* 查询指导帮扶-否决项标准列表
*/
*/
@PreAuthorize
(
"@ss.hasPermi('system:sjZdbfFjxbz:cxlist')"
)
//
@PreAuthorize("@ss.hasPermi('system:sjZdbfFjxbz:cxlist')")
@GetMapping
(
"/cxlist"
)
@GetMapping
(
"/cxlist"
)
public
TableDataInfo
cxlist
(
SjZdbfFjxbz
sjZdbfFjxbz
)
public
TableDataInfo
cxlist
(
SjZdbfFjxbz
sjZdbfFjxbz
)
{
{
...
@@ -63,7 +63,7 @@ public class SjZdbfFjxbzController extends BaseController
...
@@ -63,7 +63,7 @@ public class SjZdbfFjxbzController extends BaseController
/**
/**
* 导出指导帮扶-否决项标准列表
* 导出指导帮扶-否决项标准列表
*/
*/
@PreAuthorize
(
"@ss.hasPermi('system:sjZdbfFjxbz:export')"
)
//
@PreAuthorize("@ss.hasPermi('system:sjZdbfFjxbz:export')")
@Log
(
title
=
"指导帮扶-否决项标准"
,
businessType
=
BusinessType
.
EXPORT
)
@Log
(
title
=
"指导帮扶-否决项标准"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/export"
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
SjZdbfFjxbz
sjZdbfFjxbz
)
public
void
export
(
HttpServletResponse
response
,
SjZdbfFjxbz
sjZdbfFjxbz
)
...
@@ -76,7 +76,7 @@ public class SjZdbfFjxbzController extends BaseController
...
@@ -76,7 +76,7 @@ public class SjZdbfFjxbzController extends BaseController
/**
/**
* 获取指导帮扶-否决项标准详细信息
* 获取指导帮扶-否决项标准详细信息
*/
*/
@PreAuthorize
(
"@ss.hasPermi('system:sjZdbfFjxbz:query')"
)
//
@PreAuthorize("@ss.hasPermi('system:sjZdbfFjxbz:query')")
@GetMapping
(
value
=
"/{id}"
)
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
{
...
@@ -86,7 +86,7 @@ public class SjZdbfFjxbzController extends BaseController
...
@@ -86,7 +86,7 @@ public class SjZdbfFjxbzController extends BaseController
/**
/**
* 新增指导帮扶-否决项标准
* 新增指导帮扶-否决项标准
*/
*/
@PreAuthorize
(
"@ss.hasPermi('system:sjZdbfFjxbz:add')"
)
//
@PreAuthorize("@ss.hasPermi('system:sjZdbfFjxbz:add')")
@Log
(
title
=
"指导帮扶-否决项标准"
,
businessType
=
BusinessType
.
INSERT
)
@Log
(
title
=
"指导帮扶-否决项标准"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
@PostMapping
public
AjaxResult
add
(
@RequestBody
SjZdbfFjxbz
sjZdbfFjxbz
)
public
AjaxResult
add
(
@RequestBody
SjZdbfFjxbz
sjZdbfFjxbz
)
...
@@ -97,7 +97,7 @@ public class SjZdbfFjxbzController extends BaseController
...
@@ -97,7 +97,7 @@ public class SjZdbfFjxbzController extends BaseController
/**
/**
* 修改指导帮扶-否决项标准
* 修改指导帮扶-否决项标准
*/
*/
@PreAuthorize
(
"@ss.hasPermi('system:sjZdbfFjxbz:edit')"
)
//
@PreAuthorize("@ss.hasPermi('system:sjZdbfFjxbz:edit')")
@Log
(
title
=
"指导帮扶-否决项标准"
,
businessType
=
BusinessType
.
UPDATE
)
@Log
(
title
=
"指导帮扶-否决项标准"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
@PutMapping
public
AjaxResult
edit
(
@RequestBody
SjZdbfFjxbz
sjZdbfFjxbz
)
public
AjaxResult
edit
(
@RequestBody
SjZdbfFjxbz
sjZdbfFjxbz
)
...
@@ -108,7 +108,7 @@ public class SjZdbfFjxbzController extends BaseController
...
@@ -108,7 +108,7 @@ public class SjZdbfFjxbzController extends BaseController
/**
/**
* 删除指导帮扶-否决项标准
* 删除指导帮扶-否决项标准
*/
*/
@PreAuthorize
(
"@ss.hasPermi('system:sjZdbfFjxbz:remove')"
)
//
@PreAuthorize("@ss.hasPermi('system:sjZdbfFjxbz:remove')")
@Log
(
title
=
"指导帮扶-否决项标准"
,
businessType
=
BusinessType
.
DELETE
)
@Log
(
title
=
"指导帮扶-否决项标准"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{ids}"
)
@DeleteMapping
(
"/{ids}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
ids
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
ids
)
...
...
qianhe-ydsj/src/main/java/com/qianhe/controller/SjZdbfKhpjbzController.java
View file @
010835bf
...
@@ -40,7 +40,7 @@ public class SjZdbfKhpjbzController extends BaseController
...
@@ -40,7 +40,7 @@ public class SjZdbfKhpjbzController extends BaseController
/**
/**
* 查询指导帮扶-考核评价标准列表
* 查询指导帮扶-考核评价标准列表
*/
*/
@PreAuthorize
(
"@ss.hasPermi('system:sjZdbfKhpjbz:list')"
)
//
@PreAuthorize("@ss.hasPermi('system:sjZdbfKhpjbz:list')")
@GetMapping
(
"/list"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
SjZdbfKhpjbz
sjZdbfKhpjbz
)
public
TableDataInfo
list
(
SjZdbfKhpjbz
sjZdbfKhpjbz
)
{
{
...
@@ -53,7 +53,7 @@ public class SjZdbfKhpjbzController extends BaseController
...
@@ -53,7 +53,7 @@ public class SjZdbfKhpjbzController extends BaseController
/**
/**
* 查询指导帮扶-考核评价标准列表
* 查询指导帮扶-考核评价标准列表
*/
*/
@PreAuthorize
(
"@ss.hasPermi('system:sjZdbfKhpjbz:cxlist')"
)
//
@PreAuthorize("@ss.hasPermi('system:sjZdbfKhpjbz:cxlist')")
@GetMapping
(
"/cxlist"
)
@GetMapping
(
"/cxlist"
)
public
TableDataInfo
cxlist
(
SjZdbfKhpjbz
sjZdbfKhpjbz
)
public
TableDataInfo
cxlist
(
SjZdbfKhpjbz
sjZdbfKhpjbz
)
{
{
...
@@ -65,7 +65,7 @@ public class SjZdbfKhpjbzController extends BaseController
...
@@ -65,7 +65,7 @@ public class SjZdbfKhpjbzController extends BaseController
/**
/**
* 导出指导帮扶-考核评价标准列表
* 导出指导帮扶-考核评价标准列表
*/
*/
@PreAuthorize
(
"@ss.hasPermi('system:sjZdbfKhpjbz:export')"
)
//
@PreAuthorize("@ss.hasPermi('system:sjZdbfKhpjbz:export')")
@Log
(
title
=
"指导帮扶-考核评价标准"
,
businessType
=
BusinessType
.
EXPORT
)
@Log
(
title
=
"指导帮扶-考核评价标准"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/export"
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
SjZdbfKhpjbz
sjZdbfKhpjbz
)
public
void
export
(
HttpServletResponse
response
,
SjZdbfKhpjbz
sjZdbfKhpjbz
)
...
@@ -78,7 +78,7 @@ public class SjZdbfKhpjbzController extends BaseController
...
@@ -78,7 +78,7 @@ public class SjZdbfKhpjbzController extends BaseController
/**
/**
* 获取指导帮扶-考核评价标准详细信息
* 获取指导帮扶-考核评价标准详细信息
*/
*/
@PreAuthorize
(
"@ss.hasPermi('system:sjZdbfKhpjbz:query')"
)
//
@PreAuthorize("@ss.hasPermi('system:sjZdbfKhpjbz:query')")
@GetMapping
(
value
=
"/{id}"
)
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
{
...
@@ -88,7 +88,7 @@ public class SjZdbfKhpjbzController extends BaseController
...
@@ -88,7 +88,7 @@ public class SjZdbfKhpjbzController extends BaseController
/**
/**
* 新增指导帮扶-考核评价标准
* 新增指导帮扶-考核评价标准
*/
*/
@PreAuthorize
(
"@ss.hasPermi('system:sjZdbfKhpjbz:add')"
)
//
@PreAuthorize("@ss.hasPermi('system:sjZdbfKhpjbz:add')")
@Log
(
title
=
"指导帮扶-考核评价标准"
,
businessType
=
BusinessType
.
INSERT
)
@Log
(
title
=
"指导帮扶-考核评价标准"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
@PostMapping
public
AjaxResult
add
(
@RequestBody
SjZdbfKhpjbz
sjZdbfKhpjbz
)
public
AjaxResult
add
(
@RequestBody
SjZdbfKhpjbz
sjZdbfKhpjbz
)
...
@@ -99,7 +99,7 @@ public class SjZdbfKhpjbzController extends BaseController
...
@@ -99,7 +99,7 @@ public class SjZdbfKhpjbzController extends BaseController
/**
/**
* 修改指导帮扶-考核评价标准
* 修改指导帮扶-考核评价标准
*/
*/
@PreAuthorize
(
"@ss.hasPermi('system:sjZdbfKhpjbz:edit')"
)
//
@PreAuthorize("@ss.hasPermi('system:sjZdbfKhpjbz:edit')")
@Log
(
title
=
"指导帮扶-考核评价标准"
,
businessType
=
BusinessType
.
UPDATE
)
@Log
(
title
=
"指导帮扶-考核评价标准"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
@PutMapping
public
AjaxResult
edit
(
@RequestBody
SjZdbfKhpjbz
sjZdbfKhpjbz
)
public
AjaxResult
edit
(
@RequestBody
SjZdbfKhpjbz
sjZdbfKhpjbz
)
...
@@ -110,7 +110,7 @@ public class SjZdbfKhpjbzController extends BaseController
...
@@ -110,7 +110,7 @@ public class SjZdbfKhpjbzController extends BaseController
/**
/**
* 删除指导帮扶-考核评价标准
* 删除指导帮扶-考核评价标准
*/
*/
@PreAuthorize
(
"@ss.hasPermi('system:sjZdbfKhpjbz:remove')"
)
//
@PreAuthorize("@ss.hasPermi('system:sjZdbfKhpjbz:remove')")
@Log
(
title
=
"指导帮扶-考核评价标准"
,
businessType
=
BusinessType
.
DELETE
)
@Log
(
title
=
"指导帮扶-考核评价标准"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{ids}"
)
@DeleteMapping
(
"/{ids}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
ids
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
ids
)
...
...
qianhe-ydsj/src/main/java/com/qianhe/controller/SjZdbfZsdwfjxcjController.java
View file @
010835bf
...
@@ -5,11 +5,13 @@ import java.io.InputStream;
...
@@ -5,11 +5,13 @@ import java.io.InputStream;
import
java.io.OutputStream
;
import
java.io.OutputStream
;
import
java.net.URLEncoder
;
import
java.net.URLEncoder
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
com.qianhe.common.core.domain.entity.SysDept
;
import
com.qianhe.common.core.domain.entity.SysDept
;
import
com.qianhe.common.exception.BusinessException
;
import
com.qianhe.common.exception.BusinessException
;
import
com.qianhe.common.utils.DateUtils
;
import
com.qianhe.common.utils.StringUtils
;
import
com.qianhe.common.utils.StringUtils
;
import
com.qianhe.domain.SjZdbfFjxbzCb
;
import
com.qianhe.domain.SjZdbfFjxbzCb
;
import
com.qianhe.domain.SjZdbfKhpjbzCb
;
import
com.qianhe.domain.SjZdbfKhpjbzCb
;
...
@@ -120,7 +122,7 @@ public class SjZdbfZsdwfjxcjController extends BaseController
...
@@ -120,7 +122,7 @@ public class SjZdbfZsdwfjxcjController extends BaseController
/**
/**
* 获取指导帮扶-直属单位否决项采集详细信息
* 获取指导帮扶-直属单位否决项采集详细信息
*/
*/
@PreAuthorize
(
"@ss.hasPermi('system:sjZdbfZsdwfjxcj:query')"
)
//
@PreAuthorize("@ss.hasPermi('system:sjZdbfZsdwfjxcj:query')")
@GetMapping
(
value
=
"/{id}"
)
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
{
...
@@ -161,7 +163,7 @@ public class SjZdbfZsdwfjxcjController extends BaseController
...
@@ -161,7 +163,7 @@ public class SjZdbfZsdwfjxcjController extends BaseController
}
}
@PreAuthorize
(
"@ss.hasPermi('system:sjZdbfZsdwfjxcj:importData')"
)
@PostMapping
(
"/importData"
)
@PostMapping
(
"/importData"
)
public
AjaxResult
importData
(
MultipartFile
file
,
boolean
updateSupport
)
throws
Exception
{
public
AjaxResult
importData
(
MultipartFile
file
,
boolean
updateSupport
)
throws
Exception
{
...
@@ -190,7 +192,12 @@ public class SjZdbfZsdwfjxcjController extends BaseController
...
@@ -190,7 +192,12 @@ public class SjZdbfZsdwfjxcjController extends BaseController
if
(
StringUtils
.
isEmpty
(
rq
)){
if
(
StringUtils
.
isEmpty
(
rq
)){
return
AjaxResult
.
error
(
"导入失败,第"
+(
i
+
1
)+
"行日期不能为空"
);
return
AjaxResult
.
error
(
"导入失败,第"
+(
i
+
1
)+
"行日期不能为空"
);
}
}
zsdwwtcj
.
setRq
(
rq
);
Date
date
=
DateUtils
.
parseDate
(
rq
);
if
(
date
==
null
){
return
AjaxResult
.
error
(
"导入失败,第"
+(
i
+
1
)+
"行日期格式错误"
);
}
zsdwwtcj
.
setRq
(
DateUtils
.
parseDateToStr
(
"yyyy-MM"
,
date
));
//单位
//单位
String
dw
=
new
DataFormatter
().
formatCellValue
(
row
.
getCell
(
2
))
;
String
dw
=
new
DataFormatter
().
formatCellValue
(
row
.
getCell
(
2
))
;
if
(
StringUtils
.
isEmpty
(
dw
)){
if
(
StringUtils
.
isEmpty
(
dw
)){
...
...
qianhe-ydsj/src/main/java/com/qianhe/controller/SjZdbfZsdwkhpjController.java
View file @
010835bf
package
com
.
qianhe
.
controller
;
package
com
.
qianhe
.
controller
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.io.OutputStream
;
import
java.net.URLEncoder
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
...
@@ -24,10 +27,12 @@ import com.qianhe.service.ISjZdbfFjxbzService;
...
@@ -24,10 +27,12 @@ import com.qianhe.service.ISjZdbfFjxbzService;
import
com.qianhe.service.ISjZdbfZsdwkhpjZbService
;
import
com.qianhe.service.ISjZdbfZsdwkhpjZbService
;
import
com.qianhe.service.ISjZdbfZsdwkhpjfjxService
;
import
com.qianhe.service.ISjZdbfZsdwkhpjfjxService
;
import
com.qianhe.system.mapper.SysDeptMapper
;
import
com.qianhe.system.mapper.SysDeptMapper
;
import
org.apache.poi.ss.usermodel.DataFormatter
;
import
org.apache.poi.ss.usermodel.*
;
import
org.apache.poi.ss.util.CellRangeAddress
;
import
org.apache.poi.xssf.usermodel.XSSFRow
;
import
org.apache.poi.xssf.usermodel.XSSFRow
;
import
org.apache.poi.xssf.usermodel.XSSFSheet
;
import
org.apache.poi.xssf.usermodel.XSSFSheet
;
import
org.apache.poi.xssf.usermodel.XSSFWorkbook
;
import
org.apache.poi.xssf.usermodel.XSSFWorkbook
;
import
org.springframework.http.MediaType
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
@@ -93,17 +98,25 @@ public class SjZdbfZsdwkhpjController extends BaseController
...
@@ -93,17 +98,25 @@ public class SjZdbfZsdwkhpjController extends BaseController
* 查询考核评价
* 查询考核评价
* @return
* @return
*/
*/
@PreAuthorize
(
"@ss.hasPermi('system:sjZdbfZsdwkhpj:listAll')"
)
@GetMapping
(
"/listAll"
)
@GetMapping
(
"/listAll"
)
public
Map
<
String
,
Object
>
listAll
(
SjZdbfZsdwkhpj
sjZdbfZsdwkhpj
)
public
Map
<
String
,
Object
>
listAll
(
SjZdbfZsdwkhpj
sjZdbfZsdwkhpj
)
{
{
PageDomain
pageDomain
=
TableSupport
.
buildPageRequest
();
//
PageDomain pageDomain = TableSupport.buildPageRequest();
Integer
pageNum
=
pageDomain
.
getPageNum
();
//
Integer pageNum = pageDomain.getPageNum();
Integer
pageSize
=
pageDomain
.
getPageSize
();
//
Integer pageSize = pageDomain.getPageSize();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Long
deptId
=
sjZdbfZsdwkhpj
.
getDeptId
();
Long
deptId
=
sjZdbfZsdwkhpj
.
getDeptId
();
String
nd
=
sjZdbfZsdwkhpj
.
getNd
();
String
nd
=
sjZdbfZsdwkhpj
.
getNd
();
SysDept
dept
=
sysDeptMapper
.
selectDeptById
(
deptId
);
SysDept
dept
=
sysDeptMapper
.
selectDeptById
(
deptId
);
String
deptLx
=
dept
.
getDeptLx
();
String
deptLx
=
dept
.
getDeptLx
();
if
(
StringUtils
.
isEmpty
(
deptLx
)){
map
.
put
(
"code"
,
5
);
map
.
put
(
"msg"
,
"该单位未维护单位类型"
);
map
.
put
(
"khpjData"
,
new
ArrayList
<>());
map
.
put
(
"fjxData"
,
new
ArrayList
<>());
return
map
;
}
String
zqfw
=
sjZdbfZsdwkhpj
.
getZqfw
();
String
zqfw
=
sjZdbfZsdwkhpj
.
getZqfw
();
String
startRq
=
null
;
String
startRq
=
null
;
String
endRq
=
null
;
String
endRq
=
null
;
...
@@ -166,6 +179,7 @@ public class SjZdbfZsdwkhpjController extends BaseController
...
@@ -166,6 +179,7 @@ public class SjZdbfZsdwkhpjController extends BaseController
zsdwkhpj
.
setJb
(
"直属单位"
);
zsdwkhpj
.
setJb
(
"直属单位"
);
zsdwkhpj
.
setZbId
(
sjZdbfZsdwkhpjZbnew
.
getId
());
zsdwkhpj
.
setZbId
(
sjZdbfZsdwkhpjZbnew
.
getId
());
zsdwkhpj
.
setYl1
(
i
+
1L
);
zsdwkhpj
.
setYl1
(
i
+
1L
);
zsdwkhpj
.
setKhfz
(
"-0"
);
//计算问题
//计算问题
List
<
String
>
collect
=
sjZdbfZsdwwtcjs
.
stream
().
filter
(
item
->
item
.
getPjbzid
().
equals
(
zsdwkhpj
.
getPjbzid
()))
List
<
String
>
collect
=
sjZdbfZsdwwtcjs
.
stream
().
filter
(
item
->
item
.
getPjbzid
().
equals
(
zsdwkhpj
.
getPjbzid
()))
.
map
(
SjZdbfZsdwwtcj:
:
getWtmc
).
collect
(
Collectors
.
toList
());
.
map
(
SjZdbfZsdwwtcj:
:
getWtmc
).
collect
(
Collectors
.
toList
());
...
@@ -222,41 +236,138 @@ public class SjZdbfZsdwkhpjController extends BaseController
...
@@ -222,41 +236,138 @@ public class SjZdbfZsdwkhpjController extends BaseController
sjZdbfZsdwkhpjfjx
.
setDeptId
(
deptId
);
sjZdbfZsdwkhpjfjx
.
setDeptId
(
deptId
);
sjZdbfZsdwkhpjfjx
.
setZqfw
(
sjZdbfZsdwkhpj
.
getZqfw
());
sjZdbfZsdwkhpjfjx
.
setZqfw
(
sjZdbfZsdwkhpj
.
getZqfw
());
List
<
SjZdbfZsdwkhpjfjx
>
resjZdbfZsdwkhpjfjxList
=
sjZdbfZsdwkhpjfjxService
.
selectSjZdbfZsdwkhpjfjxList
(
sjZdbfZsdwkhpjfjx
);
List
<
SjZdbfZsdwkhpjfjx
>
resjZdbfZsdwkhpjfjxList
=
sjZdbfZsdwkhpjfjxService
.
selectSjZdbfZsdwkhpjfjxList
(
sjZdbfZsdwkhpjfjx
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
TableDataInfo
rspDatakhpj
=
new
TableDataInfo
();
rspDatakhpj
.
setCode
(
HttpStatus
.
SUCCESS
);
map
.
put
(
"code"
,
HttpStatus
.
SUCCESS
);
rspDatakhpj
.
setMsg
(
"查询成功"
);
map
.
put
(
"msg"
,
"查询成功"
);
rspDatakhpj
.
setRows
(
resjZdbfZsdwkhpjs
.
stream
().
skip
((
pageNum
-
1
)*
pageSize
).
limit
(
pageSize
).
map
.
put
(
"khpjData"
,
resjZdbfZsdwkhpjs
);
collect
(
Collectors
.
toList
()));
map
.
put
(
"fjxData"
,
resjZdbfZsdwkhpjfjxList
);
rspDatakhpj
.
setTotal
(
resjZdbfZsdwkhpjs
.
size
());
return
map
;
map
.
put
(
"khpjData"
,
rspDatakhpj
);
TableDataInfo
rspDatafjx
=
new
TableDataInfo
();
rspDatafjx
.
setCode
(
HttpStatus
.
SUCCESS
);
rspDatafjx
.
setMsg
(
"查询成功"
);
rspDatafjx
.
setRows
(
resjZdbfZsdwkhpjfjxList
.
stream
().
skip
((
pageNum
-
1
)*
pageSize
).
limit
(
pageSize
).
collect
(
Collectors
.
toList
()));
rspDatafjx
.
setTotal
(
resjZdbfZsdwkhpjfjxList
.
size
());
map
.
put
(
"fjxData"
,
rspDatafjx
);
return
map
;
}
}
/**
/**
* 导出指导帮扶-直属单位考核评价列表
* 导出指导帮扶-直属单位考核评价列表
*/
*/
//
@PreAuthorize("@ss.hasPermi('system:sjZdbfZsdwkhpj:export')")
@PreAuthorize
(
"@ss.hasPermi('system:sjZdbfZsdwkhpj:export')"
)
@Log
(
title
=
"指导帮扶-直属单位考核评价"
,
businessType
=
BusinessType
.
EXPORT
)
@Log
(
title
=
"指导帮扶-直属单位考核评价"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/export"
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
SjZdbfZsdwkhpj
sjZdbfZsdwkhpj
)
public
void
export
(
HttpServletResponse
response
,
SjZdbfZsdwkhpj
sjZdbfZsdwkhpj
)
{
{
List
<
SjZdbfZsdwkhpj
>
list
=
sjZdbfZsdwkhpjService
.
selectSjZdbfZsdwkhpjList
(
sjZdbfZsdwkhpj
);
List
<
SjZdbfZsdwkhpj
>
list
=
sjZdbfZsdwkhpjService
.
selectSjZdbfZsdwkhpjList
(
sjZdbfZsdwkhpj
);
ExcelUtil
<
SjZdbfZsdwkhpj
>
util
=
new
ExcelUtil
<
SjZdbfZsdwkhpj
>(
SjZdbfZsdwkhpj
.
class
);
Workbook
exl
=
null
;
util
.
exportExcel
(
response
,
list
,
"指导帮扶-直属单位考核评价数据"
);
OutputStream
out
=
null
;
InputStream
in
=
null
;
try
{
in
=
this
.
getClass
().
getResourceAsStream
(
"/static/zsdwkhpj.xlsx"
);
exl
=
WorkbookFactory
.
create
(
in
);
out
=
response
.
getOutputStream
();
response
.
reset
();
String
filename
=
URLEncoder
.
encode
(
"考核评价.xlsx"
,
"UTF-8"
);
response
.
setCharacterEncoding
(
"UTF-8"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename="
+
filename
);
response
.
setContentType
(
MediaType
.
APPLICATION_OCTET_STREAM_VALUE
);
Sheet
sheet
=
exl
.
getSheet
(
"Sheet1"
);
// sheet.getRow(0).getCell(0).setCellValue(sjZdbfZsdwkhpj.getNd()+"年"+sjZdbfZsdwkhpj.getZqfw()+sjZdbfZsdwkhpj.getDeptName());
CellStyle
cellStyle
=
exl
.
createCellStyle
();
cellStyle
.
setWrapText
(
true
);
cellStyle
.
setAlignment
(
HorizontalAlignment
.
LEFT
);
cellStyle
.
setVerticalAlignment
(
VerticalAlignment
.
CENTER
);
cellStyle
.
setBorderBottom
(
BorderStyle
.
THIN
);
cellStyle
.
setBottomBorderColor
(
IndexedColors
.
BLACK
.
getIndex
());
cellStyle
.
setBorderLeft
(
BorderStyle
.
THIN
);
cellStyle
.
setLeftBorderColor
(
IndexedColors
.
BLACK
.
getIndex
());
cellStyle
.
setBorderRight
(
BorderStyle
.
THIN
);
cellStyle
.
setRightBorderColor
(
IndexedColors
.
BLACK
.
getIndex
());
cellStyle
.
setBorderTop
(
BorderStyle
.
THIN
);
cellStyle
.
setTopBorderColor
(
IndexedColors
.
BLACK
.
getIndex
());
String
deptName
=
""
;
int
lastRow
=
sheet
.
getLastRowNum
()+
1
;
for
(
SjZdbfZsdwkhpj
zsdwkhpj:
list
){
deptName
=
zsdwkhpj
.
getDeptName
();;
Row
row
=
sheet
.
createRow
(
lastRow
);
row
.
setHeightInPoints
(
18
);
int
m
=
0
;
Cell
cell
=
row
.
createCell
(
m
++);
cell
.
setCellStyle
(
cellStyle
);
cell
.
setCellValue
(
zsdwkhpj
.
getKhnr
());
cell
=
row
.
createCell
(
m
++);
cell
.
setCellStyle
(
cellStyle
);
cell
.
setCellValue
(
zsdwkhpj
.
getKhxd
());
cell
=
row
.
createCell
(
m
++);
cell
.
setCellStyle
(
cellStyle
);
cell
.
setCellValue
(
zsdwkhpj
.
getPjbzmc
());
cell
=
row
.
createCell
(
m
++);
cell
.
setCellStyle
(
cellStyle
);
cell
.
setCellValue
(
zsdwkhpj
.
getSj
());
cell
=
row
.
createCell
(
m
++);
cell
.
setCellStyle
(
cellStyle
);
cell
.
setCellValue
(
zsdwkhpj
.
getWtms
());
cell
=
row
.
createCell
(
m
++);
cell
.
setCellStyle
(
cellStyle
);
cell
.
setCellValue
(
zsdwkhpj
.
getKhfz
());
cell
=
row
.
createCell
(
m
++);
cell
.
setCellStyle
(
cellStyle
);
cell
.
setCellValue
(
zsdwkhpj
.
getId
());
cell
=
row
.
createCell
(
m
++);
cell
.
setCellStyle
(
cellStyle
);
cell
.
setCellValue
(
zsdwkhpj
.
getZbId
());
lastRow
++;
}
//合并行
mergeCellsByColumn
(
sheet
,
0
);
mergeCellsByColumn
(
sheet
,
1
);
sheet
.
getRow
(
0
).
getCell
(
0
).
setCellValue
(
sjZdbfZsdwkhpj
.
getNd
()+
sjZdbfZsdwkhpj
.
getZqfw
()+
deptName
+
"考核评价"
);
exl
.
write
(
out
);
exl
.
close
();
}
catch
(
Exception
e
){
e
.
getMessage
();
throw
new
BusinessException
(
"导出Excel失败,请联系网站管理员!"
);
}
finally
{
if
(
exl
!=
null
)
{
try
{
exl
.
close
();
}
catch
(
IOException
e1
)
{
e1
.
printStackTrace
();
}
}
if
(
out
!=
null
)
{
try
{
out
.
close
();
}
catch
(
IOException
e1
)
{
e1
.
printStackTrace
();
}
}
}
}
}
// 根据某一列的值是否相同,对其他列的单元格进行合并
private
static
void
mergeCellsByColumn
(
Sheet
sheet
,
int
columnIndex
)
{
Map
<
String
,
Integer
>
groups
=
new
HashMap
<>();
// 遍历该列,记录相同值的行索引
int
start
=
1
;
int
end
=
1
;
String
old
=
""
;
for
(
int
i
=
1
;
i
<=
sheet
.
getLastRowNum
();
i
++)
{
Row
row
=
sheet
.
getRow
(
i
);
Cell
cell
=
row
.
getCell
(
columnIndex
);
String
cellValue
=
cell
.
getStringCellValue
();
if
(!
groups
.
containsKey
(
cellValue
))
{
if
(
groups
.
get
(
old
)!=
null
){
start
=
groups
.
get
(
old
);
}
old
=
cellValue
;
groups
.
put
(
cellValue
,
i
);
//合并行
mergeCellsInRange
(
sheet
,
columnIndex
,
start
,
end
);
start
=
i
;
end
=
i
;
}
else
{
end
++;
if
(
i
==
sheet
.
getLastRowNum
()){
mergeCellsInRange
(
sheet
,
columnIndex
,
start
,
end
);
}
}
}
}
// 合并指定范围内的单元格
private
static
void
mergeCellsInRange
(
Sheet
sheet
,
int
columnIndex
,
int
startIndex
,
int
endIndex
)
{
if
(
startIndex
!=
endIndex
){
sheet
.
addMergedRegion
(
new
CellRangeAddress
(
startIndex
,
endIndex
,
columnIndex
,
columnIndex
));
}
}
/**
/**
* 获取指导帮扶-直属单位考核评价详细信息
* 获取指导帮扶-直属单位考核评价详细信息
*/
*/
@PreAuthorize
(
"@ss.hasPermi('system:sjZdbfZsdwkhpj:query')"
)
//
@PreAuthorize("@ss.hasPermi('system:sjZdbfZsdwkhpj:query')")
@GetMapping
(
value
=
"/{id}"
)
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
{
...
@@ -299,7 +410,7 @@ public class SjZdbfZsdwkhpjController extends BaseController
...
@@ -299,7 +410,7 @@ public class SjZdbfZsdwkhpjController extends BaseController
/**
/**
* 修改指导帮扶-直属单位考核评价
* 修改指导帮扶-直属单位考核评价
*/
*/
// @PreAuthorize("@ss.hasPermi('system:sjZdbfZsdwkhpj:
edit')")
@PreAuthorize
(
"@ss.hasPermi('system:sjZdbfZsdwkhpj:pl
edit')"
)
@Log
(
title
=
"指导帮扶-直属单位考核评价"
,
businessType
=
BusinessType
.
UPDATE
)
@Log
(
title
=
"指导帮扶-直属单位考核评价"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
(
"/pledit"
)
@PutMapping
(
"/pledit"
)
public
AjaxResult
pledit
(
@RequestBody
List
<
SjZdbfZsdwkhpj
>
list
)
public
AjaxResult
pledit
(
@RequestBody
List
<
SjZdbfZsdwkhpj
>
list
)
...
@@ -308,7 +419,7 @@ public class SjZdbfZsdwkhpjController extends BaseController
...
@@ -308,7 +419,7 @@ public class SjZdbfZsdwkhpjController extends BaseController
}
}
@PreAuthorize
(
"@ss.hasPermi('system:sjZdbfZsdwkhpj:importData')"
)
@PostMapping
(
"/importData"
)
@PostMapping
(
"/importData"
)
public
AjaxResult
importData
(
MultipartFile
file
,
boolean
updateSupport
)
throws
Exception
{
public
AjaxResult
importData
(
MultipartFile
file
,
boolean
updateSupport
)
throws
Exception
{
...
...
qianhe-ydsj/src/main/java/com/qianhe/controller/SjZdbfZsdwkhpjfjxController.java
View file @
010835bf
package
com
.
qianhe
.
controller
;
package
com
.
qianhe
.
controller
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.io.OutputStream
;
import
java.net.URLEncoder
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
com.qianhe.common.exception.BusinessException
;
import
com.qianhe.common.exception.BusinessException
;
import
com.qianhe.common.utils.StringUtils
;
import
com.qianhe.common.utils.StringUtils
;
import
com.qianhe.domain.SjZdbfZsdwkhpj
;
import
com.qianhe.domain.SjZdbfZsdwkhpj
;
import
org.apache.poi.ss.usermodel.DataFormatter
;
import
org.apache.poi.ss.usermodel.*
;
import
org.apache.poi.ss.util.CellRangeAddress
;
import
org.apache.poi.xssf.usermodel.XSSFRow
;
import
org.apache.poi.xssf.usermodel.XSSFRow
;
import
org.apache.poi.xssf.usermodel.XSSFSheet
;
import
org.apache.poi.xssf.usermodel.XSSFSheet
;
import
org.apache.poi.xssf.usermodel.XSSFWorkbook
;
import
org.apache.poi.xssf.usermodel.XSSFWorkbook
;
import
org.springframework.http.MediaType
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
@@ -60,20 +67,121 @@ public class SjZdbfZsdwkhpjfjxController extends BaseController
...
@@ -60,20 +67,121 @@ public class SjZdbfZsdwkhpjfjxController extends BaseController
/**
/**
* 导出指导帮扶-直属单位考核评价否决项列表
* 导出指导帮扶-直属单位考核评价否决项列表
*/
*/
//
@PreAuthorize("@ss.hasPermi('system:sjZdbfZsdwkhpjfjx:export')")
@PreAuthorize
(
"@ss.hasPermi('system:sjZdbfZsdwkhpjfjx:export')"
)
@Log
(
title
=
"指导帮扶-直属单位考核评价否决项"
,
businessType
=
BusinessType
.
EXPORT
)
@Log
(
title
=
"指导帮扶-直属单位考核评价否决项"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/export"
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
SjZdbfZsdwkhpjfjx
sjZdbfZsdwkhpjfjx
)
public
void
export
(
HttpServletResponse
response
,
SjZdbfZsdwkhpjfjx
sjZdbfZsdwkhpjfjx
)
{
{
List
<
SjZdbfZsdwkhpjfjx
>
list
=
sjZdbfZsdwkhpjfjxService
.
selectSjZdbfZsdwkhpjfjxList
(
sjZdbfZsdwkhpjfjx
);
List
<
SjZdbfZsdwkhpjfjx
>
list
=
sjZdbfZsdwkhpjfjxService
.
selectSjZdbfZsdwkhpjfjxList
(
sjZdbfZsdwkhpjfjx
);
ExcelUtil
<
SjZdbfZsdwkhpjfjx
>
util
=
new
ExcelUtil
<
SjZdbfZsdwkhpjfjx
>(
SjZdbfZsdwkhpjfjx
.
class
);
Workbook
exl
=
null
;
util
.
exportExcel
(
response
,
list
,
"指导帮扶-直属单位考核评价否决项数据"
);
OutputStream
out
=
null
;
InputStream
in
=
null
;
try
{
in
=
this
.
getClass
().
getResourceAsStream
(
"/static/zsdwfjx.xlsx"
);
exl
=
WorkbookFactory
.
create
(
in
);
out
=
response
.
getOutputStream
();
response
.
reset
();
String
filename
=
URLEncoder
.
encode
(
"否决项.xlsx"
,
"UTF-8"
);
response
.
setCharacterEncoding
(
"UTF-8"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename="
+
filename
);
response
.
setContentType
(
MediaType
.
APPLICATION_OCTET_STREAM_VALUE
);
Sheet
sheet
=
exl
.
getSheet
(
"Sheet1"
);
// sheet.getRow(0).getCell(0).setCellValue(sjZdbfZsdwkhpj.getNd()+"年"+sjZdbfZsdwkhpj.getZqfw()+sjZdbfZsdwkhpj.getDeptName());
CellStyle
cellStyle
=
exl
.
createCellStyle
();
cellStyle
.
setWrapText
(
true
);
cellStyle
.
setAlignment
(
HorizontalAlignment
.
LEFT
);
cellStyle
.
setVerticalAlignment
(
VerticalAlignment
.
CENTER
);
cellStyle
.
setBorderBottom
(
BorderStyle
.
THIN
);
cellStyle
.
setBottomBorderColor
(
IndexedColors
.
BLACK
.
getIndex
());
cellStyle
.
setBorderLeft
(
BorderStyle
.
THIN
);
cellStyle
.
setLeftBorderColor
(
IndexedColors
.
BLACK
.
getIndex
());
cellStyle
.
setBorderRight
(
BorderStyle
.
THIN
);
cellStyle
.
setRightBorderColor
(
IndexedColors
.
BLACK
.
getIndex
());
cellStyle
.
setBorderTop
(
BorderStyle
.
THIN
);
cellStyle
.
setTopBorderColor
(
IndexedColors
.
BLACK
.
getIndex
());
String
deptName
=
""
;
int
lastRow
=
sheet
.
getLastRowNum
()+
1
;
for
(
SjZdbfZsdwkhpjfjx
zsdwkhpj:
list
){
deptName
=
zsdwkhpj
.
getDeptName
();;
Row
row
=
sheet
.
createRow
(
lastRow
);
row
.
setHeightInPoints
(
18
);
int
m
=
0
;
Cell
cell
=
row
.
createCell
(
m
++);
cell
.
setCellStyle
(
cellStyle
);
cell
.
setCellValue
(
zsdwkhpj
.
getFlmc
());
cell
=
row
.
createCell
(
m
++);
cell
.
setCellStyle
(
cellStyle
);
cell
.
setCellValue
(
zsdwkhpj
.
getPjbzmc
());
cell
=
row
.
createCell
(
m
++);
cell
.
setCellStyle
(
cellStyle
);
cell
.
setCellValue
(
zsdwkhpj
.
getSffs
());
cell
=
row
.
createCell
(
m
++);
cell
.
setCellStyle
(
cellStyle
);
cell
.
setCellValue
(
zsdwkhpj
.
getWtms
());
cell
=
row
.
createCell
(
m
++);
cell
.
setCellStyle
(
cellStyle
);
cell
.
setCellValue
(
zsdwkhpj
.
getId
());
cell
=
row
.
createCell
(
m
++);
cell
.
setCellStyle
(
cellStyle
);
cell
.
setCellValue
(
zsdwkhpj
.
getZbId
());
lastRow
++;
}
//合并行
mergeCellsByColumn
(
sheet
,
0
);
sheet
.
getRow
(
0
).
getCell
(
0
).
setCellValue
(
sjZdbfZsdwkhpjfjx
.
getNd
()+
sjZdbfZsdwkhpjfjx
.
getZqfw
()+
deptName
+
"否决项评价"
);
exl
.
write
(
out
);
exl
.
close
();
}
catch
(
Exception
e
){
e
.
getMessage
();
throw
new
BusinessException
(
"导出Excel失败,请联系网站管理员!"
);
}
finally
{
if
(
exl
!=
null
)
{
try
{
exl
.
close
();
}
catch
(
IOException
e1
)
{
e1
.
printStackTrace
();
}
}
if
(
out
!=
null
)
{
try
{
out
.
close
();
}
catch
(
IOException
e1
)
{
e1
.
printStackTrace
();
}
}
}
}
// 根据某一列的值是否相同,对其他列的单元格进行合并
private
static
void
mergeCellsByColumn
(
Sheet
sheet
,
int
columnIndex
)
{
Map
<
String
,
Integer
>
groups
=
new
HashMap
<>();
// 遍历该列,记录相同值的行索引
int
start
=
1
;
int
end
=
1
;
String
old
=
""
;
for
(
int
i
=
1
;
i
<=
sheet
.
getLastRowNum
();
i
++)
{
Row
row
=
sheet
.
getRow
(
i
);
Cell
cell
=
row
.
getCell
(
columnIndex
);
String
cellValue
=
cell
.
getStringCellValue
();
if
(!
groups
.
containsKey
(
cellValue
))
{
if
(
groups
.
get
(
old
)!=
null
){
start
=
groups
.
get
(
old
);
}
old
=
cellValue
;
groups
.
put
(
cellValue
,
i
);
//合并行
mergeCellsInRange
(
sheet
,
columnIndex
,
start
,
end
);
start
=
i
;
end
=
i
;
}
else
{
end
++;
if
(
i
==
sheet
.
getLastRowNum
()){
mergeCellsInRange
(
sheet
,
columnIndex
,
start
,
end
);
}
}
}
}
// 合并指定范围内的单元格
private
static
void
mergeCellsInRange
(
Sheet
sheet
,
int
columnIndex
,
int
startIndex
,
int
endIndex
)
{
if
(
startIndex
!=
endIndex
){
sheet
.
addMergedRegion
(
new
CellRangeAddress
(
startIndex
,
endIndex
,
columnIndex
,
columnIndex
));
}
}
}
/**
/**
* 获取指导帮扶-直属单位考核评价否决项详细信息
* 获取指导帮扶-直属单位考核评价否决项详细信息
*/
*/
@PreAuthorize
(
"@ss.hasPermi('system:sjZdbfZsdwkhpjfjx:query')"
)
//
@PreAuthorize("@ss.hasPermi('system:sjZdbfZsdwkhpjfjx:query')")
@GetMapping
(
value
=
"/{id}"
)
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
{
...
@@ -116,7 +224,7 @@ public class SjZdbfZsdwkhpjfjxController extends BaseController
...
@@ -116,7 +224,7 @@ public class SjZdbfZsdwkhpjfjxController extends BaseController
/**
/**
* 修改指导帮扶-直属单位考核评价否决项
* 修改指导帮扶-直属单位考核评价否决项
*/
*/
// @PreAuthorize("@ss.hasPermi('system:sjZdbfZsdwkhpjfjx:
edit')")
@PreAuthorize
(
"@ss.hasPermi('system:sjZdbfZsdwkhpjfjx:pl
edit')"
)
@Log
(
title
=
"指导帮扶-直属单位考核评价否决项"
,
businessType
=
BusinessType
.
UPDATE
)
@Log
(
title
=
"指导帮扶-直属单位考核评价否决项"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
(
"/pledit"
)
@PutMapping
(
"/pledit"
)
public
AjaxResult
pledit
(
@RequestBody
List
<
SjZdbfZsdwkhpjfjx
>
list
)
public
AjaxResult
pledit
(
@RequestBody
List
<
SjZdbfZsdwkhpjfjx
>
list
)
...
@@ -124,7 +232,7 @@ public class SjZdbfZsdwkhpjfjxController extends BaseController
...
@@ -124,7 +232,7 @@ public class SjZdbfZsdwkhpjfjxController extends BaseController
return
toAjax
(
sjZdbfZsdwkhpjfjxService
.
pledit
(
list
));
return
toAjax
(
sjZdbfZsdwkhpjfjxService
.
pledit
(
list
));
}
}
@PreAuthorize
(
"@ss.hasPermi('system:sjZdbfZsdwkhpjfjx:importData')"
)
@PostMapping
(
"/importData"
)
@PostMapping
(
"/importData"
)
public
AjaxResult
importData
(
MultipartFile
file
,
boolean
updateSupport
)
throws
Exception
{
public
AjaxResult
importData
(
MultipartFile
file
,
boolean
updateSupport
)
throws
Exception
{
...
...
qianhe-ydsj/src/main/java/com/qianhe/controller/SjZdbfZsdwwtcjController.java
View file @
010835bf
...
@@ -5,11 +5,13 @@ import java.io.InputStream;
...
@@ -5,11 +5,13 @@ import java.io.InputStream;
import
java.io.OutputStream
;
import
java.io.OutputStream
;
import
java.net.URLEncoder
;
import
java.net.URLEncoder
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
com.qianhe.common.core.domain.entity.SysDept
;
import
com.qianhe.common.core.domain.entity.SysDept
;
import
com.qianhe.common.exception.BusinessException
;
import
com.qianhe.common.exception.BusinessException
;
import
com.qianhe.common.utils.DateUtils
;
import
com.qianhe.common.utils.StringUtils
;
import
com.qianhe.common.utils.StringUtils
;
import
com.qianhe.domain.SjZdbfKhpjbz
;
import
com.qianhe.domain.SjZdbfKhpjbz
;
import
com.qianhe.domain.SjZdbfKhpjbzCb
;
import
com.qianhe.domain.SjZdbfKhpjbzCb
;
...
@@ -118,7 +120,7 @@ public class SjZdbfZsdwwtcjController extends BaseController
...
@@ -118,7 +120,7 @@ public class SjZdbfZsdwwtcjController extends BaseController
/**
/**
* 获取指导帮扶-直属单位问题采集详细信息
* 获取指导帮扶-直属单位问题采集详细信息
*/
*/
@PreAuthorize
(
"@ss.hasPermi('system:sjZdbfZsdwwtcj:query')"
)
//
@PreAuthorize("@ss.hasPermi('system:sjZdbfZsdwwtcj:query')")
@GetMapping
(
value
=
"/{id}"
)
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
{
...
@@ -160,7 +162,7 @@ public class SjZdbfZsdwwtcjController extends BaseController
...
@@ -160,7 +162,7 @@ public class SjZdbfZsdwwtcjController extends BaseController
}
}
@PreAuthorize
(
"@ss.hasPermi('system:sjZdbfZsdwwtcj:importData')"
)
@PostMapping
(
"/importData"
)
@PostMapping
(
"/importData"
)
public
AjaxResult
importData
(
MultipartFile
file
,
boolean
updateSupport
)
throws
Exception
{
public
AjaxResult
importData
(
MultipartFile
file
,
boolean
updateSupport
)
throws
Exception
{
...
@@ -189,7 +191,12 @@ public class SjZdbfZsdwwtcjController extends BaseController
...
@@ -189,7 +191,12 @@ public class SjZdbfZsdwwtcjController extends BaseController
if
(
StringUtils
.
isEmpty
(
rq
)){
if
(
StringUtils
.
isEmpty
(
rq
)){
return
AjaxResult
.
error
(
"导入失败,第"
+(
i
+
1
)+
"行日期不能为空"
);
return
AjaxResult
.
error
(
"导入失败,第"
+(
i
+
1
)+
"行日期不能为空"
);
}
}
zsdwwtcj
.
setRq
(
rq
);
Date
date
=
DateUtils
.
parseDate
(
rq
);
if
(
date
==
null
){
return
AjaxResult
.
error
(
"导入失败,第"
+(
i
+
1
)+
"行日期格式错误"
);
}
zsdwwtcj
.
setRq
(
DateUtils
.
parseDateToStr
(
"yyyy-MM"
,
date
));
//单位
//单位
String
dw
=
new
DataFormatter
().
formatCellValue
(
row
.
getCell
(
2
))
;
String
dw
=
new
DataFormatter
().
formatCellValue
(
row
.
getCell
(
2
))
;
if
(
StringUtils
.
isEmpty
(
dw
)){
if
(
StringUtils
.
isEmpty
(
dw
)){
...
...
qianhe-ydsj/src/main/java/com/qianhe/domain/SjZdbfZsdwkhpj.java
View file @
010835bf
...
@@ -19,14 +19,14 @@ public class SjZdbfZsdwkhpj extends BaseEntity
...
@@ -19,14 +19,14 @@ public class SjZdbfZsdwkhpj extends BaseEntity
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@Excel
(
name
=
"单位名称"
)
//
@Excel(name = "单位名称")
private
String
deptName
;
private
String
deptName
;
/** 年度 */
/** 年度 */
@Excel
(
name
=
"年度"
)
//
@Excel(name = "年度")
private
String
nd
;
private
String
nd
;
/** 周期范围(第一季度-第四季度、上半年、下半年) */
/** 周期范围(第一季度-第四季度、上半年、下半年) */
@Excel
(
name
=
"周期范围"
)
//
@Excel(name = "周期范围")
private
String
zqfw
;
private
String
zqfw
;
/** 周期类型(季度、半年度、年度) */
/** 周期类型(季度、半年度、年度) */
...
@@ -38,17 +38,17 @@ public class SjZdbfZsdwkhpj extends BaseEntity
...
@@ -38,17 +38,17 @@ public class SjZdbfZsdwkhpj extends BaseEntity
private
String
jb
;
private
String
jb
;
/** 考核内容 */
/** 考核内容 */
@Excel
(
name
=
"考核内容"
)
@Excel
(
name
=
"考核内容"
,
needMerge
=
true
)
private
String
khnr
;
private
String
khnr
;
/** 考核项点 */
/** 考核项点 */
@Excel
(
name
=
"考核项点"
)
@Excel
(
name
=
"考核项点"
,
needMerge
=
true
)
private
String
khxd
;
private
String
khxd
;
/** 评价标准名称 */
/** 评价标准名称 */
@Excel
(
name
=
"评价标准
名称
"
)
@Excel
(
name
=
"评价标准"
)
private
String
pjbzmc
;
private
String
pjbzmc
;
/** 数量 */
/** 数量 */
...
@@ -92,10 +92,10 @@ public class SjZdbfZsdwkhpj extends BaseEntity
...
@@ -92,10 +92,10 @@ public class SjZdbfZsdwkhpj extends BaseEntity
private
Long
zbId
;
private
Long
zbId
;
/** 单位id */
/** 单位id */
@Excel
(
name
=
"单位id(勿动)"
,
headerColor
=
IndexedColors
.
RED1
)
//
@Excel(name = "单位id(勿动)",headerColor= IndexedColors.RED1)
private
Long
deptId
;
private
Long
deptId
;
/** 评价标准id */
/** 评价标准id */
@Excel
(
name
=
"评价标准id"
)
//
@Excel(name = "评价标准id")
private
String
pjbzid
;
private
String
pjbzid
;
}
}
qianhe-ydsj/src/main/java/com/qianhe/domain/SjZdbfZsdwkhpjZb.java
View file @
010835bf
...
@@ -39,11 +39,11 @@ public class SjZdbfZsdwkhpjZb extends BaseEntity
...
@@ -39,11 +39,11 @@ public class SjZdbfZsdwkhpjZb extends BaseEntity
private
String
nd
;
private
String
nd
;
/** 周期范围(第一季度-第四季度、上半年、下半年) */
/** 周期范围(第一季度-第四季度、上半年、下半年) */
@Excel
(
name
=
"周期范围"
)
//
@Excel(name = "周期范围")
private
String
zqfw
;
private
String
zqfw
;
/** 周期类型(季度、半年度、年度) */
/** 周期类型(季度、半年度、年度) */
@Excel
(
name
=
"周期类型"
)
//
@Excel(name = "周期类型")
private
String
zqlx
;
private
String
zqlx
;
/** 级别(直属单位(半年度)、基层单位(季度)、三基帮扶组(年度)) */
/** 级别(直属单位(半年度)、基层单位(季度)、三基帮扶组(年度)) */
...
...
qianhe-ydsj/src/main/java/com/qianhe/service/impl/SjZdbfZsdwkhpjServiceImpl.java
View file @
010835bf
...
@@ -201,12 +201,19 @@ public class SjZdbfZsdwkhpjServiceImpl implements ISjZdbfZsdwkhpjService
...
@@ -201,12 +201,19 @@ public class SjZdbfZsdwkhpjServiceImpl implements ISjZdbfZsdwkhpjService
sjZdbfZsdwkhpjZb
.
setZhdf
(
sunfs
.
multiply
(
new
BigDecimal
(
0.9
)).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
));
sjZdbfZsdwkhpjZb
.
setZhdf
(
sunfs
.
multiply
(
new
BigDecimal
(
0.9
)).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
));
}
else
if
(
"C类"
.
equals
(
deptDfl
))
{
}
else
if
(
"C类"
.
equals
(
deptDfl
))
{
sjZdbfZsdwkhpjZb
.
setZhdf
(
sunfs
.
multiply
(
new
BigDecimal
(
0.85
)).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
));
sjZdbfZsdwkhpjZb
.
setZhdf
(
sunfs
.
multiply
(
new
BigDecimal
(
0.85
)).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
));
}
}
else
{
sjZdbfZsdwkhpjZb
.
setZhdf
(
sunfs
);
}
}
}
//更新主表
//更新主表
sjZdbfZsdwkhpjZbMapper
.
updateSjZdbfZsdwkhpjZb
(
sjZdbfZsdwkhpjZb
);
sjZdbfZsdwkhpjZbMapper
.
updateSjZdbfZsdwkhpjZb
(
sjZdbfZsdwkhpjZb
);
return
sjZdbfZsdwkhpjMapper
.
pledit
(
list
);
return
sjZdbfZsdwkhpjMapper
.
pledit
(
list
);
}
}
public
static
void
main
(
String
[]
args
)
{
System
.
out
.
println
(
Double
.
parseDouble
(
"-5"
));
System
.
out
.
println
(
Double
.
parseDouble
(
"+5"
));
}
}
}
qianhe-ydsj/src/main/resources/mapper/SjZdbfKhpjbzMapper.xml
View file @
010835bf
...
@@ -99,6 +99,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -99,6 +99,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where 1=1
where 1=1
<if
test=
"khnr != null and khnr != ''"
>
and khnr = #{khnr}
</if>
<if
test=
"khnr != null and khnr != ''"
>
and khnr = #{khnr}
</if>
<if
test=
"nd != null and nd != ''"
>
and nd = #{nd}
</if>
<if
test=
"nd != null and nd != ''"
>
and nd = #{nd}
</if>
<if
test=
"lx != null and lx != ''"
>
and lx = #{lx}
</if>
</select>
</select>
<select
id=
"getPjbzList"
resultType=
"com.qianhe.domain.SjZdbfKhpjbzCb"
>
<select
id=
"getPjbzList"
resultType=
"com.qianhe.domain.SjZdbfKhpjbzCb"
>
...
@@ -106,6 +107,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -106,6 +107,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where 1=1
where 1=1
<if
test=
"khxd != null and khxd != ''"
>
and khxd = #{khxd}
</if>
<if
test=
"khxd != null and khxd != ''"
>
and khxd = #{khxd}
</if>
<if
test=
"nd != null and nd != ''"
>
and nd = #{nd}
</if>
<if
test=
"nd != null and nd != ''"
>
and nd = #{nd}
</if>
<if
test=
"lx != null and lx != ''"
>
and lx = #{lx}
</if>
</select>
</select>
<select
id=
"selectSjZdbfKhpjbzCb"
resultType=
"com.qianhe.domain.SjZdbfKhpjbzCb"
>
<select
id=
"selectSjZdbfKhpjbzCb"
resultType=
"com.qianhe.domain.SjZdbfKhpjbzCb"
>
select * from sj_zdbf_khpjbz_cb where lx=#{lx} and khnr=#{khnr} and khxd=#{khxd} and px=#{px} and nd=#{nd}
select * from sj_zdbf_khpjbz_cb where lx=#{lx} and khnr=#{khnr} and khxd=#{khxd} and px=#{px} and nd=#{nd}
...
...
qianhe-ydsj/src/main/resources/mapper/SjZdbfZsdwkhpjZbMapper.xml
View file @
010835bf
...
@@ -142,7 +142,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -142,7 +142,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!-- 数据范围过滤 -->
<!-- 数据范围过滤 -->
${params.dataScope}
${params.dataScope}
</where>
</where>
order by zhdf desc
</select>
</select>
<select
id=
"selectSjZdbfZsdwkhpjZbById"
parameterType=
"Long"
resultMap=
"SjZdbfZsdwkhpjZbResult"
>
<select
id=
"selectSjZdbfZsdwkhpjZbById"
parameterType=
"Long"
resultMap=
"SjZdbfZsdwkhpjZbResult"
>
...
...
qianhe-ydsj/src/main/resources/static/zsdwfjx.xlsx
0 → 100644
View file @
010835bf
File added
qianhe-ydsj/src/main/resources/static/zsdwkhpj.xlsx
0 → 100644
View file @
010835bf
File added
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