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
7921bc67
Commit
7921bc67
authored
Sep 28, 2020
by
mengbali153
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
能力管理--联调
历史档案--联调 非标产值--联调
parent
9336156b
Hide whitespace changes
Inline
Side-by-side
Showing
40 changed files
with
2526 additions
and
0 deletions
+2526
-0
CapabilityManagementController.java
...t/business/controller/CapabilityManagementController.java
+114
-0
HistoryArchivesController.java
...cement/business/controller/HistoryArchivesController.java
+103
-0
NonStandardApplyController.java
...ement/business/controller/NonStandardApplyController.java
+117
-0
NonStandardApprovalController.java
...nt/business/controller/NonStandardApprovalController.java
+113
-0
NonStandardValueController.java
...ement/business/controller/NonStandardValueController.java
+79
-0
CapabilityManagement.java
.../wise/sc/cement/business/entity/CapabilityManagement.java
+55
-0
HistoryArchives.java
...va/cn/wise/sc/cement/business/entity/HistoryArchives.java
+55
-0
NonStandardApply.java
...a/cn/wise/sc/cement/business/entity/NonStandardApply.java
+59
-0
NonStandardApproval.java
...n/wise/sc/cement/business/entity/NonStandardApproval.java
+58
-0
NonStandardValue.java
...a/cn/wise/sc/cement/business/entity/NonStandardValue.java
+61
-0
CapabilityManagementMapper.java
...sc/cement/business/mapper/CapabilityManagementMapper.java
+24
-0
HistoryArchivesMapper.java
...wise/sc/cement/business/mapper/HistoryArchivesMapper.java
+26
-0
NonStandardApplyMapper.java
...ise/sc/cement/business/mapper/NonStandardApplyMapper.java
+27
-0
NonStandardApprovalMapper.java
.../sc/cement/business/mapper/NonStandardApprovalMapper.java
+27
-0
NonStandardValueMapper.java
...ise/sc/cement/business/mapper/NonStandardValueMapper.java
+27
-0
CapabilityManagementMapper.xml
...cement/business/mapper/xml/CapabilityManagementMapper.xml
+26
-0
HistoryArchivesMapper.xml
...e/sc/cement/business/mapper/xml/HistoryArchivesMapper.xml
+25
-0
NonStandardApplyMapper.xml
.../sc/cement/business/mapper/xml/NonStandardApplyMapper.xml
+71
-0
NonStandardApprovalMapper.xml
.../cement/business/mapper/xml/NonStandardApprovalMapper.xml
+74
-0
NonStandardValueMapper.xml
.../sc/cement/business/mapper/xml/NonStandardValueMapper.xml
+58
-0
CapabilityManagementQuery.java
...ement/business/model/query/CapabilityManagementQuery.java
+42
-0
HistoryArchivesQuery.java
.../sc/cement/business/model/query/HistoryArchivesQuery.java
+45
-0
NonStandardApplyQuery.java
...sc/cement/business/model/query/NonStandardApplyQuery.java
+41
-0
NonStandardApprovalQuery.java
...cement/business/model/query/NonStandardApprovalQuery.java
+28
-0
NonStandardValueQuery.java
...sc/cement/business/model/query/NonStandardValueQuery.java
+59
-0
CapabilityManagementVo.java
...e/sc/cement/business/model/vo/CapabilityManagementVo.java
+43
-0
HistoryArchivesVo.java
...n/wise/sc/cement/business/model/vo/HistoryArchivesVo.java
+43
-0
NonStandardApplyVo.java
.../wise/sc/cement/business/model/vo/NonStandardApplyVo.java
+42
-0
NonStandardApprovalVo.java
...se/sc/cement/business/model/vo/NonStandardApprovalVo.java
+38
-0
NonStandardValueVo.java
.../wise/sc/cement/business/model/vo/NonStandardValueVo.java
+48
-0
ICapabilityManagementService.java
...cement/business/service/ICapabilityManagementService.java
+64
-0
IHistoryArchivesService.java
...e/sc/cement/business/service/IHistoryArchivesService.java
+62
-0
INonStandardApplyService.java
.../sc/cement/business/service/INonStandardApplyService.java
+72
-0
INonStandardApprovalService.java
.../cement/business/service/INonStandardApprovalService.java
+75
-0
INonStandardValueService.java
.../sc/cement/business/service/INonStandardValueService.java
+46
-0
CapabilityManagementServiceImpl.java
...usiness/service/impl/CapabilityManagementServiceImpl.java
+100
-0
HistoryArchivesServiceImpl.java
...ent/business/service/impl/HistoryArchivesServiceImpl.java
+96
-0
NonStandardApplyServiceImpl.java
...nt/business/service/impl/NonStandardApplyServiceImpl.java
+131
-0
NonStandardApprovalServiceImpl.java
...business/service/impl/NonStandardApprovalServiceImpl.java
+157
-0
NonStandardValueServiceImpl.java
...nt/business/service/impl/NonStandardValueServiceImpl.java
+95
-0
No files found.
cement-business/src/main/java/cn/wise/sc/cement/business/controller/CapabilityManagementController.java
0 → 100644
View file @
7921bc67
package
cn
.
wise
.
sc
.
cement
.
business
.
controller
;
import
cn.wise.sc.cement.business.entity.CapabilityManagement
;
import
cn.wise.sc.cement.business.model.BaseResponse
;
import
cn.wise.sc.cement.business.model.PageQuery
;
import
cn.wise.sc.cement.business.model.query.CapabilityManagementQuery
;
import
cn.wise.sc.cement.business.service.ICapabilityManagementService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
/**
* <p>
* 前端控制器
* </p>
*
* @author wlb
* @since 2020-09-17
*/
@Api
(
tags
=
"人员详情-能力管理"
)
@RestController
@RequestMapping
(
"/tcdri/capability_management"
)
public
class
CapabilityManagementController
{
private
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
"CapabilityManagementController"
);
@Autowired
private
ICapabilityManagementService
capabilityManagementService
;
@ApiOperation
(
value
=
"能力管理分页,可通过用户id查询能力信息"
)
@GetMapping
(
"/getPage"
)
public
BaseResponse
getPage
(
PageQuery
pageQuery
,
Integer
userId
)
{
try
{
return
capabilityManagementService
.
getPage
(
pageQuery
,
userId
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"能力信息管理分页列表{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"根据默认ID查找能力信息"
)
@GetMapping
(
"/{id}"
)
public
BaseResponse
getById
(
@PathVariable
Integer
id
){
try
{
CapabilityManagement
e
=
capabilityManagementService
.
getById
(
id
);
if
(
e
==
null
){
return
BaseResponse
.
errorMsg
(
"信息错误!"
);
}
return
BaseResponse
.
okData
(
e
);
}
catch
(
Exception
e
){
log
.
debug
(
"能力管理详情{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"获取所有能力信息"
)
@GetMapping
(
"/getList"
)
public
BaseResponse
getList
()
{
try
{
return
capabilityManagementService
.
getList
();
}
catch
(
Exception
e
)
{
log
.
debug
(
"获取所有的能力管理信息{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"新增能力管理信息"
)
@PostMapping
(
"/create"
)
public
BaseResponse
create
(
@RequestBody
CapabilityManagementQuery
query
){
try
{
return
capabilityManagementService
.
create
(
query
);
}
catch
(
Exception
e
){
log
.
debug
(
"新增能力管理信息{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"更新能力管理信息"
)
@PostMapping
(
"/update"
)
public
BaseResponse
update
(
@RequestBody
CapabilityManagementQuery
capabilityManagementQuery
){
try
{
return
capabilityManagementService
.
update
(
capabilityManagementQuery
);
}
catch
(
Exception
e
){
log
.
debug
(
"更新能力管理信息{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"删除能力管理信息"
)
@PostMapping
(
"/delete"
)
public
BaseResponse
delete
(
@RequestBody
Integer
id
){
try
{
return
capabilityManagementService
.
delete
(
id
);
}
catch
(
Exception
e
){
log
.
debug
(
"删除能力管理信息{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
/* @ApiOperation(value = "根据用户id查询数据")
@PostMapping("/delete")
public BaseResponse delete(@RequestBody Integer id){
try {
return capabilityManagementService.delete(id);
}catch (Exception e){
log.debug("删除能力管理信息{}",e);
}
return BaseResponse.errorMsg("失败!");
}*/
}
cement-business/src/main/java/cn/wise/sc/cement/business/controller/HistoryArchivesController.java
0 → 100644
View file @
7921bc67
package
cn
.
wise
.
sc
.
cement
.
business
.
controller
;
import
cn.wise.sc.cement.business.entity.HistoryArchives
;
import
cn.wise.sc.cement.business.model.BaseResponse
;
import
cn.wise.sc.cement.business.model.PageQuery
;
import
cn.wise.sc.cement.business.model.query.HistoryArchivesQuery
;
import
cn.wise.sc.cement.business.service.IHistoryArchivesService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
/**
* <p>
* 前端控制器
* </p>
*
* @author wlb
* @since 2020-09-17
*/
@Api
(
tags
=
"人员详情-历史档案"
)
@RestController
@RequestMapping
(
"/tcdri/history_archives"
)
public
class
HistoryArchivesController
{
private
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
"HistoryArchivesController"
);
@Autowired
private
IHistoryArchivesService
iHistoryArchivesService
;
@ApiOperation
(
value
=
"历史档案分页,可通过用户id查询信息"
)
@GetMapping
(
"/getPage"
)
public
BaseResponse
getPage
(
PageQuery
pageQuery
,
Integer
userId
)
{
try
{
return
iHistoryArchivesService
.
getPage
(
pageQuery
,
userId
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"历史档案分页列表{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"根据默认ID查找历史档案信息"
)
@GetMapping
(
"/{id}"
)
public
BaseResponse
getById
(
@PathVariable
Integer
id
){
try
{
HistoryArchives
e
=
iHistoryArchivesService
.
getById
(
id
);
if
(
e
==
null
){
return
BaseResponse
.
errorMsg
(
"信息错误!"
);
}
return
BaseResponse
.
okData
(
e
);
}
catch
(
Exception
e
){
log
.
debug
(
"档案信息详情{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"获取所有历史档案信息"
)
@GetMapping
(
"/getList"
)
public
BaseResponse
getList
()
{
try
{
return
iHistoryArchivesService
.
getList
();
}
catch
(
Exception
e
)
{
log
.
debug
(
"获取其的历史档案信息{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"新增历史档案"
)
@PostMapping
(
"/create"
)
public
BaseResponse
create
(
@RequestBody
HistoryArchivesQuery
query
){
try
{
return
iHistoryArchivesService
.
create
(
query
);
}
catch
(
Exception
e
){
log
.
debug
(
"新增历史档案{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"更新历史档案"
)
@PostMapping
(
"/update"
)
public
BaseResponse
update
(
@RequestBody
HistoryArchivesQuery
historyArchivesQuery
){
try
{
return
iHistoryArchivesService
.
update
(
historyArchivesQuery
);
}
catch
(
Exception
e
){
log
.
debug
(
"更新历史档案{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"删除历史档案"
)
@PostMapping
(
"/delete"
)
public
BaseResponse
delete
(
@RequestBody
Integer
id
){
try
{
return
iHistoryArchivesService
.
delete
(
id
);
}
catch
(
Exception
e
){
log
.
debug
(
"删除历史档案{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
}
cement-business/src/main/java/cn/wise/sc/cement/business/controller/NonStandardApplyController.java
0 → 100644
View file @
7921bc67
package
cn
.
wise
.
sc
.
cement
.
business
.
controller
;
import
cn.wise.sc.cement.business.entity.NonStandardApply
;
import
cn.wise.sc.cement.business.model.BaseResponse
;
import
cn.wise.sc.cement.business.model.PageQuery
;
import
cn.wise.sc.cement.business.model.query.NonStandardApplyQuery
;
import
cn.wise.sc.cement.business.service.INonStandardApplyService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletResponse
;
/**
* <p>
* 前端控制器
* </p>
*
* @author wlb
* @since 2020-09-23
*/
@Api
(
tags
=
"非标产值-非标产值申请"
)
@RestController
@RequestMapping
(
"/tcdri/nonstandard_apply"
)
public
class
NonStandardApplyController
{
private
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
"NonStandardApplyController"
);
@Autowired
private
INonStandardApplyService
iNonStandardApplyService
;
@ApiOperation
(
value
=
"非标产值申请分页"
)
@ApiImplicitParams
(
value
=
{
@ApiImplicitParam
(
name
=
"status"
,
value
=
"状态0:未申请 1:已通过 2:未通过"
,
paramType
=
"query"
,
dataType
=
"Integer"
)})
@GetMapping
(
"/getPage"
)
public
BaseResponse
getPage
(
PageQuery
pageQuery
,
Integer
status
)
{
try
{
return
iNonStandardApplyService
.
getPage
(
pageQuery
,
status
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"非标产值申请分页列表{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"根据非标产值id查询指定信息"
)
@GetMapping
(
"/{id}"
)
public
BaseResponse
getById
(
@PathVariable
Integer
id
){
try
{
NonStandardApply
e
=
iNonStandardApplyService
.
getById
(
id
);
if
(
e
==
null
){
return
BaseResponse
.
errorMsg
(
"信息错误!"
);
}
return
BaseResponse
.
okData
(
e
);
}
catch
(
Exception
e
){
log
.
debug
(
"非标产值详情{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"获取所有非标产值申请"
)
@GetMapping
(
"/getList"
)
public
BaseResponse
getList
()
{
try
{
return
iNonStandardApplyService
.
getList
();
}
catch
(
Exception
e
)
{
log
.
debug
(
"获取所有的非标产值申请{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"提交申请"
)
@PostMapping
(
"/create"
)
public
BaseResponse
create
(
@RequestBody
NonStandardApplyQuery
query
){
try
{
return
iNonStandardApplyService
.
create
(
query
);
}
catch
(
Exception
e
){
log
.
debug
(
"提交申请{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"修改非标产值信息"
)
@PostMapping
(
"/update"
)
public
BaseResponse
update
(
@RequestBody
NonStandardApplyQuery
nonStandardApplyQuery
){
try
{
return
iNonStandardApplyService
.
update
(
nonStandardApplyQuery
);
}
catch
(
Exception
e
){
log
.
debug
(
"修改非标产值信息{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"删除非标产值申请"
)
@PostMapping
(
"/delete"
)
public
BaseResponse
delete
(
@RequestBody
Integer
id
){
try
{
return
iNonStandardApplyService
.
delete
(
id
);
}
catch
(
Exception
e
){
log
.
debug
(
"删除非标产值申请{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
"非标产值申请导出列表"
)
@PostMapping
(
"/exportList"
)
public
void
exportList
(
Integer
status
,
String
filename
,
String
account
,
String
name
,
HttpServletResponse
response
)
{
try
{
iNonStandardApplyService
.
exportList
(
status
,
filename
,
account
,
name
,
response
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"非标产值申请导出列表{}"
,
e
);
}
}
}
cement-business/src/main/java/cn/wise/sc/cement/business/controller/NonStandardApprovalController.java
0 → 100644
View file @
7921bc67
package
cn
.
wise
.
sc
.
cement
.
business
.
controller
;
import
cn.wise.sc.cement.business.entity.NonStandardApproval
;
import
cn.wise.sc.cement.business.model.BaseResponse
;
import
cn.wise.sc.cement.business.model.PageQuery
;
import
cn.wise.sc.cement.business.model.query.NonStandardApprovalQuery
;
import
cn.wise.sc.cement.business.service.INonStandardApprovalService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletResponse
;
/**
* <p>
* 前端控制器
* </p>
*
* @author wlb
* @since 2020-09-23
*/
@Api
(
tags
=
"非标产值-非标产值审批"
)
@RestController
@RequestMapping
(
"/tcdri/nonestandard_approval"
)
public
class
NonStandardApprovalController
{
private
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
"NoneStandardApprovalController"
);
@Autowired
private
INonStandardApprovalService
iNonStandardApprovalService
;
@ApiOperation
(
value
=
"非标产值审批分页"
)
@GetMapping
(
"/getPage"
)
public
BaseResponse
getPage
(
PageQuery
pageQuery
,
String
name
)
{
try
{
return
iNonStandardApprovalService
.
getPage
(
pageQuery
,
name
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"非标产值审批分页列表{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"根据非标产值审批ID查找指定信息"
)
@GetMapping
(
"/{id}"
)
public
BaseResponse
getById
(
@PathVariable
Integer
id
){
try
{
NonStandardApproval
e
=
iNonStandardApprovalService
.
getById
(
id
);
if
(
e
==
null
){
return
BaseResponse
.
errorMsg
(
"信息错误!"
);
}
return
BaseResponse
.
okData
(
e
);
}
catch
(
Exception
e
){
log
.
debug
(
"根据非标产值审批ID查找指定信息{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"获取所有非标产值审批"
)
@GetMapping
(
"/getList"
)
public
BaseResponse
getList
()
{
try
{
return
iNonStandardApprovalService
.
getList
();
}
catch
(
Exception
e
)
{
log
.
debug
(
"获取所有的非标产值审批{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"审批通过/驳回"
)
@PostMapping
(
"/update"
)
public
BaseResponse
update
(
@RequestBody
NonStandardApprovalQuery
nonStandardApprovalQuery
){
try
{
return
iNonStandardApprovalService
.
update
(
nonStandardApprovalQuery
);
}
catch
(
Exception
e
){
log
.
debug
(
"审批通过/驳回{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"审批操作按钮实现"
)
@PostMapping
(
"/status"
)
public
BaseResponse
status
(
Integer
status
,
Integer
id
){
try
{
return
iNonStandardApprovalService
.
status
(
status
,
id
);
}
catch
(
Exception
e
){
log
.
debug
(
"审批操作实现{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"删除非标产值审批"
)
@PostMapping
(
"/delete"
)
public
BaseResponse
delete
(
@RequestBody
Integer
id
){
try
{
return
iNonStandardApprovalService
.
delete
(
id
);
}
catch
(
Exception
e
){
log
.
debug
(
"删除非标产值审批{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
"委托单位审批导出列表"
)
@PostMapping
(
"/exportList"
)
public
void
exportList
(
Integer
id
,
String
filename
,
String
account
,
String
name
,
HttpServletResponse
response
)
{
try
{
iNonStandardApprovalService
.
exportList
(
id
,
filename
,
account
,
name
,
response
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"非标产值申请导出列表{}"
,
e
);
}
}
}
cement-business/src/main/java/cn/wise/sc/cement/business/controller/NonStandardValueController.java
0 → 100644
View file @
7921bc67
package
cn
.
wise
.
sc
.
cement
.
business
.
controller
;
import
cn.wise.sc.cement.business.entity.NonStandardValue
;
import
cn.wise.sc.cement.business.model.BaseResponse
;
import
cn.wise.sc.cement.business.model.PageQuery
;
import
cn.wise.sc.cement.business.service.INonStandardValueService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletResponse
;
/**
* <p>
* 前端控制器
* </p>
*
* @author wlb
* @since 2020-09-23
*/
@Api
(
tags
=
"非标产值-非标产值"
)
@RestController
@RequestMapping
(
"/tcdri/nonestandard_value"
)
public
class
NonStandardValueController
{
private
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
"NoneStandardValueController"
);
@Autowired
private
INonStandardValueService
inonStandardValueService
;
@ApiOperation
(
value
=
"非标产值分页"
)
@GetMapping
(
"/getPage"
)
public
BaseResponse
getPage
(
PageQuery
pageQuery
,
Integer
status
)
{
try
{
return
inonStandardValueService
.
getPage
(
pageQuery
,
status
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"非标产值分页列表{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"根据非标产值ID查找指定信息"
)
@GetMapping
(
"/{id}"
)
public
BaseResponse
getById
(
@PathVariable
Integer
id
){
try
{
NonStandardValue
e
=
inonStandardValueService
.
getById
(
id
);
if
(
e
==
null
){
return
BaseResponse
.
errorMsg
(
"信息错误!"
);
}
return
BaseResponse
.
okData
(
e
);
}
catch
(
Exception
e
){
log
.
debug
(
"根据非标产值ID查找指定信息{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
value
=
"获取所有已通过的非标产值"
)
@GetMapping
(
"/getList"
)
public
BaseResponse
getList
()
{
try
{
return
inonStandardValueService
.
getList
();
}
catch
(
Exception
e
)
{
log
.
debug
(
"获取所有已通过的非标产值{}"
,
e
);
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@ApiOperation
(
"非标产值信息导出列表"
)
@PostMapping
(
"/exportList"
)
public
void
exportList
(
Integer
id
,
String
filename
,
String
account
,
String
name
,
HttpServletResponse
response
)
{
try
{
inonStandardValueService
.
exportList
(
id
,
filename
,
account
,
name
,
response
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"非标产值信息导出列表{}"
,
e
);
}
}
}
cement-business/src/main/java/cn/wise/sc/cement/business/entity/CapabilityManagement.java
0 → 100644
View file @
7921bc67
package
cn
.
wise
.
sc
.
cement
.
business
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
java.io.Serializable
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
/**
* <p>
* 能力管理
* </p>
*
* @author wlb
* @since 2020-09-20
*/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
@Accessors
(
chain
=
true
)
public
class
CapabilityManagement
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/*
主键
*/
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Integer
id
;
@ApiModelProperty
(
"能力项"
)
private
String
capabilityItem
;
@ApiModelProperty
(
"能力范围"
)
private
String
capabilityRange
;
@ApiModelProperty
(
"取得日期"
)
private
LocalDate
obtainTime
;
@ApiModelProperty
(
"创建日期"
)
private
LocalDateTime
createTime
;
@ApiModelProperty
(
"修改日期"
)
private
LocalDateTime
updateTime
;
@ApiModelProperty
(
"备注"
)
private
String
remark
;
@ApiModelProperty
private
Integer
userId
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/entity/HistoryArchives.java
0 → 100644
View file @
7921bc67
package
cn
.
wise
.
sc
.
cement
.
business
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
java.io.Serializable
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
/**
* <p>
* 历史档案
* </p>
*
* @author wlb
* @since 2020-09-20
*/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
@Accessors
(
chain
=
true
)
public
class
HistoryArchives
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/*
主键
*/
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Integer
id
;
@ApiModelProperty
(
"日期"
)
private
LocalDate
time
;
@ApiModelProperty
(
"类型"
)
private
String
type
;
@ApiModelProperty
(
"内容"
)
private
String
content
;
@ApiModelProperty
(
"创建日期"
)
private
LocalDateTime
createTime
;
@ApiModelProperty
(
"修改日期"
)
private
LocalDateTime
updateTime
;
@ApiModelProperty
(
"备注"
)
private
String
remark
;
@ApiModelProperty
private
Integer
userId
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/entity/NonStandardApply.java
0 → 100644
View file @
7921bc67
package
cn
.
wise
.
sc
.
cement
.
business
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
java.io.Serializable
;
import
java.time.LocalDate
;
/**
* <p>
* 非标产值申请
* </p>
*
* @author wlb
* @since 2020-09-22
*/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
@Accessors
(
chain
=
true
)
@TableName
(
value
=
"nonstandard_apply"
)
public
class
NonStandardApply
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/*
主键
*/
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Integer
id
;
@ApiModelProperty
(
"姓名"
)
private
String
name
;
@ApiModelProperty
(
"账户"
)
private
String
account
;
@ApiModelProperty
(
"起止日期"
)
private
String
statistical
;
@ApiModelProperty
(
"上报工时"
)
private
Double
reportedHours
;
@ApiModelProperty
(
"状态 0:未提交 1:审批通过 2:审批未通过"
)
private
Integer
status
;
@ApiModelProperty
(
"工作类别"
)
private
String
workType
;
@ApiModelProperty
(
"开始时间"
)
private
LocalDate
startTime
;
@ApiModelProperty
(
"工作描述"
)
private
String
workDescription
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/entity/NonStandardApproval.java
0 → 100644
View file @
7921bc67
package
cn
.
wise
.
sc
.
cement
.
business
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
java.io.Serializable
;
import
java.time.LocalDate
;
/**
* <p>
* 非标产值审批
* </p>
*
* @author wlb
* @since 2020-09-22
*/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
@Accessors
(
chain
=
true
)
@TableName
(
value
=
"nonstandard_apply"
)
public
class
NonStandardApproval
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/*
主键
*/
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Integer
id
;
@ApiModelProperty
(
"姓名"
)
private
String
name
;
@ApiModelProperty
(
"账户"
)
private
String
account
;
@ApiModelProperty
(
"起止日期"
)
private
LocalDate
statistical
;
@ApiModelProperty
(
"上报工时"
)
private
Double
reportedHours
;
@ApiModelProperty
(
"状态 0:未提交 1:审批通过 2:审批未通过"
)
private
Integer
status
;
@ApiModelProperty
(
"最终产值"
)
private
Double
finalValue
;
@ApiModelProperty
(
"考核公值"
)
private
Double
appraisalValue
;
@ApiModelProperty
(
"驳回意见"
)
private
String
finalRejection
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/entity/NonStandardValue.java
0 → 100644
View file @
7921bc67
package
cn
.
wise
.
sc
.
cement
.
business
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
java.io.Serializable
;
import
java.time.LocalDate
;
/**
* <p>
* 非标产值
* </p>
*
* @author wlb
* @since 2020-09-22
*/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
@Accessors
(
chain
=
true
)
@TableName
(
value
=
"nonstandard_apply"
)
public
class
NonStandardValue
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/*
主键
*/
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Integer
id
;
@ApiModelProperty
(
"姓名"
)
private
String
name
;
@ApiModelProperty
(
"账户"
)
private
String
account
;
@ApiModelProperty
(
"起止日期"
)
private
LocalDate
statistical
;
@ApiModelProperty
(
"上报工时"
)
private
Double
reportedHours
;
@ApiModelProperty
(
"状态 0:未提交 1:审批通过 2:审批未通过"
)
private
Integer
status
;
@ApiModelProperty
(
"最终产值"
)
private
Double
finalValue
;
@ApiModelProperty
(
"工作类别"
)
private
String
workType
;
@ApiModelProperty
(
"工作描述"
)
private
String
workDescription
;
@ApiModelProperty
(
"开始时间"
)
private
LocalDate
startTime
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/CapabilityManagementMapper.java
0 → 100644
View file @
7921bc67
package
cn
.
wise
.
sc
.
cement
.
business
.
mapper
;
import
cn.wise.sc.cement.business.entity.CapabilityManagement
;
import
cn.wise.sc.cement.business.model.vo.CapabilityManagementVo
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.Map
;
/**
* <p>
* Mapper 接口
* </p>
*
* @author wlb
* @since 2020-09-17
*/
public
interface
CapabilityManagementMapper
extends
BaseMapper
<
CapabilityManagement
>
{
IPage
<
CapabilityManagementVo
>
getPage
(
@Param
(
"page"
)
Page
page
,
@Param
(
"param"
)
Map
<
String
,
Object
>
param
);
CapabilityManagementVo
getById
(
Integer
id
);
}
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/HistoryArchivesMapper.java
0 → 100644
View file @
7921bc67
package
cn
.
wise
.
sc
.
cement
.
business
.
mapper
;
import
cn.wise.sc.cement.business.entity.HistoryArchives
;
import
cn.wise.sc.cement.business.model.vo.HistoryArchivesVo
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.Map
;
/**
* <p>
* Mapper 接口
* </p>
*
* @author wlb
* @since 2020-09-17
*/
public
interface
HistoryArchivesMapper
extends
BaseMapper
<
HistoryArchives
>
{
IPage
<
HistoryArchivesVo
>
getPage
(
@Param
(
"page"
)
Page
page
,
@Param
(
"param"
)
Map
<
String
,
Object
>
param
);
HistoryArchivesVo
getById
(
Integer
id
);
}
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/NonStandardApplyMapper.java
0 → 100644
View file @
7921bc67
package
cn
.
wise
.
sc
.
cement
.
business
.
mapper
;
import
cn.wise.sc.cement.business.entity.NonStandardApply
;
import
cn.wise.sc.cement.business.model.vo.NonStandardApplyVo
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
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
;
/**
* <p>
* Mapper 接口
* </p>
*
* @author wlb
* @since 2020-09-22
*/
public
interface
NonStandardApplyMapper
extends
BaseMapper
<
NonStandardApply
>
{
IPage
<
NonStandardApplyVo
>
getPage
(
@Param
(
"page"
)
Page
page
,
@Param
(
"params"
)
Map
<
String
,
Object
>
params
);
NonStandardApplyVo
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/NonStandardApprovalMapper.java
0 → 100644
View file @
7921bc67
package
cn
.
wise
.
sc
.
cement
.
business
.
mapper
;
import
cn.wise.sc.cement.business.entity.NonStandardApproval
;
import
cn.wise.sc.cement.business.model.vo.NonStandardApprovalVo
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
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
;
/**
* <p>
* Mapper 接口
* </p>
*
* @author wlb
* @since 2020-09-22
*/
public
interface
NonStandardApprovalMapper
extends
BaseMapper
<
NonStandardApproval
>
{
IPage
<
NonStandardApprovalVo
>
getPage
(
@Param
(
"page"
)
Page
page
,
@Param
(
"params"
)
Map
<
String
,
Object
>
params
);
NonStandardApprovalVo
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/NonStandardValueMapper.java
0 → 100644
View file @
7921bc67
package
cn
.
wise
.
sc
.
cement
.
business
.
mapper
;
import
cn.wise.sc.cement.business.entity.NonStandardValue
;
import
cn.wise.sc.cement.business.model.vo.NonStandardValueVo
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
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
;
/**
* <p>
* Mapper 接口
* </p>
*
* @author wlb
* @since 2020-09-22
*/
public
interface
NonStandardValueMapper
extends
BaseMapper
<
NonStandardValue
>
{
IPage
<
NonStandardValueVo
>
getPage
(
@Param
(
"page"
)
Page
page
,
@Param
(
"params"
)
Map
<
String
,
Object
>
params
);
NonStandardValueVo
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/CapabilityManagementMapper.xml
0 → 100644
View file @
7921bc67
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.wise.sc.cement.business.mapper.CapabilityManagementMapper"
>
<select
id=
"getPage"
resultType=
"cn.wise.sc.cement.business.model.vo.CapabilityManagementVo"
>
select cm.*,su.name as userName
from capability_management cm
left join sys_user su on cm.user_id = su.id
where cm.user_id = #{param.userId}
</select>
<select
id=
"getById"
resultType=
"cn.wise.sc.cement.business.model.vo.CapabilityManagementVo"
>
SELECT
cm.capability_item as 能力项,
cm.capability_range as 能力范围,
cm.obtain_time as 取得日期,
cm.create_time as 创建时间,
cm.update_time as 修改时间,
cm.remark as 备注,
(select count(*) from sys_user su where su.id = cm.user_id) as 用户id
FROM capability_management cm,sys_user su
</select>
</mapper>
\ No newline at end of file
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/HistoryArchivesMapper.xml
0 → 100644
View file @
7921bc67
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.wise.sc.cement.business.mapper.HistoryArchivesMapper"
>
<select
id=
"getPage"
resultType=
"cn.wise.sc.cement.business.model.vo.HistoryArchivesVo"
>
select ha.*,su.name as userName
from history_archives ha
left join sys_user su on ha.user_id = su.id
where ha.user_id = #{param.userId}
</select>
<select
id=
"getById"
resultType=
"cn.wise.sc.cement.business.model.vo.HistoryArchivesVo"
>
SELECT
ha.time as 时间,
ha.type as 类型,
ha.content as 内容,
ha.create_time as 创建时间,
ha.update_time as 修改时间,
ha.remark as 备注,
(select count(*) from sys_user su where su.id = ha.user_id) as 用户id
FROM history_archives ha,sys_user su
</select>
</mapper>
\ No newline at end of file
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/NonStandardApplyMapper.xml
0 → 100644
View file @
7921bc67
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.wise.sc.cement.business.mapper.NonStandardApplyMapper"
>
<sql
id=
"where"
>
<where>
<if
test=
"params.status != null "
>
and na.status = #{params.status}
</if>
<if
test=
"params.name != null and params.name != ''"
>
and na.name like concat('%', #{params.name}, '%')
</if>
<if
test=
"params.account != null and params.account != ''"
>
and na.account like concat('%', #{params.account}, '%')
</if>
</where>
</sql>
<select
id=
"getPage"
resultType=
"cn.wise.sc.cement.business.model.vo.NonStandardApplyVo"
>
select na.*
from nonstandard_apply na
<include
refid=
"where"
/>
order by na.id asc
</select>
<select
id=
"getById"
resultType=
"cn.wise.sc.cement.business.model.vo.NonStandardApplyVo"
>
SELECT
na.id as 序号,
na.name as 姓名,
na.account as 账户,
na.statistical as 起止日期,
na.reported_hours as 上报工时,
(
CASE na.status
WHEN 0 THEN '未申请'
WHEN 1 THEN '已通过'
WHEN 2 THEN '未通过'
ELSE NULL
END
)as 状态,
na.start_time as 开始时间,
na.work_type as 工作类别,
na.work_description as 工作描述
FROM nonstandard_apply na
<include
refid=
"where"
/>
ORDER BY na.id ASC
</select>
<select
id=
"exportList"
resultType=
"java.util.HashMap"
>
SELECT
na.id as 序号,
na.name as 姓名,
na.account as 账户,
na.statistical as 起止日期,
na.reported_hours as 上报工时,
(
CASE na.status
WHEN 0 THEN '未申请'
WHEN 1 THEN '已通过'
WHEN 2 THEN '未通过'
ELSE NULL
END
)as 状态,
na.work_type as 工作类别,
na.start_time as 开始时间,
na.work_description as 工作描述
FROM nonstandard_apply na
<include
refid=
"where"
/>
ORDER BY na.id ASC
</select>
</mapper>
\ No newline at end of file
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/NonStandardApprovalMapper.xml
0 → 100644
View file @
7921bc67
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.wise.sc.cement.business.mapper.NonStandardApprovalMapper"
>
<sql
id=
"where"
>
<where>
<if
test=
"params.id != null "
>
and na.id = #{params.id}
</if>
<if
test=
"params.name != null and params.name != ''"
>
and na.name like concat('%', #{params.name}, '%')
</if>
<if
test=
"params.account != null and params.account != ''"
>
and na.account like concat('%', #{params.account}, '%')
</if>
</where>
</sql>
<update
id=
"update"
parameterType=
"java.util.HashMap"
>
UPDATE nonstandard_apply SET final_value=reported_hours*appraisal_value WHERE id=id
</update>
<select
id=
"getPage"
resultType=
"cn.wise.sc.cement.business.model.vo.NonStandardApprovalVo"
>
select na.*,
from nonstandard_apply na
<include
refid=
"where"
/>
order by na.id asc
</select>
<select
id=
"getById"
resultType=
"cn.wise.sc.cement.business.model.vo.NonStandardApprovalVo"
>
SELECT
na.id as 序号,
na.name as 姓名,
na.account as 账户,
na.statistical as 起止日期,
na.reported_hours as 上报工时,
(
CASE na.status
WHEN 0 THEN '未申请'
WHEN 1 THEN '已通过'
WHEN 2 THEN '未通过'
ELSE NULL
END
)as 状态,
na.final_value as 最终产值,
na.appraisal_value as 考核公值
FROM nonstandard_apply na
<include
refid=
"where"
/>
ORDER BY na.id ASC
</select>
<select
id=
"exportList"
resultType=
"java.util.HashMap"
>
SELECT
na.id as 序号,
na.name as 姓名,
na.account as 账户,
na.statistical as 起止日期,
na.reported_hours as 上报工时,
(
CASE na.status
WHEN 0 THEN '未申请'
WHEN 1 THEN '已通过'
WHEN 2 THEN '未通过'
ELSE NULL
END
)as 状态,
na.final_value as 最终产值,
na.appraisal_value as 考核公值
FROM nonstandard_apply na
<include
refid=
"where"
/>
ORDER BY na.id ASC
</select>
</mapper>
\ No newline at end of file
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/NonStandardValueMapper.xml
0 → 100644
View file @
7921bc67
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.wise.sc.cement.business.mapper.NonStandardValueMapper"
>
<sql
id=
"where"
>
<where>
<if
test=
"params.id != null "
>
and na.id = #{params.id}
</if>
<if
test=
"params.name != null and params.name != ''"
>
and na.name like concat('%', #{params.name}, '%')
</if>
<if
test=
"params.account != null and params.account != ''"
>
and na.account like concat('%', #{params.account}, '%')
</if>
</where>
</sql>
<select
id=
"getPage"
resultType=
"cn.wise.sc.cement.business.model.vo.NonStandardValueVo"
>
select na.*,
(reported_hours*appraisal_value)AS final_value
from nonstandard_apply na
<include
refid=
"where"
/>
order by na.id asc
</select>
<select
id=
"getById"
resultType=
"cn.wise.sc.cement.business.model.vo.NonStandardApprovalVo"
>
SELECT
na.name as 姓名,
na.account as 账户,
na.statistical as 起止日期,
na.reported_hours as 上报工时,
na.calculate_value as 计算产值,
na.final_value as 最终产值,
na.work_type as 工作类别,
na.work_description as 工作描述,
na.start_time as 开始时间
from nonstandard_apply na
</select>
<select
id=
"exportList"
resultType=
"java.util.HashMap"
>
SELECT
na.id as 序号,
na.name as 姓名,
na.account as 账户,
na.statistical as 起止日期,
na.reported_hours as 上报工时,
na.appraisal_value as 考核公值,
na.final_value as 最终产值,
na.work_type as 工作类别,
na.work_description as 工作描述,
na.start_time as 开始时间
FROM nonstandard_apply na
<include
refid=
"where"
/>
ORDER BY na.id ASC
</select>
</mapper>
\ No newline at end of file
cement-business/src/main/java/cn/wise/sc/cement/business/model/query/CapabilityManagementQuery.java
0 → 100644
View file @
7921bc67
package
cn
.
wise
.
sc
.
cement
.
business
.
model
.
query
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
lombok.NonNull
;
import
lombok.RequiredArgsConstructor
;
import
javax.validation.constraints.NotEmpty
;
import
java.time.LocalDate
;
/**
* @description: 能力管理信息
* @author: wlb
* @create: 2020-09-17
**/
@Data
@RequiredArgsConstructor
@NoArgsConstructor
@ApiModel
(
"能力管理信息"
)
public
class
CapabilityManagementQuery
{
private
Integer
id
;
@ApiModelProperty
(
name
=
"capabilityItem"
,
value
=
"能力项"
)
@NotEmpty
(
message
=
"能力项不能为空!"
)
@NonNull
private
String
capabilityItem
;
@ApiModelProperty
(
name
=
"capabilityRange"
,
value
=
"能力范围"
)
@NotEmpty
(
message
=
"能力范围不能为空!"
)
@NonNull
private
String
capabilityRange
;
@ApiModelProperty
(
name
=
"obtainTime"
,
value
=
"取得日期"
)
private
LocalDate
obtainTime
;
@ApiModelProperty
(
name
=
"remark"
,
value
=
"备注"
)
private
String
remark
;
private
Integer
userId
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/model/query/HistoryArchivesQuery.java
0 → 100644
View file @
7921bc67
package
cn
.
wise
.
sc
.
cement
.
business
.
model
.
query
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
lombok.NonNull
;
import
lombok.RequiredArgsConstructor
;
import
javax.validation.constraints.NotEmpty
;
import
java.time.LocalDate
;
/**
* @description: 历史档案
* @author: wlb
* @create: 2020-09-17
**/
@Data
@RequiredArgsConstructor
@NoArgsConstructor
@ApiModel
(
"历史档案"
)
public
class
HistoryArchivesQuery
{
private
Integer
id
;
@ApiModelProperty
(
name
=
"time"
,
value
=
"日期"
)
@NotEmpty
(
message
=
"日期不能为空!"
)
@NonNull
private
LocalDate
time
;
@ApiModelProperty
(
name
=
"type"
,
value
=
"类型"
)
@NotEmpty
(
message
=
"类型不能为空!"
)
@NonNull
private
String
type
;
@ApiModelProperty
(
name
=
"content"
,
value
=
"内容"
)
@NotEmpty
(
message
=
"内容不能为空!"
)
@NonNull
private
String
content
;
@ApiModelProperty
(
name
=
"remark"
,
value
=
"备注"
)
private
String
remark
;
@ApiModelProperty
(
name
=
"userId"
,
value
=
"用户id"
)
private
Integer
userId
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/model/query/NonStandardApplyQuery.java
0 → 100644
View file @
7921bc67
package
cn
.
wise
.
sc
.
cement
.
business
.
model
.
query
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.RequiredArgsConstructor
;
import
java.time.LocalDate
;
/**
* @description: 非标产值申请
* @author: wlb
* @create: 2020-09-17
**/
@Data
@RequiredArgsConstructor
@ApiModel
(
"非标产值申请"
)
public
class
NonStandardApplyQuery
{
private
Integer
id
;
@ApiModelProperty
(
name
=
"name"
,
value
=
"姓名"
)
private
String
name
;
@ApiModelProperty
(
name
=
"account"
,
value
=
"账号"
)
private
String
account
;
@ApiModelProperty
(
name
=
"reportedHours"
,
value
=
"上报工时"
)
private
Double
reportedHours
;
@ApiModelProperty
(
name
=
"workType"
,
value
=
"工作类别"
)
private
String
workType
;
@ApiModelProperty
(
value
=
"按钮类型 (1保存,2保存并提交)"
)
private
Integer
menuId
;
@ApiModelProperty
(
name
=
"startTime"
,
value
=
"开始时间"
)
private
LocalDate
startTime
;
@ApiModelProperty
(
name
=
"workDescription"
,
value
=
"工作描述"
)
private
String
workDescription
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/model/query/NonStandardApprovalQuery.java
0 → 100644
View file @
7921bc67
package
cn
.
wise
.
sc
.
cement
.
business
.
model
.
query
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.RequiredArgsConstructor
;
/**
* @description: 非标产值审批
* @author: wlb
* @create: 2020-09-17
**/
@Data
@RequiredArgsConstructor
@ApiModel
(
"非标产值审批"
)
public
class
NonStandardApprovalQuery
{
private
Integer
id
;
@ApiModelProperty
(
name
=
"appraisalValue"
,
value
=
"考核公值"
)
private
Double
appraisalValue
;
@ApiModelProperty
(
value
=
"按钮类型 (1通过,2拒绝)"
)
private
Integer
menuId
;
@ApiModelProperty
(
name
=
"finalRejection"
,
value
=
"驳回意见"
)
private
String
finalRejection
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/model/query/NonStandardValueQuery.java
0 → 100644
View file @
7921bc67
package
cn
.
wise
.
sc
.
cement
.
business
.
model
.
query
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
lombok.NonNull
;
import
lombok.RequiredArgsConstructor
;
import
javax.validation.constraints.NotEmpty
;
import
java.time.LocalDate
;
/**
* @description: 非标产值
* @author: wlb
* @create: 2020-09-17
**/
@Data
@RequiredArgsConstructor
@NoArgsConstructor
@ApiModel
(
"非标产值"
)
public
class
NonStandardValueQuery
{
private
Integer
id
;
@ApiModelProperty
(
name
=
"name"
,
value
=
"姓名"
)
@NotEmpty
(
message
=
"姓名不能为空!"
)
@NonNull
private
String
name
;
@ApiModelProperty
(
name
=
"account"
,
value
=
"账户"
)
@NotEmpty
(
message
=
"账户不能为空!"
)
@NonNull
private
String
capabilityRange
;
@ApiModelProperty
(
name
=
"statistical"
,
value
=
"起止日期"
)
@NotEmpty
(
message
=
"起止日期不能为空!"
)
private
String
statistical
;
@ApiModelProperty
(
name
=
"reportedHours"
,
value
=
"上报工时"
)
private
Double
reportedHours
;
@ApiModelProperty
(
name
=
"status"
,
value
=
"状态"
)
private
Integer
status
;
@ApiModelProperty
(
name
=
"appraisalValue"
,
value
=
"考核公值"
)
private
Double
appraisalValue
;
@ApiModelProperty
(
name
=
"finalValue"
,
value
=
"最终产值"
)
private
Double
finalValue
;
@ApiModelProperty
(
name
=
"workType"
,
value
=
"工作类别"
)
private
String
workType
;
@ApiModelProperty
(
name
=
"workDescription"
,
value
=
"工作描述"
)
private
String
workDescription
;
@ApiModelProperty
(
name
=
"startTime"
,
value
=
"开始时间"
)
private
LocalDate
startTime
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/model/vo/CapabilityManagementVo.java
0 → 100644
View file @
7921bc67
package
cn
.
wise
.
sc
.
cement
.
business
.
model
.
vo
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
/**
* @description:
* @author: wlb
* @create: 2020-09-17
**/
@Data
@ApiModel
(
"能力管理信息Vo"
)
public
class
CapabilityManagementVo
{
private
Integer
id
;
@ApiModelProperty
(
"能力项"
)
private
String
capabilityItem
;
@ApiModelProperty
(
"能力范围"
)
private
String
capabilityRange
;
@ApiModelProperty
(
"取得日期"
)
private
LocalDate
obtainTime
;
@ApiModelProperty
(
"创建日期"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
LocalDateTime
createTime
;
@ApiModelProperty
(
"修改日期"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
LocalDateTime
updateTime
;
@ApiModelProperty
(
"备注"
)
private
String
remark
;
@ApiModelProperty
(
"用户表id"
)
private
Integer
userId
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/model/vo/HistoryArchivesVo.java
0 → 100644
View file @
7921bc67
package
cn
.
wise
.
sc
.
cement
.
business
.
model
.
vo
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
/**
* @description:
* @author: wlb
* @create: 2020-09-17
**/
@Data
@ApiModel
(
"历史档案Vo"
)
public
class
HistoryArchivesVo
{
private
Integer
id
;
@ApiModelProperty
(
"日期"
)
private
LocalDate
time
;
@ApiModelProperty
(
"类型"
)
private
String
type
;
@ApiModelProperty
(
"内容"
)
private
String
content
;
@ApiModelProperty
(
"创建日期"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
LocalDateTime
createTime
;
@ApiModelProperty
(
"修改日期"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
LocalDateTime
updateTime
;
@ApiModelProperty
(
"备注"
)
private
String
remark
;
@ApiModelProperty
(
"用户id"
)
private
Integer
userId
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/model/vo/NonStandardApplyVo.java
0 → 100644
View file @
7921bc67
package
cn
.
wise
.
sc
.
cement
.
business
.
model
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.time.LocalDate
;
/**
* @description:
* @author: wlb
* @create: 2020-09-22
**/
@Data
@ApiModel
(
"非标产值申请Vo"
)
public
class
NonStandardApplyVo
{
private
Integer
id
;
@ApiModelProperty
(
"姓名"
)
private
String
name
;
@ApiModelProperty
(
"账户"
)
private
String
account
;
@ApiModelProperty
(
"起止时间"
)
private
String
statistical
;
@ApiModelProperty
(
"上报工时"
)
private
Integer
reportedHours
;
@ApiModelProperty
(
"状态 0:未提交 1:通过 2:未通过"
)
private
Integer
status
;
@ApiModelProperty
(
"工作类别"
)
private
String
workType
;
@ApiModelProperty
(
"开始时间"
)
private
LocalDate
startTime
;
@ApiModelProperty
(
"工作描述"
)
private
String
workDescription
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/model/vo/NonStandardApprovalVo.java
0 → 100644
View file @
7921bc67
package
cn
.
wise
.
sc
.
cement
.
business
.
model
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* @description:
* @author: wlb
* @create: 2020-09-22
**/
@Data
@ApiModel
(
"非标产值申请Vo"
)
public
class
NonStandardApprovalVo
{
private
Integer
id
;
@ApiModelProperty
(
"姓名"
)
private
String
name
;
@ApiModelProperty
(
"账户"
)
private
String
account
;
@ApiModelProperty
(
"起止时间"
)
private
String
statistical
;
@ApiModelProperty
(
"上报工时"
)
private
Integer
reportedHours
;
@ApiModelProperty
(
"最终产值"
)
private
Integer
finalValue
;
@ApiModelProperty
(
"考核公值"
)
private
Integer
appraisalValue
;
@ApiModelProperty
(
"驳回意见"
)
private
String
finalRejection
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/model/vo/NonStandardValueVo.java
0 → 100644
View file @
7921bc67
package
cn
.
wise
.
sc
.
cement
.
business
.
model
.
vo
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.time.LocalDate
;
/**
* @description:
* @author: wlb
* @create: 2020-09-22
**/
@Data
@ApiModel
(
"非标产值Vo"
)
public
class
NonStandardValueVo
{
private
Integer
id
;
@ApiModelProperty
(
"姓名"
)
private
String
name
;
@ApiModelProperty
(
"账户"
)
private
String
account
;
@ApiModelProperty
(
"起止时间"
)
private
String
statistical
;
@ApiModelProperty
(
"上报工时"
)
private
Integer
reportedHours
;
@ApiModelProperty
(
"状态 0:未提交 1:通过 2:未通过"
)
private
Integer
status
;
@ApiModelProperty
(
"考核公值"
)
private
Integer
appraisalValue
;
@ApiModelProperty
(
"最终产值"
)
private
Integer
finalValue
;
@ApiModelProperty
(
"工作类别"
)
private
String
workType
;
@ApiModelProperty
(
"工作描述"
)
private
String
workDescription
;
@ApiModelProperty
(
"开始时间"
)
private
LocalDate
startTime
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/ICapabilityManagementService.java
0 → 100644
View file @
7921bc67
package
cn
.
wise
.
sc
.
cement
.
business
.
service
;
import
cn.wise.sc.cement.business.entity.CapabilityManagement
;
import
cn.wise.sc.cement.business.model.BaseResponse
;
import
cn.wise.sc.cement.business.model.PageQuery
;
import
cn.wise.sc.cement.business.model.query.CapabilityManagementQuery
;
import
cn.wise.sc.cement.business.model.vo.CapabilityManagementVo
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
java.util.List
;
/**
* <p>
* 服务类
* </p>
*
* @author wlb
* @since 2020-09-17
*/
public
interface
ICapabilityManagementService
extends
IService
<
CapabilityManagement
>
{
/**
* 获取分页
* @param pageQuery 分页
* @param userId 用户id
* @return IPage<CapabilityManagement>
*/
BaseResponse
<
IPage
<
CapabilityManagementVo
>>
getPage
(
PageQuery
pageQuery
,
Integer
userId
);
/**
* 获取所有能力信息
*
* @return List
*/
BaseResponse
<
List
<
CapabilityManagement
>>
getList
();
/**
* 新增能力信息
*
* @param query
* @return CapabilityManagementVo
*/
BaseResponse
<
CapabilityManagement
>
create
(
CapabilityManagementQuery
query
);
/**
* 更新能力信息
*
* @param query
* @return CapabilityManagementVo
*/
BaseResponse
<
CapabilityManagement
>
update
(
CapabilityManagementQuery
query
);
/**
* 删除能力信息
*
* @param id
* @return CapabilityManagementVo
*/
BaseResponse
delete
(
Integer
id
);
}
\ No newline at end of file
cement-business/src/main/java/cn/wise/sc/cement/business/service/IHistoryArchivesService.java
0 → 100644
View file @
7921bc67
package
cn
.
wise
.
sc
.
cement
.
business
.
service
;
import
cn.wise.sc.cement.business.entity.HistoryArchives
;
import
cn.wise.sc.cement.business.model.BaseResponse
;
import
cn.wise.sc.cement.business.model.PageQuery
;
import
cn.wise.sc.cement.business.model.query.HistoryArchivesQuery
;
import
cn.wise.sc.cement.business.model.vo.HistoryArchivesVo
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
java.util.List
;
/**
* <p>
* 服务类
* </p>
*
* @author wlb
* @since 2020-09-17
*/
public
interface
IHistoryArchivesService
extends
IService
<
HistoryArchives
>
{
/**
* 获取分页
* @param pageQuery 分页
* @param userId 用户id
* @return IPage<CapabilityManagement>
*/
BaseResponse
<
IPage
<
HistoryArchivesVo
>>
getPage
(
PageQuery
pageQuery
,
Integer
userId
);
/**
* 获取所有历史档案
*
* @return List
*/
BaseResponse
<
List
<
HistoryArchives
>>
getList
();
/**
* 新增历史档案
*
* @param query
* @return HistoryArchives
*/
BaseResponse
<
HistoryArchives
>
create
(
HistoryArchivesQuery
query
);
/**
* 更新历史档案
*
* @param query
* @return HistoryArchives
*/
BaseResponse
<
HistoryArchives
>
update
(
HistoryArchivesQuery
query
);
/**
* 根据id删除历史档案
*
* @param id
* @return HistoryArchives
*/
BaseResponse
delete
(
Integer
id
);
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/INonStandardApplyService.java
0 → 100644
View file @
7921bc67
package
cn
.
wise
.
sc
.
cement
.
business
.
service
;
import
cn.wise.sc.cement.business.entity.NonStandardApply
;
import
cn.wise.sc.cement.business.model.BaseResponse
;
import
cn.wise.sc.cement.business.model.PageQuery
;
import
cn.wise.sc.cement.business.model.query.NonStandardApplyQuery
;
import
cn.wise.sc.cement.business.model.vo.NonStandardApplyVo
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
/**
* <p>
* 服务类
* </p>
*
* @author wlb
* @since 2020-09-23
*/
public
interface
INonStandardApplyService
extends
IService
<
NonStandardApply
>
{
/**
* 获取分页
* @param pageQuery 非标产值信息分页
* @param status 状态
* @return IPage<NoneStandardApply>
*/
BaseResponse
<
IPage
<
NonStandardApplyVo
>>
getPage
(
PageQuery
pageQuery
,
Integer
status
);
/**
* 获取所有非标产值申请信息
*
* @return List
*/
BaseResponse
<
List
<
NonStandardApply
>>
getList
();
/**
* 提交申请
*
* @param query
* @return NoneStandardApplyVo
*/
BaseResponse
<
NonStandardApply
>
create
(
NonStandardApplyQuery
query
);
/**
* 编辑非标产值申请信息
*
* @param query
* @return NoneStandardApplyVo
*/
BaseResponse
<
NonStandardApply
>
update
(
NonStandardApplyQuery
query
);
/**
* 通过id删除指定非标产值申请信息
*
* @param id
* @return NoneStandardApplyVo
*/
BaseResponse
delete
(
Integer
id
);
/**
* 非标产值申请列表导出
* @param status 状态
* @param filename 文件名
* @param account 账户
* @param name 姓名
* @param response
*/
void
exportList
(
Integer
status
,
String
filename
,
String
account
,
String
name
,
HttpServletResponse
response
);
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/INonStandardApprovalService.java
0 → 100644
View file @
7921bc67
package
cn
.
wise
.
sc
.
cement
.
business
.
service
;
import
cn.wise.sc.cement.business.entity.NonStandardApproval
;
import
cn.wise.sc.cement.business.model.BaseResponse
;
import
cn.wise.sc.cement.business.model.PageQuery
;
import
cn.wise.sc.cement.business.model.query.NonStandardApprovalQuery
;
import
cn.wise.sc.cement.business.model.vo.NonStandardApprovalVo
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
/**
* <p>
* 服务类
* </p>
*
* @author wlb
* @since 2020-09-23
*/
public
interface
INonStandardApprovalService
extends
IService
<
NonStandardApproval
>
{
/**
* 获取分页
* @param pageQuery 非标产值审批信息分页
* @param name 姓名
* @return IPage<NoneStandardApproval>
*/
BaseResponse
<
IPage
<
NonStandardApprovalVo
>>
getPage
(
PageQuery
pageQuery
,
String
name
);
/**
* 获取所有非标产值审批信息
*
* @return List
*/
BaseResponse
<
List
<
NonStandardApproval
>>
getList
();
/**
* 审批通过或驳回请求实现
*
* @param query
* @return NoneStandardApprovalVo
*/
BaseResponse
<
NonStandardApproval
>
update
(
NonStandardApprovalQuery
query
);
/**
* 通过id删除指定审批信息
*
* @param id
* @return NoneStandardApplyVo
*/
BaseResponse
delete
(
Integer
id
);
/**
* 更改状态信息,达到改变显示的效果
* 1:未提交
* 2:已通过
* 3:未通过
*
* @param status 状态
* @param id id
* @return Boolean
*/
BaseResponse
<
String
>
status
(
Integer
status
,
Integer
id
);
/**
* 非标产值审批列表导出
* @param id id
* @param filename 文件名
* @param account 账户
* @param name 姓名
* @param response
*/
void
exportList
(
Integer
id
,
String
filename
,
String
account
,
String
name
,
HttpServletResponse
response
);
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/INonStandardValueService.java
0 → 100644
View file @
7921bc67
package
cn
.
wise
.
sc
.
cement
.
business
.
service
;
import
cn.wise.sc.cement.business.entity.NonStandardValue
;
import
cn.wise.sc.cement.business.model.BaseResponse
;
import
cn.wise.sc.cement.business.model.PageQuery
;
import
cn.wise.sc.cement.business.model.vo.NonStandardValueVo
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
/**
* <p>
* 服务类
* </p>
*
* @author wlb
* @since 2020-09-23
*/
public
interface
INonStandardValueService
extends
IService
<
NonStandardValue
>
{
/**
* 获取分页
* @param pageQuery 非标产值信息分页
* @param status 状态
* @return IPage<NoneStandardValue>
*/
BaseResponse
<
IPage
<
NonStandardValueVo
>>
getPage
(
PageQuery
pageQuery
,
Integer
status
);
/**
* 获取所有非标产值信息
*
* @return List
*/
BaseResponse
<
List
<
NonStandardValue
>>
getList
();
/**
* 非标产值列表导出
* @param id id
* @param filename 文件名
* @param account 账户
* @param name 姓名
* @param response
*/
void
exportList
(
Integer
id
,
String
filename
,
String
account
,
String
name
,
HttpServletResponse
response
);
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/CapabilityManagementServiceImpl.java
0 → 100644
View file @
7921bc67
package
cn
.
wise
.
sc
.
cement
.
business
.
service
.
impl
;
import
cn.wise.sc.cement.business.entity.CapabilityManagement
;
import
cn.wise.sc.cement.business.mapper.CapabilityManagementMapper
;
import
cn.wise.sc.cement.business.model.BaseResponse
;
import
cn.wise.sc.cement.business.model.PageQuery
;
import
cn.wise.sc.cement.business.model.query.CapabilityManagementQuery
;
import
cn.wise.sc.cement.business.model.vo.CapabilityManagementVo
;
import
cn.wise.sc.cement.business.service.ICapabilityManagementService
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.annotation.Resource
;
import
java.time.LocalDateTime
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* <p>
* 服务实现类
* </p>
*
* @author wlb
* @since 2020-09-17
*/
@Service
public
class
CapabilityManagementServiceImpl
extends
ServiceImpl
<
CapabilityManagementMapper
,
CapabilityManagement
>
implements
ICapabilityManagementService
{
@Resource
private
CapabilityManagementMapper
capabilityManagementMapper
;
@Override
public
BaseResponse
<
IPage
<
CapabilityManagementVo
>>
getPage
(
PageQuery
pageQuery
,
Integer
userId
){
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"userId"
,
userId
);
Page
<
CapabilityManagementVo
>
page
=
new
Page
<>(
pageQuery
.
getPageNo
(),
pageQuery
.
getPageSize
());
IPage
<
CapabilityManagementVo
>
pages
=
capabilityManagementMapper
.
getPage
(
page
,
map
);
return
BaseResponse
.
okData
(
pages
);
}
@Override
public
BaseResponse
<
List
<
CapabilityManagement
>>
getList
()
{
QueryWrapper
<
CapabilityManagement
>
qw
=
new
QueryWrapper
<>();
qw
.
ne
(
"id"
,
0
);
List
<
CapabilityManagement
>
list
=
this
.
list
(
qw
);
return
BaseResponse
.
okData
(
list
);
}
@Override
@Transactional
public
BaseResponse
<
CapabilityManagement
>
create
(
CapabilityManagementQuery
query
)
{
//判断能力项名称是否重复
QueryWrapper
<
CapabilityManagement
>
qw
=
new
QueryWrapper
<>();
qw
.
eq
(
"capability_item"
,
query
.
getCapabilityItem
());
int
count
=
capabilityManagementMapper
.
selectCount
(
qw
);
if
(
count
>
0
){
return
BaseResponse
.
errorMsg
(
"能力项名称已存在!"
);
}
CapabilityManagement
cama
=
new
CapabilityManagement
();
BeanUtils
.
copyProperties
(
query
,
cama
);
cama
.
setCreateTime
(
LocalDateTime
.
now
());
cama
.
setUpdateTime
(
LocalDateTime
.
now
());
capabilityManagementMapper
.
insert
(
cama
);
return
BaseResponse
.
okData
(
cama
);
}
@Override
public
BaseResponse
<
CapabilityManagement
>
update
(
CapabilityManagementQuery
query
)
{
QueryWrapper
<
CapabilityManagement
>
qw
=
new
QueryWrapper
<>();
qw
.
eq
(
"capability_item"
,
query
.
getCapabilityItem
());
qw
.
ne
(
"id"
,
query
.
getId
());
int
count
=
capabilityManagementMapper
.
selectCount
(
qw
);
if
(
count
>
0
){
return
BaseResponse
.
errorMsg
(
"修改此项信息!"
);
}
CapabilityManagement
update
=
new
CapabilityManagement
();
BeanUtils
.
copyProperties
(
query
,
update
);
update
.
setId
(
query
.
getId
());
capabilityManagementMapper
.
updateById
(
update
);
return
BaseResponse
.
okData
(
update
);
}
@Override
public
BaseResponse
delete
(
Integer
id
)
{
CapabilityManagement
camd
=
capabilityManagementMapper
.
selectById
(
id
);
if
(
camd
==
null
){
return
BaseResponse
.
errorMsg
(
"检测依据不存在"
);
}
capabilityManagementMapper
.
deleteById
(
id
);
return
BaseResponse
.
okData
(
"删除成功"
);
}
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/HistoryArchivesServiceImpl.java
0 → 100644
View file @
7921bc67
package
cn
.
wise
.
sc
.
cement
.
business
.
service
.
impl
;
import
cn.wise.sc.cement.business.entity.HistoryArchives
;
import
cn.wise.sc.cement.business.mapper.HistoryArchivesMapper
;
import
cn.wise.sc.cement.business.model.BaseResponse
;
import
cn.wise.sc.cement.business.model.PageQuery
;
import
cn.wise.sc.cement.business.model.query.HistoryArchivesQuery
;
import
cn.wise.sc.cement.business.model.vo.HistoryArchivesVo
;
import
cn.wise.sc.cement.business.service.IHistoryArchivesService
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.annotation.Resource
;
import
java.time.LocalDateTime
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* <p>
* 服务实现类
* </p>
*
* @author wlb
* @since 2020-09-17
*/
@Service
public
class
HistoryArchivesServiceImpl
extends
ServiceImpl
<
HistoryArchivesMapper
,
HistoryArchives
>
implements
IHistoryArchivesService
{
@Resource
private
HistoryArchivesMapper
historyArchivesMapper
;
@Override
public
BaseResponse
<
IPage
<
HistoryArchivesVo
>>
getPage
(
PageQuery
pageQuery
,
Integer
userId
){
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"userId"
,
userId
);
Page
<
HistoryArchivesVo
>
page
=
new
Page
<>(
pageQuery
.
getPageNo
(),
pageQuery
.
getPageSize
());
IPage
<
HistoryArchivesVo
>
pages
=
historyArchivesMapper
.
getPage
(
page
,
map
);
return
BaseResponse
.
okData
(
pages
);
}
@Override
public
BaseResponse
<
List
<
HistoryArchives
>>
getList
()
{
QueryWrapper
<
HistoryArchives
>
qw
=
new
QueryWrapper
<>();
qw
.
ne
(
"id"
,
0
);
List
<
HistoryArchives
>
list
=
this
.
list
(
qw
);
return
BaseResponse
.
okData
(
list
);
}
@Override
@Transactional
public
BaseResponse
<
HistoryArchives
>
create
(
HistoryArchivesQuery
query
)
{
QueryWrapper
<
HistoryArchives
>
qw
=
new
QueryWrapper
<>();
qw
.
eq
(
"type"
,
query
.
getType
());
int
count
=
historyArchivesMapper
.
selectCount
(
qw
);
if
(
count
>
0
){
return
BaseResponse
.
errorMsg
(
"类型名称已存在!"
);
}
HistoryArchives
create
=
new
HistoryArchives
();
BeanUtils
.
copyProperties
(
query
,
create
);
create
.
setCreateTime
(
LocalDateTime
.
now
());
historyArchivesMapper
.
insert
(
create
);
return
BaseResponse
.
okData
(
create
);
}
@Override
public
BaseResponse
<
HistoryArchives
>
update
(
HistoryArchivesQuery
query
)
{
QueryWrapper
<
HistoryArchives
>
qw
=
new
QueryWrapper
<>();
qw
.
eq
(
"type"
,
query
.
getType
());
int
count
=
historyArchivesMapper
.
selectCount
(
qw
);
if
(
count
>
0
){
return
BaseResponse
.
errorMsg
(
"修改此项信息!"
);
}
HistoryArchives
update
=
new
HistoryArchives
();
BeanUtils
.
copyProperties
(
query
,
update
);
update
.
setUpdateTime
(
LocalDateTime
.
now
());
update
.
setId
(
query
.
getId
());
historyArchivesMapper
.
updateById
(
update
);
return
BaseResponse
.
okData
(
update
);
}
@Override
public
BaseResponse
delete
(
Integer
id
)
{
HistoryArchives
delete
=
historyArchivesMapper
.
selectById
(
id
);
if
(
delete
==
null
){
return
BaseResponse
.
errorMsg
(
"检测依据不存在"
);
}
historyArchivesMapper
.
deleteById
(
id
);
return
BaseResponse
.
okData
(
"删除成功"
);
}
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/NonStandardApplyServiceImpl.java
0 → 100644
View file @
7921bc67
package
cn
.
wise
.
sc
.
cement
.
business
.
service
.
impl
;
import
cn.wise.sc.cement.business.entity.NonStandardApply
;
import
cn.wise.sc.cement.business.mapper.NonStandardApplyMapper
;
import
cn.wise.sc.cement.business.model.BaseResponse
;
import
cn.wise.sc.cement.business.model.PageQuery
;
import
cn.wise.sc.cement.business.model.query.NonStandardApplyQuery
;
import
cn.wise.sc.cement.business.model.vo.NonStandardApplyVo
;
import
cn.wise.sc.cement.business.service.INonStandardApplyService
;
import
cn.wise.sc.cement.business.util.ExcelUtil
;
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.springframework.beans.BeanUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletResponse
;
import
java.time.LocalDate
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* <p>
* 服务实现类
* </p>
*
* @author wlb
* @since 2020-09-23
*/
@Service
public
class
NonStandardApplyServiceImpl
extends
ServiceImpl
<
NonStandardApplyMapper
,
NonStandardApply
>
implements
INonStandardApplyService
{
@Resource
private
NonStandardApplyMapper
nonStandardApplyMapper
;
@Override
public
BaseResponse
<
IPage
<
NonStandardApplyVo
>>
getPage
(
PageQuery
pageQuery
,
Integer
status
){
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"status"
,
status
);
Page
<
NonStandardApplyVo
>
page
=
new
Page
<>(
pageQuery
.
getPageNo
(),
pageQuery
.
getPageSize
());
IPage
<
NonStandardApplyVo
>
pages
=
nonStandardApplyMapper
.
getPage
(
page
,
params
);
return
BaseResponse
.
okData
(
pages
);
}
@Override
public
BaseResponse
<
List
<
NonStandardApply
>>
getList
()
{
QueryWrapper
<
NonStandardApply
>
qw
=
new
QueryWrapper
<>();
qw
.
ge
(
"status"
,
0
);
List
<
NonStandardApply
>
list
=
this
.
list
(
qw
);
return
BaseResponse
.
okData
(
list
);
}
@Override
@Transactional
public
BaseResponse
<
NonStandardApply
>
create
(
NonStandardApplyQuery
query
)
{
NonStandardApply
cama
=
new
NonStandardApply
();
BeanUtils
.
copyProperties
(
query
,
cama
);
LocalDate
st
=
cama
.
getStartTime
();
Double
a
=
cama
.
getReportedHours
();
Double
b
=
a
/
24
+
1
;
long
c
=
new
Double
(
b
).
longValue
();
cama
.
setStatistical
(
cama
.
getStartTime
()
+
"/"
+
cama
.
getStartTime
().
plusDays
(
c
));
nonStandardApplyMapper
.
insert
(
cama
);
return
BaseResponse
.
okData
(
cama
);
}
@Override
public
BaseResponse
<
NonStandardApply
>
update
(
NonStandardApplyQuery
query
)
{
NonStandardApply
nsa
=
new
NonStandardApply
();
BeanUtils
.
copyProperties
(
query
,
nsa
);
nsa
.
setId
(
query
.
getId
());
nonStandardApplyMapper
.
updateById
(
nsa
);
return
BaseResponse
.
okData
(
nsa
);
}
@Override
public
BaseResponse
delete
(
Integer
id
)
{
NonStandardApply
nsa
=
nonStandardApplyMapper
.
selectById
(
id
);
if
(
nsa
==
null
){
return
BaseResponse
.
errorMsg
(
"检测依据不存在"
);
}
nonStandardApplyMapper
.
deleteById
(
id
);
return
BaseResponse
.
okData
(
"删除成功"
);
}
@Override
public
void
exportList
(
Integer
status
,
String
filename
,
String
account
,
String
name
,
HttpServletResponse
response
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"status"
,
status
);
params
.
put
(
"name"
,
name
);
params
.
put
(
"account"
,
account
);
List
<
Map
<
String
,
Object
>>
list
=
nonStandardApplyMapper
.
exportList
(
params
);
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
Map
<
String
,
Object
>
map
=
list
.
get
(
0
);
String
[]
headers
=
new
String
[
map
.
size
()];
headers
[
0
]
=
"序号"
;
headers
[
1
]
=
"姓名"
;
headers
[
2
]
=
"账户"
;
headers
[
3
]
=
"起止日期"
;
headers
[
4
]
=
"上报工时"
;
headers
[
5
]
=
"状态"
;
headers
[
6
]
=
"工作类别"
;
headers
[
7
]
=
"开始时间"
;
headers
[
8
]
=
"工作描述"
;
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
){
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/service/impl/NonStandardApprovalServiceImpl.java
0 → 100644
View file @
7921bc67
package
cn
.
wise
.
sc
.
cement
.
business
.
service
.
impl
;
import
cn.wise.sc.cement.business.entity.NonStandardApproval
;
import
cn.wise.sc.cement.business.mapper.NonStandardApprovalMapper
;
import
cn.wise.sc.cement.business.model.BaseResponse
;
import
cn.wise.sc.cement.business.model.PageQuery
;
import
cn.wise.sc.cement.business.model.query.NonStandardApprovalQuery
;
import
cn.wise.sc.cement.business.model.vo.NonStandardApprovalVo
;
import
cn.wise.sc.cement.business.service.INonStandardApprovalService
;
import
cn.wise.sc.cement.business.util.ExcelUtil
;
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.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* <p>
* 服务实现类
* </p>
*
* @author wlb
* @since 2020-09-17
*/
@Service
public
class
NonStandardApprovalServiceImpl
extends
ServiceImpl
<
NonStandardApprovalMapper
,
NonStandardApproval
>
implements
INonStandardApprovalService
{
@Resource
private
NonStandardApprovalMapper
nonStandardApprovalMapper
;
@Override
public
BaseResponse
<
IPage
<
NonStandardApprovalVo
>>
getPage
(
PageQuery
pageQuery
,
String
name
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"name"
,
name
);
Page
<
NonStandardApprovalVo
>
page
=
new
Page
<>(
pageQuery
.
getPageNo
(),
pageQuery
.
getPageSize
());
IPage
<
NonStandardApprovalVo
>
pages
=
nonStandardApprovalMapper
.
getPage
(
page
,
params
);
return
BaseResponse
.
okData
(
pages
);
}
@Override
public
BaseResponse
<
List
<
NonStandardApproval
>>
getList
()
{
QueryWrapper
<
NonStandardApproval
>
qw
=
new
QueryWrapper
<>();
qw
.
ge
(
"name"
,
0
);
List
<
NonStandardApproval
>
list
=
this
.
list
(
qw
);
return
BaseResponse
.
okData
(
list
);
}
@Override
public
BaseResponse
<
NonStandardApproval
>
update
(
NonStandardApprovalQuery
query
)
{
if
(
query
.
getId
()
==
null
){
return
BaseResponse
.
errorMsg
(
"参数错误"
);
}
NonStandardApproval
nonStandardApproval
=
nonStandardApprovalMapper
.
selectById
(
query
.
getId
());
if
(
nonStandardApproval
==
null
){
return
BaseResponse
.
errorMsg
(
"数据错误"
);
}
if
(
query
.
getMenuId
()
==
null
){
return
BaseResponse
.
errorMsg
(
"按钮参数不能为空"
);
}
if
(
query
.
getMenuId
()==
1
){
//通过
nonStandardApproval
.
setAppraisalValue
(
query
.
getAppraisalValue
());
//计算最总产值
Double
finalValue
=
query
.
getAppraisalValue
()
*
nonStandardApproval
.
getReportedHours
();
nonStandardApproval
.
setFinalValue
(
finalValue
);
nonStandardApproval
.
setStatus
(
1
);
}
else
if
(
query
.
getMenuId
()==
2
){
//拒绝
nonStandardApproval
.
setFinalRejection
(
query
.
getFinalRejection
());
nonStandardApproval
.
setStatus
(
2
);
}
else
{
return
BaseResponse
.
errorMsg
(
"按钮参数错误"
);
}
nonStandardApprovalMapper
.
updateById
(
nonStandardApproval
);
return
BaseResponse
.
okData
(
nonStandardApproval
);
}
@Override
@Transactional
public
BaseResponse
<
String
>
status
(
Integer
status
,
Integer
id
)
{
if
(
status
==
null
||
id
==
null
){
return
BaseResponse
.
errorMsg
(
"参数错误!"
);
}
NonStandardApproval
nonStandardApproval
=
nonStandardApprovalMapper
.
selectById
(
id
);
if
(
nonStandardApproval
==
null
){
return
BaseResponse
.
errorMsg
(
"数据错误!"
);
}
nonStandardApproval
.
setStatus
(
status
);
nonStandardApprovalMapper
.
updateById
(
nonStandardApproval
);
String
result
=
""
;
if
(
nonStandardApproval
.
getStatus
()
==
1
){
result
=
"已通过"
;
}
else
if
(
nonStandardApproval
.
getStatus
()
==
2
){
result
=
"未通过"
;
}
else
{
result
=
"未提交"
;
}
return
BaseResponse
.
okData
(
result
);
}
@Override
public
BaseResponse
delete
(
Integer
id
)
{
NonStandardApproval
camd
=
nonStandardApprovalMapper
.
selectById
(
id
);
if
(
camd
==
null
){
return
BaseResponse
.
errorMsg
(
"检测依据不存在"
);
}
nonStandardApprovalMapper
.
deleteById
(
id
);
return
BaseResponse
.
okData
(
"删除成功"
);
}
@Override
public
void
exportList
(
Integer
id
,
String
filename
,
String
account
,
String
name
,
HttpServletResponse
response
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"id"
,
id
);
params
.
put
(
"name"
,
name
);
params
.
put
(
"account"
,
account
);
List
<
Map
<
String
,
Object
>>
list
=
nonStandardApprovalMapper
.
exportList
(
params
);
if
(!
CollectionUtils
.
isEmpty
(
list
))
{
Map
<
String
,
Object
>
map
=
list
.
get
(
0
);
String
[]
headers
=
new
String
[
map
.
size
()];
headers
[
0
]
=
"序号"
;
headers
[
1
]
=
"姓名"
;
headers
[
2
]
=
"账户"
;
headers
[
3
]
=
"起止日期"
;
headers
[
4
]
=
"上报工时"
;
headers
[
5
]
=
"状态"
;
headers
[
6
]
=
"最终产值"
;
headers
[
7
]
=
"考核公值"
;
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
){
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/service/impl/NonStandardValueServiceImpl.java
0 → 100644
View file @
7921bc67
package
cn
.
wise
.
sc
.
cement
.
business
.
service
.
impl
;
import
cn.wise.sc.cement.business.entity.NonStandardValue
;
import
cn.wise.sc.cement.business.mapper.NonStandardValueMapper
;
import
cn.wise.sc.cement.business.model.BaseResponse
;
import
cn.wise.sc.cement.business.model.PageQuery
;
import
cn.wise.sc.cement.business.model.vo.NonStandardValueVo
;
import
cn.wise.sc.cement.business.service.INonStandardValueService
;
import
cn.wise.sc.cement.business.util.ExcelUtil
;
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.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* <p>
* 服务实现类
* </p>
*
* @author wlb
* @since 2020-09-23
*/
@Service
public
class
NonStandardValueServiceImpl
extends
ServiceImpl
<
NonStandardValueMapper
,
NonStandardValue
>
implements
INonStandardValueService
{
@Resource
private
NonStandardValueMapper
nonStandardValueMapper
;
@Override
public
BaseResponse
<
IPage
<
NonStandardValueVo
>>
getPage
(
PageQuery
pageQuery
,
Integer
status
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"status"
,
status
);
Page
<
NonStandardValueVo
>
page
=
new
Page
<>(
pageQuery
.
getPageNo
(),
pageQuery
.
getPageSize
());
IPage
<
NonStandardValueVo
>
pages
=
nonStandardValueMapper
.
getPage
(
page
,
params
);
return
BaseResponse
.
okData
(
pages
);
}
@Override
public
BaseResponse
<
List
<
NonStandardValue
>>
getList
()
{
QueryWrapper
<
NonStandardValue
>
qw
=
new
QueryWrapper
<>();
qw
.
eq
(
"status"
,
1
);
List
<
NonStandardValue
>
list
=
this
.
list
(
qw
);
return
BaseResponse
.
okData
(
list
);
}
@Override
public
void
exportList
(
Integer
id
,
String
filename
,
String
account
,
String
name
,
HttpServletResponse
response
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"id"
,
id
);
params
.
put
(
"name"
,
name
);
params
.
put
(
"account"
,
account
);
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
()];
headers
[
0
]
=
"序号"
;
headers
[
1
]
=
"姓名"
;
headers
[
2
]
=
"账户"
;
headers
[
3
]
=
"起止日期"
;
headers
[
4
]
=
"上报工时"
;
headers
[
5
]
=
"考核公值"
;
headers
[
6
]
=
"最终产值"
;
headers
[
7
]
=
"工作类别"
;
headers
[
8
]
=
"工作描述"
;
headers
[
9
]
=
"开始时间"
;
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
){
obj
=
obj
.
split
(
"\\."
)[
0
];
}
objects
[
j
]
=
obj
;
}
datas
.
add
(
objects
);
}
ExcelUtil
.
excelExport
(
filename
==
null
||
filename
.
trim
().
length
()
<=
0
?
"非标产值"
:
filename
,
headers
,
datas
,
response
);
}
}
}
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