Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
tianjin-cement
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
竹天卫
tianjin-cement
Commits
09781204
Commit
09781204
authored
Oct 15, 2020
by
竹天卫
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://111.203.232.171:8888/zhutianwei/tianjin-cement
parents
c9bbce78
29e2b3a1
Show whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
216 additions
and
144 deletions
+216
-144
NonStandardApprovalController.java
...nt/business/controller/NonStandardApprovalController.java
+2
-2
NonStandardValueController.java
...ement/business/controller/NonStandardValueController.java
+23
-10
QualityApplyController.java
...sc/cement/business/controller/QualityApplyController.java
+9
-40
QualityController.java
...wise/sc/cement/business/controller/QualityController.java
+2
-2
SysUserController.java
...wise/sc/cement/business/controller/SysUserController.java
+10
-20
NonStandardApproval.java
...n/wise/sc/cement/business/entity/NonStandardApproval.java
+2
-2
NonStandardValue.java
...a/cn/wise/sc/cement/business/entity/NonStandardValue.java
+6
-2
SysUserMapper.java
...java/cn/wise/sc/cement/business/mapper/SysUserMapper.java
+3
-0
NonStandardApprovalMapper.xml
.../cement/business/mapper/xml/NonStandardApprovalMapper.xml
+1
-1
NonStandardValueMapper.xml
.../sc/cement/business/mapper/xml/NonStandardValueMapper.xml
+8
-4
SysUserMapper.xml
...a/cn/wise/sc/cement/business/mapper/xml/SysUserMapper.xml
+36
-7
NonStandardApprovalQuery.java
...cement/business/model/query/NonStandardApprovalQuery.java
+3
-0
NonStandardValueQuery.java
...sc/cement/business/model/query/NonStandardValueQuery.java
+2
-2
NonStandardApplyVo.java
.../wise/sc/cement/business/model/vo/NonStandardApplyVo.java
+1
-1
NonStandardApprovalVo.java
...se/sc/cement/business/model/vo/NonStandardApprovalVo.java
+7
-4
NonStandardValueVo.java
.../wise/sc/cement/business/model/vo/NonStandardValueVo.java
+7
-4
INonStandardApprovalService.java
.../cement/business/service/INonStandardApprovalService.java
+1
-2
INonStandardValueService.java
.../sc/cement/business/service/INonStandardValueService.java
+3
-4
ISysUserService.java
...a/cn/wise/sc/cement/business/service/ISysUserService.java
+10
-1
NonStandardApplyServiceImpl.java
...nt/business/service/impl/NonStandardApplyServiceImpl.java
+2
-2
NonStandardApprovalServiceImpl.java
...business/service/impl/NonStandardApprovalServiceImpl.java
+4
-4
NonStandardValueServiceImpl.java
...nt/business/service/impl/NonStandardValueServiceImpl.java
+15
-13
NormProductionServiceImpl.java
...ment/business/service/impl/NormProductionServiceImpl.java
+2
-1
UserServiceImpl.java
...wise/sc/cement/business/service/impl/UserServiceImpl.java
+57
-14
WordUtil.java
...c/main/java/cn/wise/sc/cement/business/util/WordUtil.java
+0
-2
No files found.
cement-business/src/main/java/cn/wise/sc/cement/business/controller/NonStandardApprovalController.java
View file @
09781204
...
...
@@ -106,9 +106,9 @@ public class NonStandardApprovalController {
@ApiOperation
(
"委托单位审批导出列表"
)
@PostMapping
(
"/exportList"
)
public
void
exportList
(
Integer
status
,
String
filename
,
String
userId
,
String
name
,
HttpServletResponse
response
)
{
public
void
exportList
(
String
filename
,
String
userId
,
String
name
,
HttpServletResponse
response
)
{
try
{
iNonStandardApprovalService
.
exportList
(
status
,
filename
,
userId
,
name
,
response
);
iNonStandardApprovalService
.
exportList
(
filename
,
userId
,
name
,
response
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"非标产值申请导出列表{}"
,
e
);
}
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/controller/NonStandardValueController.java
View file @
09781204
...
...
@@ -2,6 +2,7 @@ package cn.wise.sc.cement.business.controller;
import
cn.hutool.core.date.DateTime
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.wise.sc.cement.business.entity.NonStandardValue
;
import
cn.wise.sc.cement.business.model.BaseResponse
;
import
cn.wise.sc.cement.business.model.PageQuery
;
...
...
@@ -53,11 +54,17 @@ public class NonStandardValueController {
@GetMapping
(
"/user_id"
)
@ApiOperation
(
"非标产值统计"
)
public
BaseResponse
nonValue
(
PageQuery
pageQuery
,
String
start
,
String
end
)
{
Date
startParse
=
DateUtil
.
parse
(
start
);
Date
endParse
=
DateUtil
.
parse
(
end
);
public
BaseResponse
nonValue
(
PageQuery
pageQuery
,
String
start
,
String
end
,
Integer
groups
)
{
Date
startParse
=
null
;
if
(
StrUtil
.
isNotBlank
(
start
))
{
startParse
=
DateUtil
.
parse
(
start
);
}
Date
endParse
=
null
;
if
(
StrUtil
.
isNotBlank
(
end
))
{
endParse
=
DateUtil
.
parse
(
end
);
}
//将list拆分成分页
BaseResponse
<
List
<
NonStandardValue
>>
baseResponse
=
inonStandardValueService
.
nonValue
(
startParse
,
endParse
);
BaseResponse
<
List
<
NonStandardValue
>>
baseResponse
=
inonStandardValueService
.
nonValue
(
startParse
,
endParse
,
groups
);
List
<
NonStandardValue
>
data
=
baseResponse
.
getData
();
if
(
data
.
size
()
!=
0
)
{
Page
<
NonStandardValue
>
rts
=
PageUtil
.
listConvertToPage
(
data
,
pageQuery
);
...
...
@@ -68,11 +75,17 @@ public class NonStandardValueController {
@ApiOperation
(
value
=
"获取所有已通过的非标产值"
)
@GetMapping
(
"/getList"
)
public
BaseResponse
getList
(
String
start
,
String
end
)
{
public
BaseResponse
getList
(
String
start
,
String
end
,
Integer
groups
)
{
Date
startParse
=
null
;
if
(
StrUtil
.
isNotBlank
(
start
))
{
startParse
=
DateUtil
.
parse
(
start
);
}
Date
endParse
=
null
;
if
(
StrUtil
.
isNotBlank
(
end
))
{
endParse
=
DateUtil
.
parse
(
end
);
}
try
{
Date
startParse
=
DateUtil
.
parse
(
start
);
Date
endParse
=
DateUtil
.
parse
(
end
);
return
inonStandardValueService
.
getList
(
startParse
,
endParse
);
return
inonStandardValueService
.
getList
(
startParse
,
endParse
,
groups
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"获取所有已通过的非标产值{}"
,
e
);
}
...
...
@@ -81,9 +94,9 @@ public class NonStandardValueController {
@ApiOperation
(
"非标产值信息导出列表"
)
@PostMapping
(
"/exportList"
)
public
void
exportList
(
Integer
status
,
String
filename
,
Integer
userId
,
String
name
,
HttpServletResponse
response
)
{
public
void
exportList
(
String
filename
,
Integer
userId
,
String
name
,
HttpServletResponse
response
)
{
try
{
inonStandardValueService
.
exportList
(
status
,
filename
,
userId
,
name
,
response
);
inonStandardValueService
.
exportList
(
filename
,
userId
,
name
,
response
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"非标产值信息导出列表{}"
,
e
);
}
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/controller/QualityApplyController.java
View file @
09781204
...
...
@@ -2,6 +2,7 @@ package cn.wise.sc.cement.business.controller;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.wise.sc.cement.business.entity.QualityApply
;
import
cn.wise.sc.cement.business.model.BaseResponse
;
import
cn.wise.sc.cement.business.service.IQualityApplyService
;
...
...
@@ -58,51 +59,19 @@ public class QualityApplyController {
}
}
public
static
void
main
(
String
[]
args
)
{
List
<
QualityApply
>
list
=
new
ArrayList
<>();
QualityApply
qualityApply
=
new
QualityApply
();
qualityApply
.
setCementCode
(
"test"
);
qualityApply
.
setCreateTime
(
LocalDate
.
now
());
qualityApply
.
setInputResult
(
"[1,2,3,4]"
);
qualityApply
.
setProjectId
(
1
);
qualityApply
.
setProjectName
(
"test"
);
qualityApply
.
setUserName
(
"检测人"
);
qualityApply
.
setSampleCode
(
"001"
);
qualityApply
.
setSampleForm
(
"粉末"
);
qualityApply
.
setSampleName
(
"样品A"
);
qualityApply
.
setTeams
(
"[S,CO3,LiO2,H2Co3]"
);
qualityApply
.
setTeamGroupId
(
1
);
QualityApply
qualityApply1
=
new
QualityApply
();
qualityApply1
.
setCementCode
(
"test"
);
qualityApply1
.
setCreateTime
(
LocalDate
.
now
());
qualityApply1
.
setInputResult
(
"[1,2,3,4]"
);
qualityApply1
.
setProjectId
(
1
);
qualityApply1
.
setProjectName
(
"test"
);
qualityApply1
.
setUserName
(
"检测人"
);
qualityApply1
.
setSampleCode
(
"001"
);
qualityApply1
.
setSampleForm
(
"粉末"
);
qualityApply1
.
setSampleName
(
"样品A"
);
qualityApply1
.
setTeams
(
"[S,CO3,LiO2,H2Co3]"
);
qualityApply1
.
setTeamGroupId
(
1
);
list
.
add
(
qualityApply1
);
String
ss
=
"[\"S\",\"CO3\",\"LiO2\",\"H2Co3\"]"
;
list
.
add
(
qualityApply
);
List
<
String
>
a
=
new
ArrayList
<>();
a
.
add
(
"S"
);
a
.
add
(
"CO3"
);
a
.
add
(
"LiO2"
);
a
.
add
(
"H2Co3"
);
System
.
out
.
println
(
JSON
.
toJSONString
(
a
));
System
.
out
.
println
(
JSON
.
toJSONString
(
list
));
}
@PostMapping
(
"/export"
)
@ApiOperation
(
"导出质量监控"
)
public
void
exportQuality
(
String
startDate
,
String
endDate
,
HttpServletResponse
response
)
{
Date
startParse
=
DateUtil
.
parse
(
startDate
);
Date
endParse
=
DateUtil
.
parse
(
endDate
);
Date
startParse
=
null
;
if
(
StrUtil
.
isNotBlank
(
startDate
))
{
startParse
=
DateUtil
.
parse
(
startDate
);
}
Date
endParse
=
null
;
if
(
StrUtil
.
isNotBlank
(
endDate
))
{
endParse
=
DateUtil
.
parse
(
endDate
);
}
iQualityApplyService
.
exportQuality
(
startParse
,
endParse
,
response
);
}
}
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/controller/QualityController.java
View file @
09781204
...
...
@@ -62,10 +62,10 @@ public class QualityController {
if
(
records
.
size
()
==
0
)
{
return
BaseResponse
.
errorMsg
(
"没找到相关数据!"
);
}
List
<
Integer
>
projectIds
=
records
.
stream
().
map
(
EntrustVo:
:
get
Project
Id
).
collect
(
Collectors
.
toList
());
List
<
Integer
>
projectIds
=
records
.
stream
().
map
(
EntrustVo:
:
getId
).
collect
(
Collectors
.
toList
());
Set
<
Integer
>
qualityApplyIds
=
iQualityApplyService
.
selectQualityApplyStatusByProIds
(
projectIds
);
records
.
forEach
(
arg
->{
if
(
qualityApplyIds
.
contains
(
arg
.
get
Project
Id
())){
if
(
qualityApplyIds
.
contains
(
arg
.
getId
())){
arg
.
setStatusValue
(
"审核完成"
);
arg
.
setStatus
(
10
);
}
else
{
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/controller/SysUserController.java
View file @
09781204
...
...
@@ -20,6 +20,7 @@ import org.slf4j.LoggerFactory;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -116,26 +117,15 @@ public class SysUserController {
}
//待完成接口: 导出
// @ApiOperation("人员详情导出列表")
// @PostMapping("/exportList")
// public void exportList(Integer status,String filename,String name, HttpServletResponse response) {
// try {
// userService.exportList(status, filename,name, response);
// } catch (Exception e) {
// log.debug("人员详情导出列表{}", e);
// }
// }
}
cement-business/src/main/java/cn/wise/sc/cement/business/entity/NonStandardApproval.java
View file @
09781204
...
...
@@ -37,8 +37,8 @@ public class NonStandardApproval implements Serializable {
@ApiModelProperty
(
"起止日期"
)
private
String
statistical
;
@ApiModelProperty
(
"
上报
工时"
)
private
Double
reported
Hours
;
@ApiModelProperty
(
"
审批
工时"
)
private
Double
approval
Hours
;
@ApiModelProperty
(
"状态 0:未提交 1:待审批 2:已通过 3:未通过"
)
private
Integer
status
;
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/entity/NonStandardValue.java
View file @
09781204
...
...
@@ -36,8 +36,8 @@ public class NonStandardValue implements Serializable {
@ApiModelProperty
(
"起止日期"
)
private
String
statistical
;
@ApiModelProperty
(
"
上报
工时"
)
private
Double
reported
Hours
;
@ApiModelProperty
(
"
审批
工时"
)
private
Double
approval
Hours
;
@ApiModelProperty
(
"状态 0:未提交 1:待审批 2:已通过 3:未通过"
)
private
Integer
status
;
...
...
@@ -65,4 +65,8 @@ public class NonStandardValue implements Serializable {
@ApiModelProperty
(
"account"
)
private
String
account
;
@ApiModelProperty
(
"部门id"
)
private
Integer
groups
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/SysUserMapper.java
View file @
09781204
...
...
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
/**
...
...
@@ -24,4 +25,6 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
UserVo
getById
(
Integer
id
);
// List<Map<String,Object>> exportList(@Param("params") Map<String,Object> params);
}
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/NonStandardApprovalMapper.xml
View file @
09781204
...
...
@@ -48,7 +48,7 @@
su.name as 姓名,
su.username as 账户,
na.statistical as 起止日期,
na.
reported_hours as 上报
工时,
na.
approval_hours as 审批
工时,
(
CASE na.status
WHEN 0 THEN '未提交'
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/NonStandardValueMapper.xml
View file @
09781204
...
...
@@ -16,11 +16,14 @@
<if
test=
"params.startTime !=null"
>
and na.start_time = #{params.startTime}
</if>
<if
test=
"params.groups !=null"
>
and su.group_id = #{params.groups}
</if>
</where>
</sql>
<select
id=
"getPage"
resultType=
"cn.wise.sc.cement.business.model.vo.NonStandardValueVo"
>
select na.*,su.name as name,su.username as account
select na.*,su.name as name,su.username as account
,su.group_id as groups
from nonstandard_apply na
LEFT JOIN sys_user su ON su.id = na.user_id
<include
refid=
"where"
/>
...
...
@@ -28,7 +31,7 @@
</select>
<select
id=
"getList"
resultType=
"cn.wise.sc.cement.business.model.vo.NonStandardValueVo"
>
select na.*,su.name as name,su.username as account,na.start_time as startTime
select na.*,su.name as name,su.username as account,na.start_time as startTime
,su.group_id as groups
from nonstandard_apply na
LEFT JOIN sys_user su ON su.id = na.user_id
<include
refid=
"where"
/>
...
...
@@ -41,12 +44,13 @@
su.name as 姓名,
su.username as 账户,
na.statistical as 起止日期,
na.
reported_hours as 上报
工时,
na.
approval_hours as 审批
工时,
na.appraisal_value as 考核公值,
na.final_value as 最终产值,
na.work_type as 工作类别,
na.work_description as 工作描述,
na.start_time as 开始时间
na.start_time as 开始时间,
su.group_id as 部门id
FROM nonstandard_apply na
left join sys_user su on na.user_id = su.id
<include
refid=
"where"
/>
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/SysUserMapper.xml
View file @
09781204
...
...
@@ -39,12 +39,41 @@
</select>
<!-- <select id="exportList" resultType="java.util.HashMap">-->
<!-- SELECT-->
<!-- su.id as 序号,-->
<!-- su.username as 用户账号,-->
<!-- su.name as 真实姓名,-->
<!-- (-->
<!-- CASE su.sex-->
<!-- WHEN 0 THEN '女'-->
<!-- ELSE '男'-->
<!-- END-->
<!-- )as 性别,-->
<!-- su.group_id as 组别id,-->
<!-- su.post_id as 职务id,-->
<!-- su.wx_id as 微信号,-->
<!-- su.qualifications as 职称,-->
<!-- (-->
<!-- CASE su.status-->
<!-- WHEN 0 THEN '禁用'-->
<!-- ELSE '启用'-->
<!-- END-->
<!-- )as 状态,-->
<!-- su.work_year as 工作年限,-->
<!-- su.phone as 手机号,-->
<!-- su.fax as 传真,-->
<!-- su.major as 专业,-->
<!-- su.email as 邮箱,-->
<!-- su.technology_date as 从事本技术领域日期,-->
<!-- su.technology_year as 从事本技术领域年限,-->
<!-- su.education as 文化程度,-->
<!-- su.create_time as 创建时间,-->
<!-- su.update_time as 修改时间,-->
<!-- su.remark as 备注-->
<!-- FROM sys_user su-->
<!-- <include refid="where" />-->
<!-- ORDER BY su.id ASC-->
<!-- </select>-->
</mapper>
cement-business/src/main/java/cn/wise/sc/cement/business/model/query/NonStandardApprovalQuery.java
View file @
09781204
...
...
@@ -16,6 +16,9 @@ import lombok.RequiredArgsConstructor;
public
class
NonStandardApprovalQuery
{
private
Integer
id
;
@ApiModelProperty
(
name
=
"approvalHours"
,
value
=
"审批公值"
)
private
Double
approvalHours
;
@ApiModelProperty
(
name
=
"appraisalValue"
,
value
=
"考核公值"
)
private
Double
appraisalValue
;
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/model/query/NonStandardValueQuery.java
View file @
09781204
...
...
@@ -27,8 +27,8 @@ public class NonStandardValueQuery {
@ApiModelProperty
(
name
=
"statistical"
,
value
=
"起止日期"
)
private
String
statistical
;
@ApiModelProperty
(
name
=
"
reportedHours"
,
value
=
"上报
工时"
)
private
Double
reported
Hours
;
@ApiModelProperty
(
name
=
"
approvalHours"
,
value
=
"审批
工时"
)
private
Double
approval
Hours
;
@ApiModelProperty
(
name
=
"status"
,
value
=
"状态 0:未提交 1:待审批 2:已通过 3:未通过"
)
private
Integer
status
;
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/model/vo/NonStandardApplyVo.java
View file @
09781204
...
...
@@ -26,7 +26,7 @@ public class NonStandardApplyVo {
private
String
statistical
;
@ApiModelProperty
(
"上报工时"
)
private
Integer
reportedHours
;
private
Double
reportedHours
;
@ApiModelProperty
(
"状态 0:未提交 1:待审批 2:已通过 3:未通过"
)
private
Integer
status
;
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/model/vo/NonStandardApprovalVo.java
View file @
09781204
...
...
@@ -26,14 +26,17 @@ public class NonStandardApprovalVo {
@ApiModelProperty
(
"起止时间"
)
private
String
statistical
;
@ApiModelProperty
(
"上报工时"
)
private
Integer
reportedHours
;
@ApiModelProperty
(
"审批工时"
)
private
Double
approvalHours
;
@ApiModelProperty
(
"状态 0:未提交 1:待审批 2:已通过 3:未通过"
)
private
Integer
status
;
@ApiModelProperty
(
"最终产值"
)
private
Integer
finalValue
;
private
Double
finalValue
;
@ApiModelProperty
(
"考核公值"
)
private
Integer
appraisalValue
;
private
Double
appraisalValue
;
@ApiModelProperty
(
"驳回意见"
)
private
String
finalRejection
;
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/model/vo/NonStandardValueVo.java
View file @
09781204
...
...
@@ -25,17 +25,17 @@ public class NonStandardValueVo {
@ApiModelProperty
(
"起止时间"
)
private
String
statistical
;
@ApiModelProperty
(
"
上报
工时"
)
private
Integer
reported
Hours
;
@ApiModelProperty
(
"
审批
工时"
)
private
Double
approval
Hours
;
@ApiModelProperty
(
"状态 0:未提交 1:待审批 2:已通过 3:未通过"
)
private
Integer
status
;
@ApiModelProperty
(
"考核公值"
)
private
Integer
appraisalValue
;
private
Double
appraisalValue
;
@ApiModelProperty
(
"最终产值"
)
private
Integer
finalValue
;
private
Double
finalValue
;
@ApiModelProperty
(
"工作类别"
)
private
String
workType
;
...
...
@@ -48,4 +48,7 @@ public class NonStandardValueVo {
@ApiModelProperty
(
"用户id"
)
private
Integer
userId
;
@ApiModelProperty
(
"部门"
)
private
String
groups
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/INonStandardApprovalService.java
View file @
09781204
...
...
@@ -72,11 +72,10 @@ public interface INonStandardApprovalService extends IService<NonStandardApprova
/**
* 非标产值审批列表导出
* @param status 状态
* @param filename 文件名
* @param userId 账户
* @param name 姓名
* @param response
*/
void
exportList
(
Integer
status
,
String
filename
,
String
userId
,
String
name
,
HttpServletResponse
response
);
void
exportList
(
String
filename
,
String
userId
,
String
name
,
HttpServletResponse
response
);
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/INonStandardValueService.java
View file @
09781204
...
...
@@ -32,22 +32,21 @@ public interface INonStandardValueService extends IService<NonStandardValue> {
BaseResponse<List<NonStandardValue>> nonValue(Integer userId);*/
//计算每个用户提交的非标产值
BaseResponse
<
List
<
NonStandardValue
>>
nonValue
(
Date
start
,
Date
end
);
BaseResponse
<
List
<
NonStandardValue
>>
nonValue
(
Date
start
,
Date
end
,
Integer
groups
);
/**
* 获取所有非标产值信息
*
* @return List
*/
BaseResponse
<
List
<
NonStandardValueVo
>>
getList
(
Date
start
,
Date
end
);
BaseResponse
<
List
<
NonStandardValueVo
>>
getList
(
Date
start
,
Date
end
,
Integer
groups
);
/**
* 非标产值列表导出
* @param status 状态
* @param filename 文件名
* @param userId 用户id
* @param name 姓名
* @param response
*/
void
exportList
(
Integer
status
,
String
filename
,
Integer
userId
,
String
name
,
HttpServletResponse
response
);
void
exportList
(
String
filename
,
Integer
userId
,
String
name
,
HttpServletResponse
response
);
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/ISysUserService.java
View file @
09781204
...
...
@@ -9,6 +9,8 @@ import cn.wise.sc.cement.business.model.vo.UserVo;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
javax.servlet.http.HttpServletResponse
;
/**
* <p>
* 服务类
...
...
@@ -31,7 +33,14 @@ public interface ISysUserService extends IService<SysUser> {
BaseResponse
<
UserVo
>
findById
(
Integer
id
);
/**
* 人员详情列表导出
* @param status 状态
* @param filename 文件名
* @param name 姓名
* @param response
*/
// void exportList(Integer status,String filename,String name, HttpServletResponse response);
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/NonStandardApplyServiceImpl.java
View file @
09781204
...
...
@@ -140,8 +140,8 @@ public class NonStandardApplyServiceImpl extends ServiceImpl<NonStandardApplyMap
for
(
Map
<
String
,
Object
>
m
:
list
)
{
Object
[]
objects
=
new
Object
[
headers
.
length
];
for
(
int
j
=
0
;
j
<
headers
.
length
;
j
++)
{
String
obj
=
m
.
get
(
headers
[
j
]).
toString
();
if
(
j
==
0
){
String
obj
=
m
.
get
(
headers
[
j
])
==
null
?
""
:
m
.
get
(
headers
[
j
])
.
toString
();
if
(
j
==
0
&&
obj
!=
null
){
obj
=
obj
.
split
(
"\\."
)[
0
];
}
objects
[
j
]
=
obj
;
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/NonStandardApprovalServiceImpl.java
View file @
09781204
...
...
@@ -77,8 +77,9 @@ public class NonStandardApprovalServiceImpl extends ServiceImpl<NonStandardAppro
}
if
(
query
.
getMenuId
()==
1
){
//通过
nonStandardApproval
.
setAppraisalValue
(
query
.
getAppraisalValue
());
nonStandardApproval
.
setApprovalHours
(
query
.
getApprovalHours
());
//计算最终产值
Double
finalValue
=
query
.
getAppraisalValue
()
*
nonStandardApproval
.
getReported
Hours
();
Double
finalValue
=
query
.
getAppraisalValue
()
*
query
.
getApproval
Hours
();
nonStandardApproval
.
setFinalValue
(
finalValue
);
nonStandardApproval
.
setStatus
(
2
);
}
else
if
(
query
.
getMenuId
()==
2
){
//拒绝
...
...
@@ -129,9 +130,8 @@ public class NonStandardApprovalServiceImpl extends ServiceImpl<NonStandardAppro
}
@Override
public
void
exportList
(
Integer
status
,
String
filename
,
String
userId
,
String
name
,
HttpServletResponse
response
)
{
public
void
exportList
(
String
filename
,
String
userId
,
String
name
,
HttpServletResponse
response
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"status"
,
status
);
params
.
put
(
"name"
,
name
);
params
.
put
(
"userId"
,
userId
);
List
<
Map
<
String
,
Object
>>
list
=
nonStandardApprovalMapper
.
exportList
(
params
);
...
...
@@ -143,7 +143,7 @@ public class NonStandardApprovalServiceImpl extends ServiceImpl<NonStandardAppro
headers
[
1
]
=
"姓名"
;
headers
[
2
]
=
"账户"
;
headers
[
3
]
=
"起止日期"
;
headers
[
4
]
=
"
上报
工时"
;
headers
[
4
]
=
"
审批
工时"
;
headers
[
5
]
=
"状态"
;
headers
[
6
]
=
"最终产值"
;
headers
[
7
]
=
"考核公值"
;
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/NonStandardValueServiceImpl.java
View file @
09781204
...
...
@@ -44,8 +44,8 @@ public class NonStandardValueServiceImpl extends ServiceImpl<NonStandardValueMap
@Override
//计算每个用户提交的非标产值
public
BaseResponse
<
List
<
NonStandardValue
>>
nonValue
(
Date
start
,
Date
end
){
List
<
NonStandardValueVo
>
data
=
getList
(
start
,
end
).
getData
();
public
BaseResponse
<
List
<
NonStandardValue
>>
nonValue
(
Date
start
,
Date
end
,
Integer
groups
){
List
<
NonStandardValueVo
>
data
=
getList
(
start
,
end
,
groups
).
getData
();
//userId去重
Set
<
Integer
>
ids
=
new
HashSet
<>();
//循环所有NonStandardValue的集合data,找到每个NonStandardValue.getuserId放到set
...
...
@@ -65,7 +65,7 @@ public class NonStandardValueServiceImpl extends ServiceImpl<NonStandardValueMap
NonStandardValue
finalNonStandardValue
=
new
NonStandardValue
();
//初始化最终结果===>不初始化默认为NULL,不能进行+——*/
finalNonStandardValue
.
setId
(
0
);
finalNonStandardValue
.
set
Reported
Hours
(
0
D
);
finalNonStandardValue
.
set
Approval
Hours
(
0
D
);
finalNonStandardValue
.
setFinalValue
(
0
D
);
//todo 为当前userID创建一天展示的产值对象 new 产值对象 ===>传出
for
(
NonStandardValueVo
nonStandardValue:
data
)
{
...
...
@@ -83,15 +83,16 @@ public class NonStandardValueServiceImpl extends ServiceImpl<NonStandardValueMap
finalNonStandardValue
.
setUserId
(
nonStandardValue
.
getUserId
());
finalNonStandardValue
.
setName
(
nonStandardValue
.
getName
());
finalNonStandardValue
.
setAccount
(
nonStandardValue
.
getAccount
());
finalNonStandardValue
.
setGroups
(
nonStandardValue
.
getId
());
Integer
newId
=
finalNonStandardValue
.
getId
()+
1
;
finalNonStandardValue
.
setId
(
newId
);
//只要进来这个if ===> 我拿到了李国庆的其中一条记录
Double
houers
=
nonStandardValue
.
get
Reported
Hours
().
doubleValue
();
Double
new
ReportHours
=
nonStandardValue
.
getReportedHours
()
+
finalNonStandardValue
.
getReported
Hours
();
Double
houers
=
nonStandardValue
.
get
Approval
Hours
().
doubleValue
();
Double
new
ApprovalHours
=
nonStandardValue
.
getApprovalHours
()
+
finalNonStandardValue
.
getApproval
Hours
();
//用新得到的最总工时覆盖掉原来的总工时===>累加
finalNonStandardValue
.
set
ReportedHours
(
newReport
Hours
);
finalNonStandardValue
.
set
ApprovalHours
(
newApproval
Hours
);
Double
finalValue
=
nonStandardValue
.
getFinalValue
().
doubleValue
();
Double
newFinalValue
=
nonStandardValue
.
getFinalValue
()
+
finalNonStandardValue
.
getFinalValue
();
...
...
@@ -105,45 +106,46 @@ public class NonStandardValueServiceImpl extends ServiceImpl<NonStandardValueMap
@Override
public
BaseResponse
<
List
<
NonStandardValueVo
>>
getList
(
Date
start
,
Date
end
)
{
public
BaseResponse
<
List
<
NonStandardValueVo
>>
getList
(
Date
start
,
Date
end
,
Integer
groups
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"start"
,
start
);
params
.
put
(
"end"
,
end
);
params
.
put
(
"status"
,
2
);
params
.
put
(
"groups"
,
groups
);
List
<
NonStandardValueVo
>
list
=
nonStandardValueMapper
.
getList
(
params
);
return
BaseResponse
.
okData
(
list
);
}
@Override
public
void
exportList
(
Integer
status
,
String
filename
,
Integer
userId
,
String
name
,
HttpServletResponse
response
)
{
public
void
exportList
(
String
filename
,
Integer
userId
,
String
name
,
HttpServletResponse
response
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"status"
,
status
);
params
.
put
(
"userId"
,
userId
);
params
.
put
(
"name"
,
name
);
List
<
Map
<
String
,
Object
>>
list
=
nonStandardValueMapper
.
exportList
(
params
);
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
Map
<
String
,
Object
>
map
=
list
.
get
(
0
);
String
[]
headers
=
new
String
[
map
.
size
()
];
String
[]
headers
=
new
String
[
11
];
headers
[
0
]
=
"序号"
;
headers
[
1
]
=
"姓名"
;
headers
[
2
]
=
"账户"
;
headers
[
3
]
=
"起止日期"
;
headers
[
4
]
=
"
上报
工时"
;
headers
[
4
]
=
"
审批
工时"
;
headers
[
5
]
=
"考核公值"
;
headers
[
6
]
=
"最终产值"
;
headers
[
7
]
=
"工作类别"
;
headers
[
8
]
=
"工作描述"
;
headers
[
9
]
=
"开始时间"
;
headers
[
10
]
=
"部门id"
;
List
<
Object
[]>
datas
=
new
ArrayList
<>(
list
.
size
());
for
(
Map
<
String
,
Object
>
m
:
list
)
{
Object
[]
objects
=
new
Object
[
headers
.
length
];
for
(
int
j
=
0
;
j
<
headers
.
length
;
j
++)
{
String
obj
=
m
.
get
(
headers
[
j
]).
toString
();
if
(
j
==
0
){
String
obj
=
m
.
get
(
headers
[
j
])
==
null
?
""
:
m
.
get
(
headers
[
j
])
.
toString
();
if
(
j
==
0
&&
obj
!=
null
){
obj
=
obj
.
split
(
"\\."
)[
0
];
}
objects
[
j
]
=
obj
;
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/NormProductionServiceImpl.java
View file @
09781204
...
...
@@ -371,6 +371,7 @@ public class NormProductionServiceImpl extends ServiceImpl<NormProductionMapper,
Date
startDate
=
null
;
Date
endDate
=
new
Date
();
Integer
group
=
null
;
if
(
start
!=
null
&&
start
!=
0
)
{
startDate
=
DateUtil
.
date
(
start
);
}
...
...
@@ -379,7 +380,7 @@ public class NormProductionServiceImpl extends ServiceImpl<NormProductionMapper,
}
//非标准产值
List
<
NonStandardValue
>
nonStandardValues
=
iNonStandardValueService
.
nonValue
(
startDate
,
endDate
).
getData
();
List
<
NonStandardValue
>
nonStandardValues
=
iNonStandardValueService
.
nonValue
(
startDate
,
endDate
,
group
).
getData
();
//标准产值
List
<
NormProductionStatistics
>
productionStatistics
=
this
.
normProductionStatistics
(
start
,
end
,
name
).
getData
();
//以userId找关系
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/UserServiceImpl.java
View file @
09781204
...
...
@@ -13,10 +13,12 @@ import cn.wise.sc.cement.business.model.query.UserQuery;
import
cn.wise.sc.cement.business.model.vo.ClientVo
;
import
cn.wise.sc.cement.business.model.vo.UserVo
;
import
cn.wise.sc.cement.business.service.ISysUserService
;
import
cn.wise.sc.cement.business.util.ExcelUtil
;
import
cn.wise.sc.cement.business.util.JwtUtil
;
import
cn.wise.sc.cement.business.util.RedisUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.toolkit.CollectionUtils
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.apache.commons.lang3.StringUtils
;
...
...
@@ -28,7 +30,9 @@ import org.springframework.transaction.annotation.Transactional;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -185,19 +189,58 @@ public class UserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impleme
return
BaseResponse
.
okData
(
userVo
);
}
/**
* 人员详情列表导出
* @param status 状态
* @param name 姓名
* @return
*/
// @Override
// public void exportList(Integer status, String filename, String name, HttpServletResponse response) {
// Map<String, Object> params = new HashMap<>();
// params.put("status", status);
// params.put("name", name);
// List<Map<String, Object>> list= userMapper.exportList(params);
//
// if (!CollectionUtils.isEmpty(list)){
// Map<String,Object> map=list.get(0);
// String[] headers=new String[20];
// headers[0] = "序号";
// headers[1] = "用户账号";
// headers[2] = "真实姓名";
// headers[3] = "性别";
// headers[4] = "组别id";
// headers[5] = "职务id";
// headers[6] = "微信号";
// headers[7] = "职称";
// headers[8] = "状态";
// headers[9] = "工作年限";
// headers[10] = "手机号";
// headers[11] = "传真";
// headers[12] = "专业";
// headers[13] = "邮箱";
// headers[14] = "从事本技术领域日期";
// headers[15] = "从事本技术领域年限";
// headers[16] = "文化程度";
// headers[17] = "创建时间";
// headers[18] = "修改时间";
// headers[19] = "备注";
//
// List<Object[]> datas=new ArrayList<>(list.size());
// for (Map<String,Object>m:list){
// Object[] objects=new Object[headers.length];
// for (int j=0;j<headers.length;j++){
// String obj=m.get(headers[j])==null?"":m.get(headers[j]).toString();
// if (j==0 && obj!=null){
// obj=obj.split("\\.")[0];
// }
// objects[j] = obj;
// }
// datas.add(objects);
// }
// ExcelUtil.excelExport(
// filename==null || filename.trim().length() <= 0 ? "人员详情":filename ,headers, datas ,response);
// }
// }
}
cement-business/src/main/java/cn/wise/sc/cement/business/util/WordUtil.java
View file @
09781204
...
...
@@ -3,7 +3,6 @@ package cn.wise.sc.cement.business.util;
import
freemarker.template.Configuration
;
import
freemarker.template.Template
;
import
lombok.extern.slf4j.Slf4j
;
import
javax.servlet.ServletOutputStream
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.File
;
...
...
@@ -61,7 +60,6 @@ public class WordUtil {
out
=
new
OutputStreamWriter
(
fos
,
StandardCharsets
.
UTF_8
);
//变量替换
template
.
process
(
beanParams
,
out
);
FileInputStream
in
=
new
FileInputStream
(
file
);
byte
[]
buffer
=
new
byte
[
in
.
available
()];
...
...
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