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
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
170 additions
and
39 deletions
+170
-39
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
+0
-0
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
+7
-0
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
/**
* 获取部门树列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:user:list')"
)
//
@PreAuthorize("@ss.hasPermi('system:user:list')")
@GetMapping
(
"/deptTree"
)
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
/**
* 查询指导帮扶-否决项标准列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:sjZdbfFjxbz:list')"
)
//
@PreAuthorize("@ss.hasPermi('system:sjZdbfFjxbz:list')")
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
SjZdbfFjxbz
sjZdbfFjxbz
)
{
...
...
@@ -51,7 +51,7 @@ public class SjZdbfFjxbzController extends BaseController
/**
* 查询指导帮扶-否决项标准列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:sjZdbfFjxbz:cxlist')"
)
//
@PreAuthorize("@ss.hasPermi('system:sjZdbfFjxbz:cxlist')")
@GetMapping
(
"/cxlist"
)
public
TableDataInfo
cxlist
(
SjZdbfFjxbz
sjZdbfFjxbz
)
{
...
...
@@ -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
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
SjZdbfFjxbz
sjZdbfFjxbz
)
...
...
@@ -76,7 +76,7 @@ public class SjZdbfFjxbzController extends BaseController
/**
* 获取指导帮扶-否决项标准详细信息
*/
@PreAuthorize
(
"@ss.hasPermi('system:sjZdbfFjxbz:query')"
)
//
@PreAuthorize("@ss.hasPermi('system:sjZdbfFjxbz:query')")
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
...
...
@@ -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
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
SjZdbfFjxbz
sjZdbfFjxbz
)
...
...
@@ -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
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
SjZdbfFjxbz
sjZdbfFjxbz
)
...
...
@@ -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
)
@DeleteMapping
(
"/{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
/**
* 查询指导帮扶-考核评价标准列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:sjZdbfKhpjbz:list')"
)
//
@PreAuthorize("@ss.hasPermi('system:sjZdbfKhpjbz:list')")
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
SjZdbfKhpjbz
sjZdbfKhpjbz
)
{
...
...
@@ -53,7 +53,7 @@ public class SjZdbfKhpjbzController extends BaseController
/**
* 查询指导帮扶-考核评价标准列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:sjZdbfKhpjbz:cxlist')"
)
//
@PreAuthorize("@ss.hasPermi('system:sjZdbfKhpjbz:cxlist')")
@GetMapping
(
"/cxlist"
)
public
TableDataInfo
cxlist
(
SjZdbfKhpjbz
sjZdbfKhpjbz
)
{
...
...
@@ -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
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
SjZdbfKhpjbz
sjZdbfKhpjbz
)
...
...
@@ -78,7 +78,7 @@ public class SjZdbfKhpjbzController extends BaseController
/**
* 获取指导帮扶-考核评价标准详细信息
*/
@PreAuthorize
(
"@ss.hasPermi('system:sjZdbfKhpjbz:query')"
)
//
@PreAuthorize("@ss.hasPermi('system:sjZdbfKhpjbz:query')")
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
...
...
@@ -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
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
SjZdbfKhpjbz
sjZdbfKhpjbz
)
...
...
@@ -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
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
SjZdbfKhpjbz
sjZdbfKhpjbz
)
...
...
@@ -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
)
@DeleteMapping
(
"/{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;
import
java.io.OutputStream
;
import
java.net.URLEncoder
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
javax.servlet.http.HttpServletResponse
;
import
com.qianhe.common.core.domain.entity.SysDept
;
import
com.qianhe.common.exception.BusinessException
;
import
com.qianhe.common.utils.DateUtils
;
import
com.qianhe.common.utils.StringUtils
;
import
com.qianhe.domain.SjZdbfFjxbzCb
;
import
com.qianhe.domain.SjZdbfKhpjbzCb
;
...
...
@@ -120,7 +122,7 @@ public class SjZdbfZsdwfjxcjController extends BaseController
/**
* 获取指导帮扶-直属单位否决项采集详细信息
*/
@PreAuthorize
(
"@ss.hasPermi('system:sjZdbfZsdwfjxcj:query')"
)
//
@PreAuthorize("@ss.hasPermi('system:sjZdbfZsdwfjxcj:query')")
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
...
...
@@ -161,7 +163,7 @@ public class SjZdbfZsdwfjxcjController extends BaseController
}
@PreAuthorize
(
"@ss.hasPermi('system:sjZdbfZsdwfjxcj:importData')"
)
@PostMapping
(
"/importData"
)
public
AjaxResult
importData
(
MultipartFile
file
,
boolean
updateSupport
)
throws
Exception
{
...
...
@@ -190,7 +192,12 @@ public class SjZdbfZsdwfjxcjController extends BaseController
if
(
StringUtils
.
isEmpty
(
rq
)){
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
))
;
if
(
StringUtils
.
isEmpty
(
dw
)){
...
...
qianhe-ydsj/src/main/java/com/qianhe/controller/SjZdbfZsdwkhpjController.java
View file @
010835bf
This diff is collapsed.
Click to expand it.
qianhe-ydsj/src/main/java/com/qianhe/controller/SjZdbfZsdwkhpjfjxController.java
View file @
010835bf
package
com
.
qianhe
.
controller
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.io.OutputStream
;
import
java.net.URLEncoder
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
javax.servlet.http.HttpServletResponse
;
import
com.qianhe.common.exception.BusinessException
;
import
com.qianhe.common.utils.StringUtils
;
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.XSSFSheet
;
import
org.apache.poi.xssf.usermodel.XSSFWorkbook
;
import
org.springframework.http.MediaType
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
...
@@ -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
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
SjZdbfZsdwkhpjfjx
sjZdbfZsdwkhpjfjx
)
{
List
<
SjZdbfZsdwkhpjfjx
>
list
=
sjZdbfZsdwkhpjfjxService
.
selectSjZdbfZsdwkhpjfjxList
(
sjZdbfZsdwkhpjfjx
);
ExcelUtil
<
SjZdbfZsdwkhpjfjx
>
util
=
new
ExcelUtil
<
SjZdbfZsdwkhpjfjx
>(
SjZdbfZsdwkhpjfjx
.
class
);
util
.
exportExcel
(
response
,
list
,
"指导帮扶-直属单位考核评价否决项数据"
);
Workbook
exl
=
null
;
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}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
...
...
@@ -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
)
@PutMapping
(
"/pledit"
)
public
AjaxResult
pledit
(
@RequestBody
List
<
SjZdbfZsdwkhpjfjx
>
list
)
...
...
@@ -124,7 +232,7 @@ public class SjZdbfZsdwkhpjfjxController extends BaseController
return
toAjax
(
sjZdbfZsdwkhpjfjxService
.
pledit
(
list
));
}
@PreAuthorize
(
"@ss.hasPermi('system:sjZdbfZsdwkhpjfjx:importData')"
)
@PostMapping
(
"/importData"
)
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;
import
java.io.OutputStream
;
import
java.net.URLEncoder
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
javax.servlet.http.HttpServletResponse
;
import
com.qianhe.common.core.domain.entity.SysDept
;
import
com.qianhe.common.exception.BusinessException
;
import
com.qianhe.common.utils.DateUtils
;
import
com.qianhe.common.utils.StringUtils
;
import
com.qianhe.domain.SjZdbfKhpjbz
;
import
com.qianhe.domain.SjZdbfKhpjbzCb
;
...
...
@@ -118,7 +120,7 @@ public class SjZdbfZsdwwtcjController extends BaseController
/**
* 获取指导帮扶-直属单位问题采集详细信息
*/
@PreAuthorize
(
"@ss.hasPermi('system:sjZdbfZsdwwtcj:query')"
)
//
@PreAuthorize("@ss.hasPermi('system:sjZdbfZsdwwtcj:query')")
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
...
...
@@ -160,7 +162,7 @@ public class SjZdbfZsdwwtcjController extends BaseController
}
@PreAuthorize
(
"@ss.hasPermi('system:sjZdbfZsdwwtcj:importData')"
)
@PostMapping
(
"/importData"
)
public
AjaxResult
importData
(
MultipartFile
file
,
boolean
updateSupport
)
throws
Exception
{
...
...
@@ -189,7 +191,12 @@ public class SjZdbfZsdwwtcjController extends BaseController
if
(
StringUtils
.
isEmpty
(
rq
)){
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
))
;
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
private
static
final
long
serialVersionUID
=
1L
;
@Excel
(
name
=
"单位名称"
)
//
@Excel(name = "单位名称")
private
String
deptName
;
/** 年度 */
@Excel
(
name
=
"年度"
)
//
@Excel(name = "年度")
private
String
nd
;
/** 周期范围(第一季度-第四季度、上半年、下半年) */
@Excel
(
name
=
"周期范围"
)
//
@Excel(name = "周期范围")
private
String
zqfw
;
/** 周期类型(季度、半年度、年度) */
...
...
@@ -38,17 +38,17 @@ public class SjZdbfZsdwkhpj extends BaseEntity
private
String
jb
;
/** 考核内容 */
@Excel
(
name
=
"考核内容"
)
@Excel
(
name
=
"考核内容"
,
needMerge
=
true
)
private
String
khnr
;
/** 考核项点 */
@Excel
(
name
=
"考核项点"
)
@Excel
(
name
=
"考核项点"
,
needMerge
=
true
)
private
String
khxd
;
/** 评价标准名称 */
@Excel
(
name
=
"评价标准
名称
"
)
@Excel
(
name
=
"评价标准"
)
private
String
pjbzmc
;
/** 数量 */
...
...
@@ -92,10 +92,10 @@ public class SjZdbfZsdwkhpj extends BaseEntity
private
Long
zbId
;
/** 单位id */
@Excel
(
name
=
"单位id(勿动)"
,
headerColor
=
IndexedColors
.
RED1
)
//
@Excel(name = "单位id(勿动)",headerColor= IndexedColors.RED1)
private
Long
deptId
;
/** 评价标准id */
@Excel
(
name
=
"评价标准id"
)
//
@Excel(name = "评价标准id")
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
private
String
nd
;
/** 周期范围(第一季度-第四季度、上半年、下半年) */
@Excel
(
name
=
"周期范围"
)
//
@Excel(name = "周期范围")
private
String
zqfw
;
/** 周期类型(季度、半年度、年度) */
@Excel
(
name
=
"周期类型"
)
//
@Excel(name = "周期类型")
private
String
zqlx
;
/** 级别(直属单位(半年度)、基层单位(季度)、三基帮扶组(年度)) */
...
...
qianhe-ydsj/src/main/java/com/qianhe/service/impl/SjZdbfZsdwkhpjServiceImpl.java
View file @
010835bf
...
...
@@ -201,6 +201,8 @@ public class SjZdbfZsdwkhpjServiceImpl implements ISjZdbfZsdwkhpjService
sjZdbfZsdwkhpjZb
.
setZhdf
(
sunfs
.
multiply
(
new
BigDecimal
(
0.9
)).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
));
}
else
if
(
"C类"
.
equals
(
deptDfl
))
{
sjZdbfZsdwkhpjZb
.
setZhdf
(
sunfs
.
multiply
(
new
BigDecimal
(
0.85
)).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
));
}
else
{
sjZdbfZsdwkhpjZb
.
setZhdf
(
sunfs
);
}
}
//更新主表
...
...
@@ -208,5 +210,10 @@ public class SjZdbfZsdwkhpjServiceImpl implements ISjZdbfZsdwkhpjService
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"
where 1=1
<if
test=
"khnr != null and khnr != ''"
>
and khnr = #{khnr}
</if>
<if
test=
"nd != null and nd != ''"
>
and nd = #{nd}
</if>
<if
test=
"lx != null and lx != ''"
>
and lx = #{lx}
</if>
</select>
<select
id=
"getPjbzList"
resultType=
"com.qianhe.domain.SjZdbfKhpjbzCb"
>
...
...
@@ -106,6 +107,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where 1=1
<if
test=
"khxd != null and khxd != ''"
>
and khxd = #{khxd}
</if>
<if
test=
"nd != null and nd != ''"
>
and nd = #{nd}
</if>
<if
test=
"lx != null and lx != ''"
>
and lx = #{lx}
</if>
</select>
<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}
...
...
qianhe-ydsj/src/main/resources/mapper/SjZdbfZsdwkhpjZbMapper.xml
View file @
010835bf
...
...
@@ -142,7 +142,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!-- 数据范围过滤 -->
${params.dataScope}
</where>
order by zhdf desc
</select>
<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