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
85320c88
Commit
85320c88
authored
Nov 01, 2024
by
wangqi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
否决项录入
parent
d9aa6d5f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
47 additions
and
14 deletions
+47
-14
qianhe-ydsj/src/main/java/com/qianhe/controller/SjZdbfZsdwfjxcjController.java
+40
-10
qianhe-ydsj/src/main/java/com/qianhe/service/impl/SjZdbfZsdwfjxcjServiceImpl.java
+1
-1
qianhe-ydsj/src/main/resources/mapper/SjZdbfZsdwfjxcjMapper.xml
+6
-3
qianhe-ydsj/src/main/resources/static/jgbmwtjc.xlsx
+0
-0
qianhe-ydsj/src/main/resources/static/zsdwfjxcj.xlsx
+0
-0
No files found.
qianhe-ydsj/src/main/java/com/qianhe/controller/SjZdbfZsdwfjxcjController.java
View file @
85320c88
...
...
@@ -12,6 +12,7 @@ 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.SecurityUtils
;
import
com.qianhe.common.utils.StringUtils
;
import
com.qianhe.domain.SjZdbfFjxbzCb
;
import
com.qianhe.domain.SjZdbfKhpjbzCb
;
...
...
@@ -198,35 +199,62 @@ public class SjZdbfZsdwfjxcjController extends BaseController
}
zsdwwtcj
.
setRq
(
DateUtils
.
parseDateToStr
(
"yyyy-MM"
,
date
));
//单位
String
dw
=
new
DataFormatter
().
formatCellValue
(
row
.
getCell
(
2
))
;
//机关部门
String
jgbm
=
new
DataFormatter
().
formatCellValue
(
row
.
getCell
(
2
))
;
if
(
StringUtils
.
isEmpty
(
jgbm
)){
return
AjaxResult
.
error
(
"导入失败,第"
+(
i
+
1
)+
"行机关部门不能为空"
);
}
String
[]
jgsplit
=
jgbm
.
split
(
"/"
);
if
(
jgsplit
.
length
==
1
){
String
bm
=
jgsplit
[
0
];
// 部门
SysDept
bmdept
=
deptList
.
stream
().
filter
(
dept
->
dept
.
getDeptName
().
equals
(
bm
)).
findFirst
().
orElse
(
null
);
if
(
bmdept
==
null
){
return
AjaxResult
.
error
(
"导入失败,第"
+(
i
+
1
)+
"行,机关部门:未匹配到机关名称"
);
}
zsdwwtcj
.
setYl3
(
bmdept
.
getDeptId
());
}
else
{
String
bm
=
jgsplit
[
0
];
// 部门
String
ks
=
jgsplit
[
1
];
// 科室
SysDept
bmdept
=
deptList
.
stream
().
filter
(
dept
->
dept
.
getDeptName
().
equals
(
bm
)).
findFirst
().
orElse
(
null
);
if
(
bmdept
==
null
){
return
AjaxResult
.
error
(
"导入失败,第"
+(
i
+
1
)+
"行,机关部门:未匹配到机关名称"
);
}
SysDept
ksdept
=
deptList
.
stream
().
filter
(
dept
->
dept
.
getDeptName
().
equals
(
ks
)
&&
dept
.
getParentId
().
equals
(
bmdept
.
getDeptId
())).
findFirst
().
orElse
(
null
);
if
(
ksdept
==
null
){
return
AjaxResult
.
error
(
"导入失败,第"
+(
i
+
1
)+
"行,机关部门:未匹配到科室名称"
);
}
zsdwwtcj
.
setYl3
(
ksdept
.
getDeptId
());
}
//受检单位
String
dw
=
new
DataFormatter
().
formatCellValue
(
row
.
getCell
(
3
))
;
if
(
StringUtils
.
isEmpty
(
dw
)){
return
AjaxResult
.
error
(
"导入失败,第"
+(
i
+
1
)+
"行单位不能为空"
);
return
AjaxResult
.
error
(
"导入失败,第"
+(
i
+
1
)+
"行
受检
单位不能为空"
);
}
//查询单位id
String
[]
split
=
dw
.
split
(
"/"
);
if
(
split
.
length
<
2
){
return
AjaxResult
.
error
(
"导入失败,第"
+(
i
+
1
)+
"行输入的单位格式有误!"
);
return
AjaxResult
.
error
(
"导入失败,第"
+(
i
+
1
)+
"行输入的
受检
单位格式有误!"
);
}
String
ejdw
=
split
[
0
];
SysDept
ejdept
=
deptList
.
stream
().
filter
(
dept
->
dept
.
getDeptName
().
equals
(
ejdw
)).
findFirst
().
orElse
(
null
);
if
(
ejdept
==
null
){
return
AjaxResult
.
error
(
"导入失败,第"
+(
i
+
1
)+
"行未匹配到二级单位"
);
return
AjaxResult
.
error
(
"导入失败,第"
+(
i
+
1
)+
"行
,受检单位:
未匹配到二级单位"
);
}
String
sjdw
=
split
[
1
];
SysDept
sjdept
=
deptList
.
stream
().
filter
(
dept
->
dept
.
getDeptName
().
equals
(
sjdw
)
&&
dept
.
getParentId
().
equals
(
ejdept
.
getDeptId
())).
findFirst
().
orElse
(
null
);
if
(
sjdept
==
null
){
return
AjaxResult
.
error
(
"导入失败,第"
+(
i
+
1
)+
"行未匹配到三级单位"
);
return
AjaxResult
.
error
(
"导入失败,第"
+(
i
+
1
)+
"行
,受检单位:
未匹配到三级单位"
);
}
zsdwwtcj
.
setDeptId
(
sjdept
.
getDeptId
());
//分类名称
String
flmc
=
new
DataFormatter
().
formatCellValue
(
row
.
getCell
(
3
))
;
String
flmc
=
new
DataFormatter
().
formatCellValue
(
row
.
getCell
(
4
))
;
if
(
StringUtils
.
isEmpty
(
flmc
)){
return
AjaxResult
.
error
(
"导入失败,第"
+(
i
+
1
)+
"行
分类名称
不能为空"
);
return
AjaxResult
.
error
(
"导入失败,第"
+(
i
+
1
)+
"行
否决项分类
不能为空"
);
}
zsdwwtcj
.
setFlmc
(
flmc
);
//评价标准
String
pjbz
=
new
DataFormatter
().
formatCellValue
(
row
.
getCell
(
4
))
;
String
pjbz
=
new
DataFormatter
().
formatCellValue
(
row
.
getCell
(
5
))
;
if
(
StringUtils
.
isEmpty
(
pjbz
)){
return
AjaxResult
.
error
(
"导入失败,第"
+(
i
+
1
)+
"行评价标准不能为空"
);
}
...
...
@@ -243,8 +271,10 @@ public class SjZdbfZsdwfjxcjController extends BaseController
}
zsdwwtcj
.
setPjbzid
(
cb
.
getId
()+
""
);
zsdwwtcj
.
setPjbzmc
(
cb
.
getPjbz
());
String
wtms
=
new
DataFormatter
().
formatCellValue
(
row
.
getCell
(
5
))
;
String
wtms
=
new
DataFormatter
().
formatCellValue
(
row
.
getCell
(
6
))
;
zsdwwtcj
.
setWtmc
(
wtms
);
zsdwwtcj
.
setCreateTime
(
DateUtils
.
getNowDate
());
zsdwwtcj
.
setCreateBy
(
SecurityUtils
.
getUsername
());
list
.
add
(
zsdwwtcj
);
}
if
(
list
.
size
()>
0
){
...
...
qianhe-ydsj/src/main/java/com/qianhe/service/impl/SjZdbfZsdwfjxcjServiceImpl.java
View file @
85320c88
...
...
@@ -43,7 +43,7 @@ public class SjZdbfZsdwfjxcjServiceImpl implements ISjZdbfZsdwfjxcjService
* @return 指导帮扶-直属单位否决项采集
*/
@Override
@DataScope
(
deptAlias
=
"
d
"
)
@DataScope
(
deptAlias
=
"
c
"
)
public
List
<
SjZdbfZsdwfjxcj
>
selectSjZdbfZsdwfjxcjList
(
SjZdbfZsdwfjxcj
sjZdbfZsdwfjxcj
)
{
return
sjZdbfZsdwfjxcjMapper
.
selectSjZdbfZsdwfjxcjList
(
sjZdbfZsdwfjxcj
);
...
...
qianhe-ydsj/src/main/resources/mapper/SjZdbfZsdwfjxcjMapper.xml
View file @
85320c88
...
...
@@ -42,9 +42,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
yl2,
yl3,
yl4,
yl5,d.dept_name
yl5,d.dept_name,
c.dept_name as yl3name
from sj_zdbf_zsdwfjxcj a
left join sys_dept d on a.dept_id=d.dept_id
left join sys_dept c on a.yl3=c.dept_id
</sql>
<select
id=
"selectSjZdbfZsdwfjxcjList"
parameterType=
"SjZdbfZsdwfjxcj"
resultMap=
"SjZdbfZsdwfjxcjResult"
>
...
...
@@ -115,9 +117,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
</insert>
<insert
id=
"batchSave"
>
insert into sj_zdbf_zsdwfjxcj( id, dept_id, rq, flmc, pjbzid, pjbzmc, wtmc) values
insert into sj_zdbf_zsdwfjxcj( id, dept_id, rq, flmc, pjbzid, pjbzmc, wtmc
,create_by,create_time,remark,yl1,yl2,yl3,yl4,yl5
) values
<foreach
item=
"item"
index=
"index"
collection=
"list"
separator=
","
>
( #{item.id}, #{item.deptId}, #{item.rq}, #{item.flmc}, #{item.pjbzid}, #{item.pjbzmc}, #{item.wtmc})
( #{item.id}, #{item.deptId}, #{item.rq}, #{item.flmc}, #{item.pjbzid}, #{item.pjbzmc}, #{item.wtmc}
, #{item.createBy}, #{item.createTime}, #{item.remark},#{item.yl1}, #{item.yl2}, #{item.yl3}, #{item.yl4}, #{item.yl5})
</foreach>
</insert>
...
...
qianhe-ydsj/src/main/resources/static/jgbmwtjc.xlsx
View file @
85320c88
No preview for this file type
qianhe-ydsj/src/main/resources/static/zsdwfjxcj.xlsx
View file @
85320c88
No preview for this file type
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