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
728aae48
Commit
728aae48
authored
Jul 22, 2024
by
jiang'yun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改问题
parent
71775d92
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
204 additions
and
63 deletions
+204
-63
qianhe-ydsj/src/main/java/com/qianhe/controller/SjFybpZbController.java
+22
-30
qianhe-ydsj/src/main/java/com/qianhe/controller/SjLhscController.java
+137
-13
qianhe-ydsj/src/main/java/com/qianhe/domain/SjLhsc.java
+7
-0
qianhe-ydsj/src/main/java/com/qianhe/domain/Vo/SjLhscVo.java
+1
-1
qianhe-ydsj/src/main/resources/mapper/SjFybpMapper.xml
+5
-5
qianhe-ydsj/src/main/resources/mapper/SjFybpZbMapper.xml
+2
-1
qianhe-ydsj/src/main/resources/mapper/SjLhscMapper.xml
+30
-13
qianhe-ydsj/src/main/resources/wordTemp/lhmb.docx
+0
-0
No files found.
qianhe-ydsj/src/main/java/com/qianhe/controller/SjFybpZbController.java
View file @
728aae48
...
...
@@ -3,6 +3,7 @@ package com.qianhe.controller;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
com.qianhe.common.utils.DateUtils
;
...
...
@@ -14,14 +15,7 @@ import com.qianhe.system.mapper.SysDeptCbMapper;
import
com.qianhe.system.mapper.SysDeptMapper
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
com.qianhe.common.annotation.Log
;
import
com.qianhe.common.core.controller.BaseController
;
import
com.qianhe.common.core.domain.AjaxResult
;
...
...
@@ -117,10 +111,10 @@ public class SjFybpZbController extends BaseController
sum
=
sum
.
divide
(
new
BigDecimal
(
10000
)).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
if
(
fyje
.
compareTo
(
sum
)>-
1
){
msg
=
"保存成功!费用总额"
+
fyje
+
"万元不低于"
+
sum
+
"万元。\n计算标准为:"
+
deptCb
.
getJyqlhjysr
()+
"万吨*2元/吨*30%+"
+
jcrysl
+
"*1000元/人*30%+"
+
jcdwsl
+
"*15万元/单位*20%+"
+
yxbzsl
+
"*2万元/班站*20%="
+
sum
;
+
deptCb
.
getJyqlhjysr
()
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
)
+
"万吨*2元/吨*30%+"
+
jcrysl
+
"*1000元/人*30%+"
+
jcdwsl
+
"*15万元/单位*20%+"
+
yxbzsl
+
"*2万元/班站*20%="
+
sum
;
}
else
{
msg
=
"保存成功!费用总额"
+
fyje
+
"万元低于"
+
sum
+
"万元。\n计算标准为:"
+
deptCb
.
getJyqlhjysr
()+
"万吨*2元/吨*30%+"
+
jcrysl
+
"*1000元/人*30%+"
+
jcdwsl
+
"*15万元/单位*20%+"
+
yxbzsl
+
"*2万元/班站*20%="
+
sum
;
+
deptCb
.
getJyqlhjysr
()
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
)
+
"万吨*2元/吨*30%+"
+
jcrysl
+
"*1000元/人*30%+"
+
jcdwsl
+
"*15万元/单位*20%+"
+
yxbzsl
+
"*2万元/班站*20%="
+
sum
;
}
}
else
if
(
"主要专业化单位"
.
equals
(
dwlx
))
{
//计算标准
...
...
@@ -132,10 +126,10 @@ public class SjFybpZbController extends BaseController
sum
=
sum
.
divide
(
new
BigDecimal
(
10000
)).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
if
(
fyje
.
compareTo
(
sum
)>-
1
){
msg
=
"保存成功!费用总额"
+
fyje
+
"万元不低于"
+
sum
+
"万元。\n计算标准为:"
+
deptCb
.
getJyqlhjysr
()+
"万元*1‰*30%+"
+
jcrysl
+
"*1000元/人*40%+"
+
jcdwsl
+
"*15万元/单位*30%="
+
sum
;
+
deptCb
.
getJyqlhjysr
()
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
)
+
"万元*1‰*30%+"
+
jcrysl
+
"*1000元/人*40%+"
+
jcdwsl
+
"*15万元/单位*30%="
+
sum
;
}
else
{
msg
=
"保存成功!费用总额"
+
fyje
+
"万元低于"
+
sum
+
"万元。\n计算标准为:"
+
deptCb
.
getJyqlhjysr
()+
"万吨*2元/吨*30%+"
+
jcrysl
+
"*1000元/人*40%+"
+
jcdwsl
+
"*15万元/单位*30%="
+
sum
;
+
deptCb
.
getJyqlhjysr
()
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
)
+
"万吨*2元/吨*30%+"
+
jcrysl
+
"*1000元/人*40%+"
+
jcdwsl
+
"*15万元/单位*30%="
+
sum
;
}
}
else
{
BigDecimal
jys
=
jyqlhjysr
.
multiply
(
new
BigDecimal
(
0.0001
)).
multiply
(
new
BigDecimal
(
0.3
)).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
...
...
@@ -146,10 +140,10 @@ public class SjFybpZbController extends BaseController
sum
=
sum
.
divide
(
new
BigDecimal
(
10000
)).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
if
(
fyje
.
compareTo
(
sum
)>-
1
){
msg
=
"保存成功!费用总额"
+
fyje
+
"万元不低于"
+
sum
+
"万元。\n计算标准为:"
+
deptCb
.
getJyqlhjysr
()+
"万元*1‰*30%+"
+
jcrysl
+
"*1000元/人*30%+"
+
jcdwsl
+
"*15万元/单位*20%+"
+
yxbzsl
+
"*2万元/班站*20%="
+
sum
;
+
deptCb
.
getJyqlhjysr
()
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
)
+
"万元*1‰*30%+"
+
jcrysl
+
"*1000元/人*30%+"
+
jcdwsl
+
"*15万元/单位*20%+"
+
yxbzsl
+
"*2万元/班站*20%="
+
sum
;
}
else
{
msg
=
"保存成功!费用总额"
+
fyje
+
"万元低于"
+
sum
+
"万元。\n计算标准为:"
+
deptCb
.
getJyqlhjysr
()+
"万吨*2元/吨*30%+"
+
jcrysl
+
"*1000元/人*30%+"
+
jcdwsl
+
"*15万元/单位*20%+"
+
yxbzsl
+
"*2万元/班站*20%="
+
sum
;
+
deptCb
.
getJyqlhjysr
()
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
)
+
"万吨*2元/吨*30%+"
+
jcrysl
+
"*1000元/人*30%+"
+
jcdwsl
+
"*15万元/单位*20%+"
+
yxbzsl
+
"*2万元/班站*20%="
+
sum
;
}
}
...
...
@@ -161,10 +155,10 @@ public class SjFybpZbController extends BaseController
sum
=
sum
.
divide
(
new
BigDecimal
(
10000
)).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
if
(
fyje
.
compareTo
(
sum
)>-
1
){
msg
=
"保存成功!费用总额"
+
fyje
+
"万元不低于"
+
sum
+
"万元。\n计算标准为:"
+
deptCb
.
getJyqlhjysr
()+
"万元*1‰*30%+"
+
jcrysl
+
"*1000元/人*40%+"
+
jcdwsl
+
"*5万元/单位*30%="
+
sum
;
+
deptCb
.
getJyqlhjysr
()
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
)
+
"万元*1‰*30%+"
+
jcrysl
+
"*1000元/人*40%+"
+
jcdwsl
+
"*5万元/单位*30%="
+
sum
;
}
else
{
msg
=
"保存成功!费用总额"
+
fyje
+
"万元低于"
+
sum
+
"万元。\n计算标准为:"
+
deptCb
.
getJyqlhjysr
()+
"万吨*2元/吨*30%+"
+
jcrysl
+
"*1000元/人*40%+"
+
jcdwsl
+
"*5万元/单位*30%="
+
sum
;
+
deptCb
.
getJyqlhjysr
()
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
)
+
"万吨*2元/吨*30%+"
+
jcrysl
+
"*1000元/人*40%+"
+
jcdwsl
+
"*5万元/单位*30%="
+
sum
;
}
}
}
...
...
@@ -208,10 +202,10 @@ public class SjFybpZbController extends BaseController
sum
=
sum
.
divide
(
new
BigDecimal
(
10000
)).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
if
(
fyje
.
compareTo
(
sum
)>-
1
){
msg
=
"保存成功!费用总额"
+
fyje
+
"万元不低于"
+
sum
+
"万元。\n计算标准为:"
+
deptCb
.
getJyqlhjysr
()+
"万吨*2元/吨*30%+"
+
jcrysl
+
"*1000元/人*30%+"
+
jcdwsl
+
"*15万元/单位*20%+"
+
yxbzsl
+
"*2万元/班站*20%="
+
sum
;
+
deptCb
.
getJyqlhjysr
()
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
)
+
"万吨*2元/吨*30%+"
+
jcrysl
+
"*1000元/人*30%+"
+
jcdwsl
+
"*15万元/单位*20%+"
+
yxbzsl
+
"*2万元/班站*20%="
+
sum
;
}
else
{
msg
=
"保存成功!费用总额"
+
fyje
+
"万元低于"
+
sum
+
"万元。\n计算标准为:"
+
deptCb
.
getJyqlhjysr
()+
"万吨*2元/吨*30%+"
+
jcrysl
+
"*1000元/人*30%+"
+
jcdwsl
+
"*15万元/单位*20%+"
+
yxbzsl
+
"*2万元/班站*20%="
+
sum
;
+
deptCb
.
getJyqlhjysr
()
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
)
+
"万吨*2元/吨*30%+"
+
jcrysl
+
"*1000元/人*30%+"
+
jcdwsl
+
"*15万元/单位*20%+"
+
yxbzsl
+
"*2万元/班站*20%="
+
sum
;
}
}
else
if
(
"主要专业化单位"
.
equals
(
dwlx
))
{
//计算标准
...
...
@@ -223,10 +217,10 @@ public class SjFybpZbController extends BaseController
sum
=
sum
.
divide
(
new
BigDecimal
(
10000
)).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
if
(
fyje
.
compareTo
(
sum
)>-
1
){
msg
=
"保存成功!费用总额"
+
fyje
+
"万元不低于"
+
sum
+
"万元。\n计算标准为:"
+
deptCb
.
getJyqlhjysr
()+
"万元*1‰*30%+"
+
jcrysl
+
"*1000元/人*40%+"
+
jcdwsl
+
"*15万元/单位*30%="
+
sum
;
+
deptCb
.
getJyqlhjysr
()
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
)
+
"万元*1‰*30%+"
+
jcrysl
+
"*1000元/人*40%+"
+
jcdwsl
+
"*15万元/单位*30%="
+
sum
;
}
else
{
msg
=
"保存成功!费用总额"
+
fyje
+
"万元低于"
+
sum
+
"万元。\n计算标准为:"
+
deptCb
.
getJyqlhjysr
()+
"万吨*2元/吨*30%+"
+
jcrysl
+
"*1000元/人*40%+"
+
jcdwsl
+
"*15万元/单位*30%="
+
sum
;
+
deptCb
.
getJyqlhjysr
()
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
)
+
"万吨*2元/吨*30%+"
+
jcrysl
+
"*1000元/人*40%+"
+
jcdwsl
+
"*15万元/单位*30%="
+
sum
;
}
}
else
{
BigDecimal
jys
=
jyqlhjysr
.
multiply
(
new
BigDecimal
(
0.0001
)).
multiply
(
new
BigDecimal
(
0.3
)).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
...
...
@@ -237,10 +231,10 @@ public class SjFybpZbController extends BaseController
sum
=
sum
.
divide
(
new
BigDecimal
(
10000
)).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
if
(
fyje
.
compareTo
(
sum
)>-
1
){
msg
=
"保存成功!费用总额"
+
fyje
+
"万元不低于"
+
sum
+
"万元。\n计算标准为:"
+
deptCb
.
getJyqlhjysr
()+
"万元*1‰*30%+"
+
jcrysl
+
"*1000元/人*30%+"
+
jcdwsl
+
"*15万元/单位*20%+"
+
yxbzsl
+
"*2万元/班站*20%="
+
sum
;
+
deptCb
.
getJyqlhjysr
()
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
)
+
"万元*1‰*30%+"
+
jcrysl
+
"*1000元/人*30%+"
+
jcdwsl
+
"*15万元/单位*20%+"
+
yxbzsl
+
"*2万元/班站*20%="
+
sum
;
}
else
{
msg
=
"保存成功!费用总额"
+
fyje
+
"万元低于"
+
sum
+
"万元。\n计算标准为:"
+
deptCb
.
getJyqlhjysr
()+
"万吨*2元/吨*30%+"
+
jcrysl
+
"*1000元/人*30%+"
+
jcdwsl
+
"*15万元/单位*20%+"
+
yxbzsl
+
"*2万元/班站*20%="
+
sum
;
+
deptCb
.
getJyqlhjysr
()
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
)
+
"万吨*2元/吨*30%+"
+
jcrysl
+
"*1000元/人*30%+"
+
jcdwsl
+
"*15万元/单位*20%+"
+
yxbzsl
+
"*2万元/班站*20%="
+
sum
;
}
}
...
...
@@ -252,10 +246,10 @@ public class SjFybpZbController extends BaseController
sum
=
sum
.
divide
(
new
BigDecimal
(
10000
)).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
if
(
fyje
.
compareTo
(
sum
)>-
1
){
msg
=
"保存成功!费用总额"
+
fyje
+
"万元不低于"
+
sum
+
"万元。\n计算标准为:"
+
deptCb
.
getJyqlhjysr
()+
"万元*1‰*30%+"
+
jcrysl
+
"*1000元/人*40%+"
+
jcdwsl
+
"*5万元/单位*30%="
+
sum
;
+
deptCb
.
getJyqlhjysr
()
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
)
+
"万元*1‰*30%+"
+
jcrysl
+
"*1000元/人*40%+"
+
jcdwsl
+
"*5万元/单位*30%="
+
sum
;
}
else
{
msg
=
"保存成功!费用总额"
+
fyje
+
"万元低于"
+
sum
+
"万元。\n计算标准为:"
+
deptCb
.
getJyqlhjysr
()+
"万吨*2元/吨*30%+"
+
jcrysl
+
"*1000元/人*40%+"
+
jcdwsl
+
"*5万元/单位*30%="
+
sum
;
+
deptCb
.
getJyqlhjysr
()
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
)
+
"万吨*2元/吨*30%+"
+
jcrysl
+
"*1000元/人*40%+"
+
jcdwsl
+
"*5万元/单位*30%="
+
sum
;
}
}
}
...
...
@@ -351,7 +345,7 @@ public class SjFybpZbController extends BaseController
sjFybpZb
.
setJlflag
(
false
);
}
sjFybpZb
.
setJsbz
(
"计算标准为:"
+
deptCb
.
getJyqlhjysr
()+
"万吨*2元/吨*30%+"
+
jcrysl
+
"*1000元/人*30%+"
+
jcdwsl
+
"*15万元/单位*20%+"
+
yxbzsl
+
"*2万元/班站*20%="
+
sum
);
+
deptCb
.
getJyqlhjysr
()
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
)
+
"万吨*2元/吨*30%+"
+
jcrysl
+
"*1000元/人*30%+"
+
jcdwsl
+
"*15万元/单位*20%+"
+
yxbzsl
+
"*2万元/班站*20%="
+
sum
);
sjFybpZb
.
setTqbz
(
"交油气量(万吨)×2 元/吨×30%+基层人员数量×1000 元/人×30%+\n"
+
"基层单位数量×15 万元/单位×20%+一线班站数量×2 万元/班站×20%"
);
...
...
@@ -371,7 +365,7 @@ public class SjFybpZbController extends BaseController
sjFybpZb
.
setJlflag
(
false
);
}
sjFybpZb
.
setJsbz
(
"计算标准为:"
+
deptCb
.
getJyqlhjysr
()+
"万吨*2元/吨*30%+"
+
jcrysl
+
"*1000元/人*40%+"
+
jcdwsl
+
"*15万元/单位*30%="
+
sum
);
+
deptCb
.
getJyqlhjysr
()
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
)
+
"万吨*2元/吨*30%+"
+
jcrysl
+
"*1000元/人*40%+"
+
jcdwsl
+
"*15万元/单位*30%="
+
sum
);
sjFybpZb
.
setTqbz
(
"经营收入(万元)×1‰×30%+基层人员数量×1000 元/人×40%+基层\n"
+
"单位数量×15 万元/单位×30%"
);
}
else
{
...
...
@@ -389,7 +383,7 @@ public class SjFybpZbController extends BaseController
sjFybpZb
.
setJlflag
(
false
);
}
sjFybpZb
.
setJsbz
(
"计算标准为:"
+
deptCb
.
getJyqlhjysr
()+
"万吨*2元/吨*30%+"
+
jcrysl
+
"*1000元/人*30%+"
+
jcdwsl
+
"*15万元/单位*20%+"
+
yxbzsl
+
"*2万元/班站*20%="
+
sum
);
+
deptCb
.
getJyqlhjysr
()
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
)
+
"万吨*2元/吨*30%+"
+
jcrysl
+
"*1000元/人*30%+"
+
jcdwsl
+
"*15万元/单位*20%+"
+
yxbzsl
+
"*2万元/班站*20%="
+
sum
);
sjFybpZb
.
setTqbz
(
"经营收入(万元)×1‰×30%+基层人员数量×1000 元/人×30%+基层\n"
+
"单位数量×15 万元/单位×20%+一线班站数量×2 万元/班站×20%"
);
}
...
...
@@ -407,7 +401,7 @@ public class SjFybpZbController extends BaseController
sjFybpZb
.
setJlflag
(
false
);
}
sjFybpZb
.
setJsbz
(
"计算标准为:"
+
deptCb
.
getJyqlhjysr
()+
"万吨*2元/吨*30%+"
+
jcrysl
+
"*1000元/人*40%+"
+
jcdwsl
+
"*5万元/单位*30%="
+
sum
);
+
deptCb
.
getJyqlhjysr
()
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
)
+
"万吨*2元/吨*30%+"
+
jcrysl
+
"*1000元/人*40%+"
+
jcdwsl
+
"*5万元/单位*30%="
+
sum
);
sjFybpZb
.
setTqbz
(
"经营收入(万元)×1‰×30%+基层人员数量×1000 元/人×40%+基层\n"
+
"单位数量×5 万元/单位×30%"
);
}
...
...
@@ -417,6 +411,4 @@ public class SjFybpZbController extends BaseController
return
success
(
sjFybpZb
);
}
}
qianhe-ydsj/src/main/java/com/qianhe/controller/SjLhscController.java
View file @
728aae48
package
com
.
qianhe
.
controller
;
import
java.io.IOException
;
import
java.io.UnsupportedEncodingException
;
import
java.net.URLDecoder
;
import
java.util.Base64
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
cn.javaex.officejj.word.WordUtils
;
import
com.alibaba.fastjson2.JSONObject
;
import
com.qianhe.common.utils.DateUtils
;
import
com.qianhe.common.utils.StringUtils
;
import
com.qianhe.domain.Vo.SjLhscVo
;
import
org.apache.poi.xwpf.usermodel.XWPFDocument
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
...
@@ -45,6 +57,32 @@ public class SjLhscController extends BaseController
public
TableDataInfo
list
(
SjLhsc
sjLhsc
)
{
startPage
();
String
nd
=
""
;
if
(
StringUtils
.
isNotEmpty
(
sjLhsc
.
getNd
())){
nd
=
sjLhsc
.
getNd
();
}
String
startJd
=
""
;
String
endJd
=
""
;
if
(
StringUtils
.
isNotEmpty
(
sjLhsc
.
getJd
())){
String
jd
=
sjLhsc
.
getJd
();
if
(
"1"
.
equals
(
jd
)){
startJd
=
nd
+
"-01"
;
endJd
=
nd
+
"-03"
;
}
else
if
(
"2"
.
equals
(
jd
)){
startJd
=
nd
+
"-04"
;
endJd
=
nd
+
"-06"
;
}
if
(
"3"
.
equals
(
jd
)){
startJd
=
nd
+
"-07"
;
endJd
=
nd
+
"-09"
;
}
if
(
"4"
.
equals
(
jd
)){
startJd
=
nd
+
"-10"
;
endJd
=
nd
+
"-12"
;
}
}
sjLhsc
.
setStartJd
(
startJd
);
sjLhsc
.
setEndJd
(
endJd
);
List
<
SjLhsc
>
list
=
sjLhscService
.
selectSjLhscList
(
sjLhsc
);
return
getDataTable
(
list
);
}
...
...
@@ -57,6 +95,31 @@ public class SjLhscController extends BaseController
public
TableDataInfo
listBySj
(
SjLhsc
sjLhsc
)
{
startPage
();
String
nd
=
""
;
if
(
StringUtils
.
isNotEmpty
(
sjLhsc
.
getNd
())){
nd
=
sjLhsc
.
getNd
();
}
String
startJd
=
""
;
String
endJd
=
""
;
if
(
StringUtils
.
isNotEmpty
(
sjLhsc
.
getJd
())){
String
jd
=
sjLhsc
.
getJd
();
if
(
"1"
.
equals
(
jd
)){
startJd
=
nd
+
"-01"
;
endJd
=
nd
+
"-03"
;
}
else
if
(
"2"
.
equals
(
jd
)){
startJd
=
nd
+
"-04"
;
endJd
=
nd
+
"-06"
;
}
if
(
"3"
.
equals
(
jd
)){
startJd
=
nd
+
"-07"
;
endJd
=
nd
+
"-09"
;
}
if
(
"4"
.
equals
(
jd
)){
startJd
=
nd
+
"-10"
;
endJd
=
nd
+
"-12"
;
}
}
sjLhsc
.
setStartJd
(
startJd
);
sjLhsc
.
setEndJd
(
endJd
);
List
<
SjLhsc
>
list
=
sjLhscService
.
selectSjLhscList
(
sjLhsc
);
return
getDataTable
(
list
);
}
...
...
@@ -89,8 +152,12 @@ public class SjLhscController extends BaseController
@PreAuthorize
(
"@ss.hasPermi('system:sjLhsc:add')"
)
@Log
(
title
=
"三基-例会上传"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
SjLhsc
sjLhsc
)
{
public
AjaxResult
add
(
@RequestBody
SjLhsc
sjLhsc
)
throws
Exception
{
sjLhsc
.
setYxqk
(
URLDecoder
.
decode
(
sjLhsc
.
getYxqk
(),
"utf-8"
));
sjLhsc
.
setJjwt
(
URLDecoder
.
decode
(
sjLhsc
.
getJjwt
(),
"utf-8"
));
sjLhsc
.
setTgjy
(
URLDecoder
.
decode
(
sjLhsc
.
getTgjy
(),
"utf-8"
));
sjLhsc
.
setLdyq
(
URLDecoder
.
decode
(
sjLhsc
.
getLdyq
(),
"utf-8"
));
sjLhsc
.
setCzwt
(
URLDecoder
.
decode
(
sjLhsc
.
getCzwt
(),
"utf-8"
));
return
toAjax
(
sjLhscService
.
insertSjLhsc
(
sjLhsc
));
}
...
...
@@ -100,8 +167,12 @@ public class SjLhscController extends BaseController
@PreAuthorize
(
"@ss.hasPermi('system:sjLhsc:edit')"
)
@Log
(
title
=
"三基-例会上传"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
SjLhsc
sjLhsc
)
{
public
AjaxResult
edit
(
@RequestBody
SjLhsc
sjLhsc
)
throws
UnsupportedEncodingException
{
sjLhsc
.
setYxqk
(
URLDecoder
.
decode
(
sjLhsc
.
getYxqk
(),
"utf-8"
));
sjLhsc
.
setJjwt
(
URLDecoder
.
decode
(
sjLhsc
.
getJjwt
(),
"utf-8"
));
sjLhsc
.
setTgjy
(
URLDecoder
.
decode
(
sjLhsc
.
getTgjy
(),
"utf-8"
));
sjLhsc
.
setLdyq
(
URLDecoder
.
decode
(
sjLhsc
.
getLdyq
(),
"utf-8"
));
sjLhsc
.
setCzwt
(
URLDecoder
.
decode
(
sjLhsc
.
getCzwt
(),
"utf-8"
));
return
toAjax
(
sjLhscService
.
updateSjLhsc
(
sjLhsc
));
}
...
...
@@ -125,7 +196,6 @@ public class SjLhscController extends BaseController
@PostMapping
(
"/tj"
)
public
AjaxResult
tj
(
@RequestBody
SjLhsc
sjLhsc
)
{
return
toAjax
(
sjLhscService
.
tj
(
sjLhsc
));
}
...
...
@@ -143,6 +213,16 @@ public class SjLhscController extends BaseController
return
getDataTable
(
list
);
}
public
String
escapespecialcharacters
(
String
input
)
{
if
(
StringUtils
.
isEmpty
(
input
)){
return
""
;
}
String
escaped
=
input
.
replaceAll
(
">"
,
">"
)
.
replaceAll
(
"<"
,
"<"
)
.
replaceAll
(
"<="
,
"<="
)
.
replaceAll
(
">="
,
"<="
);
return
escaped
;
}
/**
* 统计是否上传(三级)
...
...
@@ -158,8 +238,8 @@ public class SjLhscController extends BaseController
}
String
startJd
=
""
;
String
endJd
=
""
;
if
(
StringUtils
.
isNotEmpty
(
vo
.
getJ
b
())){
String
jd
=
vo
.
getJ
b
();
if
(
StringUtils
.
isNotEmpty
(
vo
.
getJ
d
())){
String
jd
=
vo
.
getJ
d
();
if
(
"1"
.
equals
(
jd
)){
startJd
=
nd
+
"-01"
;
endJd
=
nd
+
"-03"
;
...
...
@@ -195,8 +275,8 @@ public class SjLhscController extends BaseController
}
String
startJd
=
""
;
String
endJd
=
""
;
if
(
StringUtils
.
isNotEmpty
(
vo
.
getJ
b
())){
String
jd
=
vo
.
getJ
b
();
if
(
StringUtils
.
isNotEmpty
(
vo
.
getJ
d
())){
String
jd
=
vo
.
getJ
d
();
if
(
"1"
.
equals
(
jd
)){
startJd
=
nd
+
"-01"
;
endJd
=
nd
+
"-03"
;
...
...
@@ -231,8 +311,8 @@ public class SjLhscController extends BaseController
}
String
startJd
=
""
;
String
endJd
=
""
;
if
(
StringUtils
.
isNotEmpty
(
vo
.
getJ
b
())){
String
jd
=
vo
.
getJ
b
();
if
(
StringUtils
.
isNotEmpty
(
vo
.
getJ
d
())){
String
jd
=
vo
.
getJ
d
();
if
(
"1"
.
equals
(
jd
)){
startJd
=
nd
+
"-01"
;
endJd
=
nd
+
"-03"
;
...
...
@@ -268,8 +348,8 @@ public class SjLhscController extends BaseController
}
String
startJd
=
""
;
String
endJd
=
""
;
if
(
StringUtils
.
isNotEmpty
(
vo
.
getJ
b
())){
String
jd
=
vo
.
getJ
b
();
if
(
StringUtils
.
isNotEmpty
(
vo
.
getJ
d
())){
String
jd
=
vo
.
getJ
d
();
if
(
"1"
.
equals
(
jd
)){
startJd
=
nd
+
"-01"
;
endJd
=
nd
+
"-03"
;
...
...
@@ -300,6 +380,31 @@ public class SjLhscController extends BaseController
{
startPage
();
sjLhsc
.
setZt
(
"已提交"
);
String
nd
=
""
;
if
(
StringUtils
.
isNotEmpty
(
sjLhsc
.
getNd
())){
nd
=
sjLhsc
.
getNd
();
}
String
startJd
=
""
;
String
endJd
=
""
;
if
(
StringUtils
.
isNotEmpty
(
sjLhsc
.
getJd
())){
String
jd
=
sjLhsc
.
getJd
();
if
(
"1"
.
equals
(
jd
)){
startJd
=
nd
+
"-01"
;
endJd
=
nd
+
"-03"
;
}
else
if
(
"2"
.
equals
(
jd
)){
startJd
=
nd
+
"-04"
;
endJd
=
nd
+
"-06"
;
}
if
(
"3"
.
equals
(
jd
)){
startJd
=
nd
+
"-07"
;
endJd
=
nd
+
"-09"
;
}
if
(
"4"
.
equals
(
jd
)){
startJd
=
nd
+
"-10"
;
endJd
=
nd
+
"-12"
;
}
}
sjLhsc
.
setStartJd
(
startJd
);
sjLhsc
.
setEndJd
(
endJd
);
List
<
SjLhsc
>
list
=
sjLhscService
.
selectSjLhscLhgxList
(
sjLhsc
);
return
getDataTable
(
list
);
}
...
...
@@ -312,4 +417,23 @@ public class SjLhscController extends BaseController
{
return
success
(
sjLhscService
.
selectSjLhscById
(
id
));
}
/**
* 导出word
* @param response
*/
@PostMapping
(
"/export_word"
)
public
void
export_word
(
HttpServletResponse
response
,
SjLhsc
sjLhsc
)
throws
Exception
{
SjLhsc
sjLhsc1
=
sjLhscService
.
selectSjLhscById
(
sjLhsc
.
getId
());
//获取模板
XWPFDocument
word
=
WordUtils
.
getDocxFromResource
(
"/wordTemp/lhmb.docx"
);
String
s
=
JSONObject
.
toJSONString
(
sjLhsc1
);
Map
<
String
,
Object
>
map
=
JSONObject
.
parseObject
(
s
,
Map
.
class
);
map
.
put
(
"hyrq"
,
DateUtils
.
parseDateToStr
(
"yyyy-MM-dd"
,
sjLhsc1
.
getHyrq
()));
XWPFDocument
word1
=
WordUtils
.
writeDocx
(
word
,
map
);
WordUtils
.
download
(
response
,
word1
,
sjLhsc1
.
getHymc
()+
".docx"
);
}
}
qianhe-ydsj/src/main/java/com/qianhe/domain/SjLhsc.java
View file @
728aae48
...
...
@@ -116,4 +116,11 @@ public class SjLhsc extends BaseEntity
private
String
deptName
;
private
String
startJd
;
private
String
endJd
;
/**
* 季度
*/
private
String
jd
;
}
qianhe-ydsj/src/main/java/com/qianhe/domain/Vo/SjLhscVo.java
View file @
728aae48
...
...
@@ -34,7 +34,7 @@ public class SjLhscVo extends BaseEntity
/**
* 季度
*/
private
String
j
b
;
private
String
j
d
;
/** 状态(已提交、未提交) */
private
String
zt
;
...
...
qianhe-ydsj/src/main/resources/mapper/SjFybpMapper.xml
View file @
728aae48
...
...
@@ -176,10 +176,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select
id=
"tjtbByfylx"
resultType=
"com.qianhe.domain.Vo.SjfybpVo"
>
select
b.fylx,IFNULL(count(b.id),0) zsl,IFNULL(sum(b.fyje),0) xmje,
IFNULL(sum(c.syje),
0) ysyje,e.dict_label fylxmc
b.fylx,IFNULL(count(b.id),0) zsl,IFNULL(sum(b.fyje),0) xmje,
IFNULL(sum(b.ysyje ),
0) ysyje,e.dict_label fylxmc
from sj_fybp_zb a
left join sj_fybp b on a.id = b.zb_id
left join sj_fybp_wh c on b.id = c.fybp_id
left join sys_dept d on a.dept_id=d.dept_id
left join sys_dict_data e on b.fylx=e.dict_value and e.dict_type='fy_lx'
where 1=1
...
...
@@ -192,10 +192,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select
id=
"tjtbByDept"
resultType=
"com.qianhe.domain.Vo.SjfybpVo"
>
select
a.dept_id,d.dept_name,IFNULL(count(b.id),0) zsl,IFNULL(sum(b.fyje),0) xmje,
IFNULL(sum(c.syje),
0) ysyje
a.dept_id,d.dept_name,IFNULL(count(b.id),0) zsl,IFNULL(sum(b.fyje),0) xmje,
IFNULL(sum(b.ysyje ),
0) ysyje
from sj_fybp_zb a
left join sj_fybp b on a.id = b.zb_id
left join sj_fybp_wh c on b.id = c.fybp_id
left join sys_dept d on a.dept_id=d.dept_id
where 1=1
<if
test=
"deptId != null and deptId != ''"
>
and (a.dept_id = #{deptId} or find_in_set(#{deptId},d.ancestors))
</if>
...
...
@@ -207,7 +207,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select
id=
"selectSjFybpCtList"
resultMap=
"SjFybpResult"
>
select
a.dept_id,b.id,b.zb_id,b.fymc,b.fylx,
b
.fyrq,b.fyje,b.fyms,d.dept_name,b.ysyje
a.dept_id,b.id,b.zb_id,b.fymc,b.fylx,
a
.fyrq,b.fyje,b.fyms,d.dept_name,b.ysyje
from sj_fybp_zb a left join
sj_fybp b on a.id=b.zb_id
left join sys_dept d on a.dept_id=d.dept_id
...
...
qianhe-ydsj/src/main/resources/mapper/SjFybpZbMapper.xml
View file @
728aae48
...
...
@@ -121,8 +121,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select
id=
"selectSjFybpZbById"
parameterType=
"Long"
resultMap=
"SjFybpZbResult"
>
select a.id, a.fyrq, a.dept_id, a.fyje, a.zt, a.tjr, a.tjrq, a.sprq, a.spr, a.ysyje, a.spyj, a.create_by, a.create_time, a.update_by, a.update_time, a.remark, a.yl1, a.yl2, a.yl3, a.yl4, a.yl5
select a.id, a.fyrq, a.dept_id, a.fyje, a.zt, a.tjr, a.tjrq, a.sprq, a.spr, a.ysyje, a.spyj, a.create_by, a.create_time, a.update_by, a.update_time, a.remark, a.yl1, a.yl2, a.yl3, a.yl4, a.yl5
,d.dept_name
from sj_fybp_zb a
left join sys_dept d on a.dept_id=d.dept_id
where a.id = #{id}
</select>
...
...
qianhe-ydsj/src/main/resources/mapper/SjLhscMapper.xml
View file @
728aae48
...
...
@@ -81,10 +81,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"yl3 != null and yl3 != ''"
>
and yl3 = #{yl3}
</if>
<if
test=
"yl4 != null and yl4 != ''"
>
and yl4 = #{yl4}
</if>
<if
test=
"yl5 != null and yl5 != ''"
>
and yl5 = #{yl5}
</if>
<if
test=
"nd != null and nd != ''"
>
and DATE_FORMAT(hyrq,'%Y')=#{nd}
</if>
<if
test=
"startJd !=null and startJd !=''"
>
and DATE_FORMAT(hyrq,'%Y-%m')>=#{startJd}
</if>
<if
test=
"endJd !=null and endJd !=''"
>
and DATE_FORMAT(hyrq,'%Y-%m')
<
=#{endJd}
</if>
<!-- 数据范围过滤 -->
${params.dataScope}
</where>
order by hyrq desc
</select>
<select
id=
"selectSjLhscLhgxList"
parameterType=
"SjLhsc"
resultMap=
"SjLhscResult"
>
<include
refid=
"selectSjLhscVo"
/>
...
...
@@ -108,45 +111,59 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"yl3 != null and yl3 != ''"
>
and yl3 = #{yl3}
</if>
<if
test=
"yl4 != null and yl4 != ''"
>
and yl4 = #{yl4}
</if>
<if
test=
"yl5 != null and yl5 != ''"
>
and yl5 = #{yl5}
</if>
<if
test=
"
nd != null and nd != ''"
>
and DATE_FORMAT(hyrq,'%Y')=#{nd}
</if>
<if
test=
"
startJd !=null and startJd !=''"
>
and DATE_FORMAT(hyrq,'%Y-%m')>=#{startJd}
</if>
<if
test=
"endJd !=null and endJd !=''"
>
and DATE_FORMAT(hyrq,'%Y-%m')
<
=#{endJd}
</if>
</where>
</select>
<select
id=
"selectSjLhscById"
parameterType=
"Long"
resultMap=
"SjLhscResult"
>
select a.id, a.hymc, a.hyrq, a.dept_id, a.hydd, a.chry, a.yxqk, a.jjwt, a.czwt, a.tgjy, a.ldyq, a.zt, a.dwjb, a.tjr, a.tjrq, a.create_by, a.create_time, a.update_by, a.update_time, a.remark, a.yl1, a.yl2, a.yl3, a.yl4, a.yl5
select a.id, a.hymc, a.hyrq, a.dept_id, a.hydd, a.chry, a.yxqk, a.jjwt, a.czwt, a.tgjy, a.ldyq, a.zt, a.dwjb, a.tjr, a.tjrq, a.create_by, a.create_time, a.update_by, a.update_time, a.remark, a.yl1, a.yl2, a.yl3, a.yl4, a.yl5
,d.dept_name
from sj_lhsc a
left join sys_dept d on a.dept_id=d.dept_id
where a.id = #{id}
</select>
<select
id=
"selectSjLhscWtListById"
resultMap=
"SjLhscWtResult"
>
select *from sj_lhsc_wt where lhsc_id=#{id}
</select>
<select
id=
"tjBysfsc"
resultType=
"com.qianhe.domain.Vo.SjLhscVo"
>
select d.dept_id,d.dept_name,IFNULL(zt,'未提交') zt
select d.dept_id,d.dept_name,IFNULL(a.zt, '未提交') zt from sys_dept d left join
(
select d.dept_id, d.dept_name, IFNULL(zt, '未提交') zt
from sys_dept d
left join sj_lhsc lh on d.dept_id =lh.dept_id
left join sj_lhsc lh on d.dept_id =
lh.dept_id
where d.dwjb =#{dwjb}
<if
test=
"deptId != null and deptId != ''"
>
and
lh.dept_id = #{deptId}
</if>
<if
test=
"deptId != null and deptId != ''"
>
and
(lh.dept_id = #{deptId} or find_in_set(#{deptId},d.ancestors))
</if>
<if
test=
"startJd !=null and startJd !=''"
>
and DATE_FORMAT(hyrq,'%Y-%m')>=#{startJd}
</if>
<if
test=
"endJd !=null and endJd !=''"
>
and DATE_FORMAT(hyrq,'%Y-%m')
<
=#{endJd}
</if>
group by d.dept_id
) a on d.dept_id=a.dept_id
where d.dwjb = #{dwjb}
<if
test=
"deptId != null and deptId != ''"
>
and (d.dept_id = #{deptId} or find_in_set(#{deptId},d.ancestors))
</if>
<!-- 数据范围过滤 -->
${params.dataScope}
group by d.dept_id
</select>
<select
id=
"tjByEjJjwtSl"
resultType=
"com.qianhe.domain.Vo.SjLhscVo"
>
select d.dept_id,d.dept_name,IFNULL(jjwtsl,0) jjwtsl from sys_dept d left join
(
select d.dept_id,d.dept_name,count(wt.id) jjwtsl
from sys_dept d
left join sj_lhsc lh on d.dept_id =lh.dept_id
left join sj_lhsc_wt wt on lh.id=wt.lhsc_id
left join sj_lhsc lh on d.dept_id =lh.dept_id
left join sj_lhsc_wt wt on lh.id=wt.lhsc_id
where d.dwjb =#{dwjb}
<if
test=
"deptId != null and deptId != ''"
>
and
lh.dept_id = #{deptId}
</if>
<if
test=
"deptId != null and deptId != ''"
>
and
(lh.dept_id = #{deptId} or find_in_set(#{deptId},d.ancestors))
</if>
<if
test=
"startJd !=null and startJd !=''"
>
and DATE_FORMAT(hyrq,'%Y-%m')>=#{startJd}
</if>
<if
test=
"endJd !=null and endJd !=''"
>
and DATE_FORMAT(hyrq,'%Y-%m')
<
=#{endJd}
</if>
group by d.dept_id) a
on d.dept_id=a.dept_id
where d.dwjb =#{dwjb}
<if
test=
"deptId != null and deptId != ''"
>
and (d.dept_id = #{deptId} or find_in_set(#{deptId},d.ancestors))
</if>
<!-- 数据范围过滤 -->
${params.dataScope}
group by d.dept_id
</select>
...
...
qianhe-ydsj/src/main/resources/wordTemp/lhmb.docx
0 → 100644
View file @
728aae48
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