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
6da27071
Commit
6da27071
authored
Sep 28, 2020
by
竹天卫
Browse files
Options
Browse Files
Download
Plain Diff
校核接口完成 优化委托流程
parents
59a26a98
7921bc67
Show whitespace changes
Inline
Side-by-side
Showing
76 changed files
with
4199 additions
and
68 deletions
+4199
-68
CapabilityManagementController.java
...t/business/controller/CapabilityManagementController.java
+114
-0
EntrustController.java
...wise/sc/cement/business/controller/EntrustController.java
+0
-6
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
NormProductionController.java
.../cement/business/controller/NormProductionController.java
+136
-0
QualityController.java
...wise/sc/cement/business/controller/QualityController.java
+56
-0
ReportController.java
.../wise/sc/cement/business/controller/ReportController.java
+91
-0
CapabilityManagement.java
.../wise/sc/cement/business/entity/CapabilityManagement.java
+55
-0
EntrustReport.java
...java/cn/wise/sc/cement/business/entity/EntrustReport.java
+87
-0
EntrustSample.java
...java/cn/wise/sc/cement/business/entity/EntrustSample.java
+25
-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
NormProduction.java
...ava/cn/wise/sc/cement/business/entity/NormProduction.java
+126
-0
NormProductionStatistics.java
...e/sc/cement/business/entity/NormProductionStatistics.java
+33
-0
Sample.java
...c/main/java/cn/wise/sc/cement/business/entity/Sample.java
+1
-1
SampleCheckTeam.java
...va/cn/wise/sc/cement/business/entity/SampleCheckTeam.java
+14
-17
SampleHandle.java
.../java/cn/wise/sc/cement/business/entity/SampleHandle.java
+1
-1
CapabilityManagementMapper.java
...sc/cement/business/mapper/CapabilityManagementMapper.java
+24
-0
EntrustMapper.java
...java/cn/wise/sc/cement/business/mapper/EntrustMapper.java
+3
-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
NormProductionMapper.java
.../wise/sc/cement/business/mapper/NormProductionMapper.java
+16
-0
SampleCheckTeamMapper.java
...wise/sc/cement/business/mapper/SampleCheckTeamMapper.java
+5
-0
SampleDistributionMapper.java
...e/sc/cement/business/mapper/SampleDistributionMapper.java
+5
-0
SampleHandleMapper.java
...cn/wise/sc/cement/business/mapper/SampleHandleMapper.java
+4
-0
CapabilityManagementMapper.xml
...cement/business/mapper/xml/CapabilityManagementMapper.xml
+26
-0
EntrustMapper.xml
...a/cn/wise/sc/cement/business/mapper/xml/EntrustMapper.xml
+46
-31
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
NormProductionMapper.xml
...se/sc/cement/business/mapper/xml/NormProductionMapper.xml
+5
-0
SampleCheckTeamMapper.xml
...e/sc/cement/business/mapper/xml/SampleCheckTeamMapper.xml
+13
-0
SampleDistributionMapper.xml
...c/cement/business/mapper/xml/SampleDistributionMapper.xml
+11
-3
SampleHandleMapper.xml
...wise/sc/cement/business/mapper/xml/SampleHandleMapper.xml
+8
-2
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
SampleCheckTeamQuery.java
.../sc/cement/business/model/query/SampleCheckTeamQuery.java
+1
-3
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
NormProductionVo.java
...cn/wise/sc/cement/business/model/vo/NormProductionVo.java
+94
-0
ICapabilityManagementService.java
...cement/business/service/ICapabilityManagementService.java
+64
-0
IEntrustService.java
...a/cn/wise/sc/cement/business/service/IEntrustService.java
+4
-1
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
INormProductionService.java
...se/sc/cement/business/service/INormProductionService.java
+74
-0
ISampleCheckTeamService.java
...e/sc/cement/business/service/ISampleCheckTeamService.java
+8
-0
ISampleDistributionService.java
...c/cement/business/service/ISampleDistributionService.java
+8
-0
ISampleHandleService.java
...wise/sc/cement/business/service/ISampleHandleService.java
+8
-0
CapabilityManagementServiceImpl.java
...usiness/service/impl/CapabilityManagementServiceImpl.java
+100
-0
EntrustServiceImpl.java
...e/sc/cement/business/service/impl/EntrustServiceImpl.java
+133
-1
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
NormProductionServiceImpl.java
...ment/business/service/impl/NormProductionServiceImpl.java
+594
-0
SampleCheckTeamServiceImpl.java
...ent/business/service/impl/SampleCheckTeamServiceImpl.java
+15
-0
SampleDistributionServiceImpl.java
.../business/service/impl/SampleDistributionServiceImpl.java
+12
-0
SampleHandleServiceImpl.java
...cement/business/service/impl/SampleHandleServiceImpl.java
+11
-0
PageUtil.java
...c/main/java/cn/wise/sc/cement/business/util/PageUtil.java
+23
-0
application.yml
cement-business/src/main/resources/application.yml
+1
-1
GeneratorApplication.java
.../main/java/cn/wise/sc/cement/mg/GeneratorApplication.java
+1
-1
No files found.
cement-business/src/main/java/cn/wise/sc/cement/business/controller/CapabilityManagementController.java
0 → 100644
View file @
6da27071
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/EntrustController.java
View file @
6da27071
package
cn
.
wise
.
sc
.
cement
.
business
.
controller
;
import
cn.wise.sc.cement.business.entity.Project
;
import
cn.wise.sc.cement.business.model.BaseResponse
;
import
cn.wise.sc.cement.business.model.PageQuery
;
import
cn.wise.sc.cement.business.model.query.*
;
import
cn.wise.sc.cement.business.model.vo.EntrustVo
;
import
cn.wise.sc.cement.business.service.IEntrustService
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.models.auth.In
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
import
java.util.Map
;
/**
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/controller/HistoryArchivesController.java
0 → 100644
View file @
6da27071
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 @
6da27071
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 @
6da27071
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 @
6da27071
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/controller/NormProductionController.java
0 → 100644
View file @
6da27071
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.NormProduction
;
import
cn.wise.sc.cement.business.entity.NormProductionStatistics
;
import
cn.wise.sc.cement.business.model.BaseResponse
;
import
cn.wise.sc.cement.business.model.PageQuery
;
import
cn.wise.sc.cement.business.model.vo.NormProductionVo
;
import
cn.wise.sc.cement.business.service.INormProductionService
;
import
cn.wise.sc.cement.business.util.PageUtil
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.data.domain.PageRequest
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
/**
* <p>
* 前端控制器
* </p>
*
* @author ztw
* @since 2020-09-23
*/
@RestController
@Api
(
tags
=
"人员产值统计-标准产值"
)
@RequestMapping
(
"/business/norm/production"
)
public
class
NormProductionController
{
final
INormProductionService
iNormProductionService
;
public
NormProductionController
(
INormProductionService
iNormProductionService
)
{
this
.
iNormProductionService
=
iNormProductionService
;
}
@PostMapping
(
"/create"
)
@ApiOperation
(
"新增标准产值配置"
)
public
BaseResponse
<
NormProduction
>
addObj
(
@RequestBody
NormProduction
normProduction
)
{
return
iNormProductionService
.
addObj
(
normProduction
);
}
@GetMapping
(
"/page"
)
@ApiOperation
(
"分页查询"
)
public
BaseResponse
<
IPage
<
NormProductionVo
>>
page
(
PageQuery
pageQuery
)
{
return
iNormProductionService
.
getPage
(
pageQuery
);
}
@PutMapping
(
"/edit"
)
@ApiOperation
(
"编辑标注产值配置"
)
public
BaseResponse
<
Boolean
>
edit
(
@RequestBody
NormProduction
production
)
{
return
iNormProductionService
.
edit
(
production
);
}
@GetMapping
(
"/{id}"
)
@ApiOperation
(
"根据id获取标准产值配置"
)
public
BaseResponse
<
NormProduction
>
getById
(
@PathVariable
(
"id"
)
Integer
id
)
{
if
(
id
==
null
||
id
<=
0
)
{
return
BaseResponse
.
errorMsg
(
"id不能为空!"
);
}
NormProduction
rts
=
iNormProductionService
.
getById
(
id
);
if
(
rts
!=
null
)
{
return
BaseResponse
.
okData
(
rts
);
}
else
{
return
BaseResponse
.
errorMsg
(
"没找着符合要求的信息!"
);
}
}
@PutMapping
(
"/status/{id}"
)
@ApiOperation
(
"启用/禁用"
)
public
BaseResponse
<
Integer
>
activeOrForbidden
(
@PathVariable
(
"id"
)
Integer
id
)
{
if
(
id
==
null
||
id
<=
0
)
{
return
BaseResponse
.
errorMsg
(
"编号id不能为空!"
);
}
return
iNormProductionService
.
activeOrForbidden
(
id
);
}
@GetMapping
(
"/statistics"
)
@ApiOperation
(
"标准产值统计"
)
public
BaseResponse
normProductionStatistics
(
String
start
,
String
end
,
String
name
,
PageQuery
pageQuery
)
{
Long
startTime
=
null
;
Long
endTime
=
null
;
if
(
StrUtil
.
isNotBlank
(
start
)
&&
StrUtil
.
isNotBlank
(
end
))
{
startTime
=
DateUtil
.
parseDate
(
start
).
getTime
();
endTime
=
DateUtil
.
parseDate
(
end
).
getTime
();
}
//将list拆分成分页
BaseResponse
<
List
<
NormProductionStatistics
>>
baseResponse
=
iNormProductionService
.
normProductionStatistics
(
startTime
,
endTime
,
name
);
if
(
baseResponse
.
getCode
()
==
200
)
{
List
<
NormProductionStatistics
>
data
=
baseResponse
.
getData
();
if
(
data
.
size
()
!=
0
)
{
Page
<
NormProductionStatistics
>
rts
=
PageUtil
.
listConvertToPage
(
data
,
pageQuery
);
return
BaseResponse
.
okData
(
rts
);
}
}
return
baseResponse
;
}
@GetMapping
(
"/statistics/detail"
)
@ApiOperation
(
"标准产值详情"
)
public
BaseResponse
normProductionDetails
(
Integer
userId
,
String
start
,
String
end
,
PageQuery
pageQuery
)
{
Long
startTime
=
null
;
Long
endTime
=
null
;
if
(
StrUtil
.
isNotBlank
(
start
)
&&
StrUtil
.
isNotBlank
(
end
))
{
startTime
=
DateUtil
.
parseDate
(
start
).
getTime
();
endTime
=
DateUtil
.
parseDate
(
end
).
getTime
();
}
List
<
NormProduction
.
NormProductionDetail
>
data
=
iNormProductionService
.
normProductionDetails
(
userId
,
startTime
,
endTime
);
if
(
data
.
size
()
!=
0
)
{
Page
<
NormProduction
.
NormProductionDetail
>
rts
=
PageUtil
.
listConvertToPage
(
data
,
pageQuery
);
return
BaseResponse
.
okData
(
rts
);
}
return
BaseResponse
.
okData
(
data
);
}
}
cement-business/src/main/java/cn/wise/sc/cement/business/controller/QualityController.java
0 → 100644
View file @
6da27071
package
cn
.
wise
.
sc
.
cement
.
business
.
controller
;
import
cn.wise.sc.cement.business.entity.EntrustReport
;
import
cn.wise.sc.cement.business.model.BaseResponse
;
import
cn.wise.sc.cement.business.model.PageQuery
;
import
cn.wise.sc.cement.business.service.IEntrustService
;
import
cn.wise.sc.cement.business.util.PageUtil
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
* @description: Quality
* @author: qh
* @create: 2020-09-28 09:49
**/
@Api
(
tags
=
"质量管理"
)
@Slf4j
@RestController
@RequestMapping
(
"/business/quality"
)
public
class
QualityController
{
final
IEntrustService
iEntrustService
;
public
QualityController
(
IEntrustService
iEntrustService
)
{
this
.
iEntrustService
=
iEntrustService
;
}
@GetMapping
(
"/{entrustId}"
)
@ApiOperation
(
"获取报告详情"
)
public
BaseResponse
<
com
.
baomidou
.
mybatisplus
.
extension
.
plugins
.
pagination
.
Page
<
EntrustReport
>>
getReportDetail
(
@PathVariable
(
"entrustId"
)
Integer
entrustId
,
PageQuery
pageQuery
)
{
List
<
EntrustReport
>
entrustReports
=
iEntrustService
.
getReportDetail
(
entrustId
);
if
(
entrustReports
.
size
()
!=
0
)
{
//过滤 id==null 和 projectType != '常规项目'
List
<
EntrustReport
>
list
=
entrustReports
.
stream
()
.
filter
(
arg
->
arg
.
getId
()
!=
null
&&
"质量控制"
.
equals
(
arg
.
getProjectType
()))
.
collect
(
Collectors
.
toList
());
Page
<
EntrustReport
>
rts
=
PageUtil
.
listConvertToPage
(
list
,
pageQuery
);
return
BaseResponse
.
okData
(
rts
);
}
return
BaseResponse
.
errorMsg
(
"没找到相关数据!"
);
}
}
cement-business/src/main/java/cn/wise/sc/cement/business/controller/ReportController.java
0 → 100644
View file @
6da27071
package
cn
.
wise
.
sc
.
cement
.
business
.
controller
;
import
cn.wise.sc.cement.business.entity.EntrustReport
;
import
cn.wise.sc.cement.business.model.BaseResponse
;
import
cn.wise.sc.cement.business.model.PageQuery
;
import
cn.wise.sc.cement.business.model.vo.EntrustVo
;
import
cn.wise.sc.cement.business.service.IEntrustService
;
import
cn.wise.sc.cement.business.util.PageUtil
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
* @description: 报告管理
* @author: qh
* @create: 2020-09-25 14:37
**/
@Api
(
tags
=
"报告管理"
)
@Slf4j
@RestController
@RequestMapping
(
"/business/report"
)
public
class
ReportController
{
final
IEntrustService
iEntrustService
;
public
ReportController
(
IEntrustService
iEntrustService
)
{
this
.
iEntrustService
=
iEntrustService
;
}
@ApiOperation
(
value
=
"委托分页列表"
)
@ApiImplicitParams
(
value
=
{
@ApiImplicitParam
(
name
=
"startDate"
,
value
=
"开始日期"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"endDate"
,
value
=
"结束日期"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"clientId"
,
value
=
"委托单位id"
,
paramType
=
"query"
,
dataType
=
"Integer"
),
@ApiImplicitParam
(
name
=
"projectName"
,
value
=
"项目名称"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"projectCode"
,
value
=
"项目编号"
,
paramType
=
"query"
,
dataType
=
"String"
)
})
@GetMapping
(
"/getPage"
)
public
BaseResponse
<
IPage
<
EntrustVo
>>
page
(
PageQuery
pageQuery
,
String
startDate
,
String
endDate
,
Integer
clientId
,
String
projectName
,
String
projectCode
)
{
return
iEntrustService
.
getReportPage
(
pageQuery
,
startDate
,
endDate
,
clientId
,
projectName
,
projectCode
);
}
@ApiOperation
(
value
=
"置顶取消置顶 (createTime = updateTime显示置顶,否则显示取消置顶)"
)
@PostMapping
(
"/setTopping"
)
public
BaseResponse
<
String
>
setTopping
(
Integer
id
)
{
try
{
return
iEntrustService
.
setTopping
(
id
);
}
catch
(
Exception
e
)
{
log
.
debug
(
"置顶取消置顶 {}"
,
e
.
getMessage
());
}
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
@DeleteMapping
(
"/{id}"
)
@ApiOperation
(
"删除报告"
)
public
BaseResponse
<
Boolean
>
deleteById
(
@PathVariable
(
"id"
)
Integer
id
)
{
return
iEntrustService
.
deleteById
(
id
);
}
@GetMapping
(
"/{entrustId}"
)
@ApiOperation
(
"获取报告详情"
)
public
BaseResponse
<
Page
<
EntrustReport
>>
getReportDetail
(
@PathVariable
(
"entrustId"
)
Integer
entrustId
,
PageQuery
pageQuery
)
{
List
<
EntrustReport
>
entrustReports
=
iEntrustService
.
getReportDetail
(
entrustId
);
if
(
entrustReports
.
size
()
!=
0
)
{
//过滤 id==null 和 projectType != '常规项目'
List
<
EntrustReport
>
list
=
entrustReports
.
stream
()
.
filter
(
arg
->
arg
.
getId
()
!=
null
&&
"常规项目"
.
equals
(
arg
.
getProjectType
()))
.
collect
(
Collectors
.
toList
());
Page
<
EntrustReport
>
rts
=
PageUtil
.
listConvertToPage
(
list
,
pageQuery
);
return
BaseResponse
.
okData
(
rts
);
}
return
BaseResponse
.
errorMsg
(
"没找到相关数据!"
);
}
}
cement-business/src/main/java/cn/wise/sc/cement/business/entity/CapabilityManagement.java
0 → 100644
View file @
6da27071
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/EntrustReport.java
0 → 100644
View file @
6da27071
package
cn
.
wise
.
sc
.
cement
.
business
.
entity
;
import
lombok.Data
;
/**
* @description: 委托报告
* @author: qh
* @create: 2020-09-25 20:36
**/
@Data
public
class
EntrustReport
{
private
Integer
id
;
/**
* 项目名字
*/
private
String
projectName
;
/**
* 委托人
*/
private
String
sendName
;
/**
* 委托方id
*/
private
Integer
clintId
;
/**
* 样品id
*/
private
Integer
sampleId
;
/**
* 项目id
*/
private
Integer
entrustId
;
/**
* 检测项目ids
*/
private
String
teamIds
;
/**
* 检测项目
*/
private
String
teamName
;
/**
* 检测依据 ids
*/
private
String
methodNumbers
;
/**
* 检测依据名字
*/
private
String
methodName
;
/**
* 样品名字
*/
private
String
name
;
/**
* 校核id
*/
private
Integer
checkId
;
/**
* 机械仪器名字
*/
private
String
equipmentName
;
/**
* 用户id
*/
private
Integer
userId
;
/**
* 项目编号
*/
private
String
entrustCode
;
/**
* 项目类型
*/
private
String
projectType
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/entity/EntrustSample.java
0 → 100644
View file @
6da27071
package
cn
.
wise
.
sc
.
cement
.
business
.
entity
;
import
io.swagger.models.auth.In
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
/**
* @description:
* @author: qh
* @create: 2020-09-23 16:14
**/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
@Accessors
(
chain
=
true
)
public
class
EntrustSample
{
private
String
projectName
;
private
Integer
entrustId
;
private
String
entrustCode
;
private
String
sampleName
;
private
Integer
sampleId
;
private
Integer
distributionId
;
private
Integer
teamGroupId
;
private
Integer
userId
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/entity/HistoryArchives.java
0 → 100644
View file @
6da27071
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 @
6da27071
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 @
6da27071
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 @
6da27071
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/entity/NormProduction.java
0 → 100644
View file @
6da27071
package
cn
.
wise
.
sc
.
cement
.
business
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.time.LocalDateTime
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
/**
* <p>
*
* </p>
*
* @author ztw
* @since 2020-09-23
*/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
@Accessors
(
chain
=
true
)
public
class
NormProduction
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键
*/
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Integer
id
;
/**
* 检查组id
*/
@ApiModelProperty
(
"检查组id"
)
private
Integer
assessId
;
/**
* 类型 0:检测组 1:处理项
*/
@ApiModelProperty
(
"类型 0:检测组 1:处理项"
)
private
Integer
type
;
/**
* 定额工日
*/
@ApiModelProperty
(
"定额工日"
)
private
Double
quotaDay
;
/**
* 报出分析结果
*/
@ApiModelProperty
(
"报出分析结果"
)
private
Double
reportedAnalyseResult
;
/**
* 建议系数
*/
@ApiModelProperty
(
"建议系数"
)
private
Double
coefficient
;
/**
* 考核工值
*/
@ApiModelProperty
(
"考核工值"
)
private
Double
assessValue
;
/**
* 分析占比
*/
@ApiModelProperty
(
"分析占比"
)
private
Double
analyseRate
;
/**
* 分样占比
*/
@ApiModelProperty
(
"分样占比"
)
private
Double
separateRate
;
/**
* 考核占比
*/
@ApiModelProperty
(
"考核占比"
)
private
Double
assessRate
;
/**
* 报结果占比
*/
@ApiModelProperty
(
"报结果占比"
)
private
Double
reportedResultRate
;
/**
* 状态
*/
@ApiModelProperty
(
"状态"
)
private
Integer
status
;
/**
* 标准产值详情
*/
@Data
public
static
class
NormProductionDetail
{
private
String
userName
;
private
Integer
distributionId
;
private
Integer
userId
;
private
Integer
entrustId
;
private
Integer
assessId
;
private
LocalDateTime
checkTime
;
private
Double
analyseRate
;
private
Double
separateRate
;
private
Double
assessRate
;
private
Double
reportedResultRate
;
private
String
projectName
;
private
String
sampleName
;
private
String
entrustCode
;
private
Integer
sampleId
;
private
BigDecimal
workTimeCoefficient
;
private
Integer
type
;
private
String
groupTeamName
;
private
Integer
groupId
;
}
}
cement-business/src/main/java/cn/wise/sc/cement/business/entity/NormProductionStatistics.java
0 → 100644
View file @
6da27071
package
cn
.
wise
.
sc
.
cement
.
business
.
entity
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* @description: 标准产值统计对象
* @author: qh
* @create: 2020-09-23 18:18
**/
@Data
public
class
NormProductionStatistics
implements
Serializable
{
private
static
final
long
serialVersionUID
=
42L
;
private
String
userName
;
private
String
userId
;
private
String
account
;
private
String
sex
;
private
String
position
;
private
String
time
;
private
Long
count
;
private
Integer
coefficient
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/entity/Sample.java
View file @
6da27071
cement-business/src/main/java/cn/wise/sc/cement/business/entity/SampleCheckTeam.java
View file @
6da27071
...
...
@@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.annotation.IdType;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
java.time.LocalDateTime
;
import
java.io.Serializable
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
...
...
@@ -23,7 +22,7 @@ import lombok.experimental.Accessors;
@Accessors
(
chain
=
true
)
public
class
SampleCheckTeam
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键
...
...
@@ -48,7 +47,7 @@ public class SampleCheckTeam implements Serializable {
/**
* json串
{"样重m":"40","K值":1.0274,"Vsio2":3.89,................}
*
{"样重m":"40","K值":1.0274,"Vsio2":3.89,................}
*/
@ApiModelProperty
(
"校核人员输入检测结果 json串"
)
private
String
inputResult
;
...
...
@@ -58,6 +57,4 @@ public class SampleCheckTeam implements Serializable {
@ApiModelProperty
(
"备注"
)
private
String
remark
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/entity/SampleHandle.java
View file @
6da27071
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/CapabilityManagementMapper.java
0 → 100644
View file @
6da27071
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/EntrustMapper.java
View file @
6da27071
package
cn
.
wise
.
sc
.
cement
.
business
.
mapper
;
import
cn.wise.sc.cement.business.entity.Entrust
;
import
cn.wise.sc.cement.business.entity.EntrustReport
;
import
cn.wise.sc.cement.business.model.vo.EntrustVo
;
import
cn.wise.sc.cement.business.model.vo.ProjectVo
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
...
...
@@ -9,6 +10,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
java.util.List
;
import
java.util.Map
;
/**
...
...
@@ -35,4 +37,5 @@ public interface EntrustMapper extends BaseMapper<Entrust> {
IPage
<
EntrustVo
>
getCheckPage
(
@Param
(
"page"
)
Page
page
,
@Param
(
"params"
)
Map
<
String
,
Object
>
params
);
List
<
EntrustReport
>
getReportDetail
(
@Param
(
"entrustId"
)
Integer
entrustId
);
}
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/HistoryArchivesMapper.java
0 → 100644
View file @
6da27071
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 @
6da27071
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 @
6da27071
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 @
6da27071
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/NormProductionMapper.java
0 → 100644
View file @
6da27071
package
cn
.
wise
.
sc
.
cement
.
business
.
mapper
;
import
cn.wise.sc.cement.business.entity.NormProduction
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
* <p>
* Mapper 接口
* </p>
*
* @author ztw
* @since 2020-09-23
*/
public
interface
NormProductionMapper
extends
BaseMapper
<
NormProduction
>
{
}
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/SampleCheckTeamMapper.java
View file @
6da27071
package
cn
.
wise
.
sc
.
cement
.
business
.
mapper
;
import
cn.wise.sc.cement.business.entity.EntrustSample
;
import
cn.wise.sc.cement.business.entity.SampleCheckTeam
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
java.util.List
;
/**
* <p>
...
...
@@ -11,6 +14,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
* @author ztw
* @since 2020-08-24
*/
@Mapper
public
interface
SampleCheckTeamMapper
extends
BaseMapper
<
SampleCheckTeam
>
{
List
<
EntrustSample
>
getEntrustSample
();
}
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/SampleDistributionMapper.java
View file @
6da27071
package
cn
.
wise
.
sc
.
cement
.
business
.
mapper
;
import
cn.wise.sc.cement.business.entity.EntrustSample
;
import
cn.wise.sc.cement.business.entity.SampleDistribution
;
import
cn.wise.sc.cement.business.model.vo.SampleCheckGroupVo
;
import
cn.wise.sc.cement.business.model.vo.SampleDistributionTeamVo
;
...
...
@@ -8,6 +9,7 @@ import cn.wise.sc.cement.business.model.vo.SampleHandleVo;
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.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
...
...
@@ -21,6 +23,7 @@ import java.util.Map;
* @author ztw
* @since 2020-08-24
*/
@Mapper
public
interface
SampleDistributionMapper
extends
BaseMapper
<
SampleDistribution
>
{
IPage
<
SampleDistributionVo
>
getPage
(
@Param
(
"page"
)
Page
page
,
@Param
(
"params"
)
Map
<
String
,
Object
>
params
);
...
...
@@ -30,4 +33,6 @@ public interface SampleDistributionMapper extends BaseMapper<SampleDistribution>
@Param
(
"userId"
)
Integer
userId
);
List
<
SampleCheckGroupVo
>
getSampleCheckGroupList
(
@Param
(
"sampleId"
)
Integer
sampleId
);
List
<
EntrustSample
>
getEntrustSample
();
}
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/SampleHandleMapper.java
View file @
6da27071
package
cn
.
wise
.
sc
.
cement
.
business
.
mapper
;
import
cn.wise.sc.cement.business.entity.EntrustSample
;
import
cn.wise.sc.cement.business.entity.SampleHandle
;
import
cn.wise.sc.cement.business.model.vo.EntrustVo
;
import
cn.wise.sc.cement.business.model.vo.SampleHandleVo
;
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.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
org.apache.tomcat.jni.Local
;
...
...
@@ -22,6 +24,7 @@ import java.util.Map;
* @author ztw
* @since 2020-08-24
*/
@Mapper
public
interface
SampleHandleMapper
extends
BaseMapper
<
SampleHandle
>
{
...
...
@@ -32,4 +35,5 @@ public interface SampleHandleMapper extends BaseMapper<SampleHandle> {
@Select
(
"select MIN(accept_time) from sample_handle where sample_id = #{sampleId} and status>0"
)
LocalDateTime
getNo1AcceptTime
(
Integer
sampleId
);
List
<
EntrustSample
>
getEntrustSample
();
}
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/CapabilityManagementMapper.xml
0 → 100644
View file @
6da27071
<?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/EntrustMapper.xml
View file @
6da27071
...
...
@@ -26,6 +26,9 @@
<if
test=
"params.userId != null"
>
and e.user_id = #{params.userId}
</if>
<if
test=
"params.projectType != null and params.projectType != ''"
>
and e.project_type = #{params.projectType}
</if>
</where>
</sql>
...
...
@@ -49,7 +52,7 @@
left join project p on p.id = e.project_id
left join client c on c.id = e.client_id
left join sys_user su on su.id = e.user_id
<include
refid=
"where"
/>
<include
refid=
"where"
/>
order by e.is_urgent desc, e.update_time desc
</select>
...
...
@@ -79,7 +82,6 @@
</select>
<select
id=
"getSampleHandlePage"
resultType=
"cn.wise.sc.cement.business.model.vo.EntrustVo"
>
select e.id as id, e.sample_num as sampleNum,e.entrust_date as entrustDate,
(
...
...
@@ -174,9 +176,22 @@
left join project p on p.id = e.project_id
left join client c on c.id = e.client_id
left join sys_user su on su.id = e.user_id
<include
refid=
"checkWhere"
/>
<include
refid=
"checkWhere"
/>
order by e.update_time desc
</select>
<select
id=
"getReportDetail"
resultType=
"cn.wise.sc.cement.business.entity.EntrustReport"
>
SELECT e.id,e.project_name,e.send_name,e.client_id,e.entrust_code,e.project_type,sscct.* FROM entrust e
RIGHT JOIN
(SELECT id as sample_id,entrust_id,team_ids,method_numbers,name,scct.check_id,
scct.equipment_name,scct.user_id FROM sample s
RIGHT JOIN
(SELECT check_id,equipment_name,sample_id,user_id FROM sample_check_team sct
LEFT JOIN
(SELECT entrust_id,id FROM sample_check) sc
ON sct.check_id = sc.id) scct
ON s.sample_id = scct.sample_id) sscct
ON sscct.entrust_id = e.id AND e.id = #{entrustId}
</select>
<sql
id=
"checkWhere"
>
<where>
...
...
@@ -203,7 +218,7 @@
and e.user_id = #{params.userId}
</if>
</where>
</sql>
</sql>
</mapper>
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/HistoryArchivesMapper.xml
0 → 100644
View file @
6da27071
<?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 @
6da27071
<?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 @
6da27071
<?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 @
6da27071
<?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/mapper/xml/NormProductionMapper.xml
0 → 100644
View file @
6da27071
<?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.NormProductionMapper"
>
</mapper>
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/SampleCheckTeamMapper.xml
View file @
6da27071
...
...
@@ -2,4 +2,17 @@
<!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.SampleCheckTeamMapper"
>
<select
id=
"getEntrustSample"
resultType=
"cn.wise.sc.cement.business.entity.EntrustSample"
>
SELECT t.project_name,t.entrust_code,sscc.sample_id,sscc.entrust_id,sscc.`sample_name`,
sscc.user_id,sscc.team_group_id,sscc.distribution_id FROM entrust t
RIGHT JOIN
(SELECT s.entrust_id,s.sample_id,s.`name` as sample_name,scc.user_id,scc.team_group_id,scc.distribution_id FROM sample s
RIGHT JOIN
(SELECT id,sct.check_id,sct.sample_id,sct.user_id,team_group_id,sct.distribution_id FROM sample_check sc
RIGHT JOIN
(SELECT sample_id,user_id,check_id, id as distribution_id FROM sample_check_team) sct
ON sc.id = sct.check_id) scc
ON s.id = scc.sample_id) sscc
ON sscc.entrust_id = t.id
</select>
</mapper>
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/SampleDistributionMapper.xml
View file @
6da27071
...
...
@@ -33,7 +33,7 @@
left join sample s on s.id = t.sample_id
left join entrust e on e.id = s.entrust_id
left join project p on p.id = e.project_id
<include
refid=
"where"
/>
<include
refid=
"where"
/>
order by t.create_time desc
</select>
...
...
@@ -61,8 +61,6 @@
order by t.id asc
</select>
<select
id=
"getSampleCheckGroupList"
resultType=
"cn.wise.sc.cement.business.model.vo.SampleCheckGroupVo"
>
select sd.team_group_id as teamGroupId, tg.name as teamGroupName,
sd.user_id as userId, su.name as userName
...
...
@@ -74,5 +72,15 @@
order by sd.team_group_id
</select>
<select
id=
"getEntrustSample"
resultType=
"cn.wise.sc.cement.business.entity.EntrustSample"
>
SELECT e.project_name,e.entrust_code,g.distribution_id,g.entrust_id,g.`sample_name`,g.user_id,g.sample_id FROM entrust e
RIGHT JOIN
(SELECT s.`name` as sample_name,d.distribution_id,s.entrust_id,d.user_id,s.id as sample_id FROM sample s
RIGHT JOIN
(SELECT user_id, id as distribution_id,sample_id FROM sample_distribution ) d on s.id = d.sample_id ) g
ON g.entrust_id = e.id
</select>
</mapper>
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/SampleHandleMapper.xml
View file @
6da27071
...
...
@@ -76,8 +76,14 @@
where t.id = #{id}
</select>
<select
id=
"getEntrustSample"
resultType=
"cn.wise.sc.cement.business.entity.EntrustSample"
>
SELECT e.project_name,e.entrust_code,g.distribution_id,g.entrust_id,g.`sample_name`,g.user_id,g.sample_id FROM entrust e
RIGHT JOIN
(SELECT s.`name` as sample_name,d.distribution_id,s.entrust_id,d.user_id,s.id as sample_id FROM sample s
RIGHT JOIN
(SELECT user_id, id as distribution_id,sample_id FROM sample_handle ) d
on s.id = d.sample_id ) g ON g.entrust_id = e.id
</select>
</mapper>
cement-business/src/main/java/cn/wise/sc/cement/business/model/query/CapabilityManagementQuery.java
0 → 100644
View file @
6da27071
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 @
6da27071
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 @
6da27071
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 @
6da27071
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 @
6da27071
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/query/SampleCheckTeamQuery.java
View file @
6da27071
...
...
@@ -39,7 +39,6 @@ public class SampleCheckTeamQuery {
@ApiModelProperty
(
"检测组名称"
)
private
String
teamGroupName
;
@ApiModelProperty
(
"主样-检测人员id"
)
private
Integer
mainUserId
;
...
...
@@ -72,10 +71,9 @@ public class SampleCheckTeamQuery {
private
Integer
secondarySampleId
;
@ApiModelProperty
(
"次样检测结果 Map集合"
)
private
Map
<
String
,
Object
>
secondaryResult
;
private
Map
<
String
,
Object
>
secondaryResult
;
@ApiModelProperty
(
"最终校核计算结果 Map集合"
)
private
Map
<
String
,
Object
>
endResult
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/model/vo/CapabilityManagementVo.java
0 → 100644
View file @
6da27071
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 @
6da27071
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 @
6da27071
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 @
6da27071
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 @
6da27071
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/model/vo/NormProductionVo.java
0 → 100644
View file @
6da27071
package
cn
.
wise
.
sc
.
cement
.
business
.
model
.
vo
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* @description:
* @author: qh
* @create: 2020-09-25 13:54
**/
@Data
public
class
NormProductionVo
{
/**
* 主键
*/
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Integer
id
;
/**
* 检查组id
*/
@ApiModelProperty
(
"检查组id"
)
private
Integer
assessId
;
/**
* 类型 0:检测组 1:处理项
*/
@ApiModelProperty
(
"类型 0:检测组 1:处理项"
)
private
Integer
type
;
/**
* 定额工日
*/
@ApiModelProperty
(
"定额工日"
)
private
Double
quotaDay
;
/**
* 报出分析结果
*/
@ApiModelProperty
(
"报出分析结果"
)
private
Double
reportedAnalyseResult
;
/**
* 建议系数
*/
@ApiModelProperty
(
"建议系数"
)
private
Double
coefficient
;
/**
* 考核工值
*/
@ApiModelProperty
(
"考核工值"
)
private
Double
assessValue
;
/**
* 分析占比
*/
@ApiModelProperty
(
"分析占比"
)
private
Double
analyseRate
;
/**
* 分样占比
*/
@ApiModelProperty
(
"分样占比"
)
private
Double
separateRate
;
/**
* 考核占比
*/
@ApiModelProperty
(
"考核占比"
)
private
Double
assessRate
;
/**
* 报结果占比
*/
@ApiModelProperty
(
"报结果占比"
)
private
Double
reportedResultRate
;
/**
* 状态
*/
@ApiModelProperty
(
"状态"
)
private
Integer
status
;
/**
* 检测组名字
*/
@ApiModelProperty
(
"检测组名字"
)
private
String
assessName
;
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/ICapabilityManagementService.java
0 → 100644
View file @
6da27071
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/IEntrustService.java
View file @
6da27071
package
cn
.
wise
.
sc
.
cement
.
business
.
service
;
import
cn.wise.sc.cement.business.entity.Entrust
;
import
cn.wise.sc.cement.business.entity.EntrustReport
;
import
cn.wise.sc.cement.business.entity.SampleDistribution
;
import
cn.wise.sc.cement.business.entity.SampleHandleEnclosure
;
import
cn.wise.sc.cement.business.model.BaseResponse
;
...
...
@@ -80,7 +81,9 @@ public interface IEntrustService extends IService<Entrust> {
BaseResponse
<
String
>
check
(
CheckQuery
query
);
BaseResponse
<
IPage
<
EntrustVo
>>
getReportPage
(
PageQuery
pageQuery
,
String
startDate
,
String
endDate
,
Integer
clientId
,
String
projectName
,
String
projectCode
);
BaseResponse
<
Boolean
>
deleteById
(
Integer
id
);
List
<
EntrustReport
>
getReportDetail
(
Integer
entrustId
);
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/IHistoryArchivesService.java
0 → 100644
View file @
6da27071
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 @
6da27071
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 @
6da27071
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 @
6da27071
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/INormProductionService.java
0 → 100644
View file @
6da27071
package
cn
.
wise
.
sc
.
cement
.
business
.
service
;
import
cn.wise.sc.cement.business.entity.NormProduction
;
import
cn.wise.sc.cement.business.entity.NormProductionStatistics
;
import
cn.wise.sc.cement.business.model.BaseResponse
;
import
cn.wise.sc.cement.business.model.PageQuery
;
import
cn.wise.sc.cement.business.model.vo.NormProductionVo
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
java.util.List
;
/**
* <p>
* 服务类
* </p>
*
* @author ztw
* @since 2020-09-23
*/
public
interface
INormProductionService
extends
IService
<
NormProduction
>
{
/**
* 创建新的标准产值配置
*
* @param normProduction 标准产值
* @return BaseResponse
*/
BaseResponse
<
NormProduction
>
addObj
(
NormProduction
normProduction
);
/**
* 分页查询
*
* @param pageQuery 分页条件
* @return 数据
*/
BaseResponse
<
IPage
<
NormProductionVo
>>
getPage
(
PageQuery
pageQuery
);
/**
* 编辑标准产值
*
* @param production 标准产值
* @return bool
*/
BaseResponse
<
Boolean
>
edit
(
NormProduction
production
);
/**
* 启用禁用标准产值
*
* @param id id
* @return bool
*/
BaseResponse
<
Integer
>
activeOrForbidden
(
Integer
id
);
/**
* 标准产值统计
*
* @param start 开始时间
* @param end 结束时间
* @return BaseResponse
*/
BaseResponse
<
List
<
NormProductionStatistics
>>
normProductionStatistics
(
Long
start
,
Long
end
,
String
name
);
/**
* 标准产值统计 单人详情
*
* @param userId 用户id
* @param start 开始时间
* @param end 结束时间
* @return 详细信息
*/
List
<
NormProduction
.
NormProductionDetail
>
normProductionDetails
(
Integer
userId
,
Long
start
,
Long
end
);
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/ISampleCheckTeamService.java
View file @
6da27071
package
cn
.
wise
.
sc
.
cement
.
business
.
service
;
import
cn.wise.sc.cement.business.entity.EntrustSample
;
import
cn.wise.sc.cement.business.entity.SampleCheckTeam
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
java.util.List
;
/**
* <p>
* 服务类
...
...
@@ -13,4 +16,9 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/
public
interface
ISampleCheckTeamService
extends
IService
<
SampleCheckTeam
>
{
/**
* 获取校核信息
* @return 项目分样信息
*/
List
<
EntrustSample
>
getEntrustSample
();
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/ISampleDistributionService.java
View file @
6da27071
package
cn
.
wise
.
sc
.
cement
.
business
.
service
;
import
cn.wise.sc.cement.business.entity.EntrustSample
;
import
cn.wise.sc.cement.business.entity.SampleDistribution
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
java.util.List
;
/**
* <p>
* 服务类
...
...
@@ -12,5 +15,10 @@ import com.baomidou.mybatisplus.extension.service.IService;
* @since 2020-08-24
*/
public
interface
ISampleDistributionService
extends
IService
<
SampleDistribution
>
{
/**
* 获取派发项目和分样信息
* @return
*/
List
<
EntrustSample
>
getEntrustSample
();
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/ISampleHandleService.java
View file @
6da27071
package
cn
.
wise
.
sc
.
cement
.
business
.
service
;
import
cn.wise.sc.cement.business.entity.EntrustSample
;
import
cn.wise.sc.cement.business.entity.SampleHandle
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
java.util.List
;
/**
* <p>
* 服务类
...
...
@@ -13,4 +16,9 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/
public
interface
ISampleHandleService
extends
IService
<
SampleHandle
>
{
/**
* 获取处理信息
* @return list
*/
List
<
EntrustSample
>
getEntrustSample
();
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/CapabilityManagementServiceImpl.java
0 → 100644
View file @
6da27071
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/EntrustServiceImpl.java
View file @
6da27071
package
cn
.
wise
.
sc
.
cement
.
business
.
service
.
impl
;
import
cn.hutool.core.util.StrUtil
;
import
cn.wise.sc.cement.business.entity.*
;
import
cn.wise.sc.cement.business.mapper.*
;
import
cn.wise.sc.cement.business.model.BaseResponse
;
...
...
@@ -10,6 +11,9 @@ import cn.wise.sc.cement.business.model.vo.*;
import
cn.wise.sc.cement.business.service.*
;
import
cn.wise.sc.cement.business.util.CheckCountUtil
;
import
cn.wise.sc.cement.business.util.RedisUtil
;
import
cn.wise.sc.cement.business.wrapper.page.Query
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
...
...
@@ -1207,7 +1211,7 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
for
(
Sample
sample
:
sampleList
){
SampleVo
sampleVo
=
new
SampleVo
();
BeanUtils
.
copyProperties
(
sample
,
sampleVo
);
List
<
SampleDistributionTeamVo
>
sampleDistributionTeamVoList
=
distributionMapper
.
getDistributionTeamList
(
sample
.
getId
(),
null
,
null
);
List
<
SampleDistributionTeamVo
>
sampleDistributionTeamVoList
=
distributionMapper
.
getDistributionTeamList
(
sample
.
getId
(),
null
,
null
);
if
(
sampleDistributionTeamVoList
!=
null
&&
sampleDistributionTeamVoList
.
size
()>
0
)
{
sampleVo
.
setSampleDistributionTeamVoList
(
sampleDistributionTeamVoList
);
}
else
{
...
...
@@ -1560,5 +1564,133 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
return
BaseResponse
.
okMsg
(
"数据校核完成"
);
}
@Override
public
BaseResponse
<
IPage
<
EntrustVo
>>
getReportPage
(
PageQuery
pageQuery
,
String
startDate
,
String
endDate
,
Integer
clientId
,
String
projectName
,
String
projectCode
)
{
LoginUser
loginUser
=
userService
.
getLoginUser
();
if
(
loginUser
==
null
)
{
return
BaseResponse
.
errorMsg
(
"请登录账号"
);
}
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"startDate"
,
startDate
);
params
.
put
(
"endDate"
,
endDate
);
params
.
put
(
"status"
,
8
);
params
.
put
(
"clientId"
,
clientId
);
params
.
put
(
"projectName"
,
projectName
);
params
.
put
(
"projectCode"
,
projectCode
);
params
.
put
(
"projectType"
,
"常规项目"
);
Integer
approvalId
=
sysApprovalMapper
.
getApprovalId
(
"委托评审"
);
if
(
approvalId
==
null
)
{
return
BaseResponse
.
errorMsg
(
"委托评审信息错误"
);
}
if
(
loginUser
.
getId
()
!=
approvalId
)
{
params
.
put
(
"userId"
,
loginUser
.
getId
());
}
Page
<
EntrustVo
>
page
=
new
Page
<>(
pageQuery
.
getPageNo
(),
pageQuery
.
getPageSize
());
IPage
<
EntrustVo
>
pages
=
entrustMapper
.
getPage
(
page
,
params
);
List
<
EntrustVo
>
list
=
pages
.
getRecords
();
if
(
list
!=
null
&&
list
.
size
()
>
0
)
{
for
(
EntrustVo
entrustVo
:
list
)
{
QueryWrapper
<
SampleTmp
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"entrust_id"
,
entrustVo
.
getId
());
List
<
SampleTmp
>
sampleTmpList
=
sampleTmpService
.
list
(
queryWrapper
);
//检测项目名称
String
sampleNames
=
""
;
if
(
sampleTmpList
!=
null
&&
sampleTmpList
.
size
()
>
0
)
{
//样品名称 列表中的拼接
for
(
SampleTmp
sampleTmp
:
sampleTmpList
)
{
sampleNames
=
sampleNames
.
equals
(
""
)
?
sampleTmp
.
getName
()
:
(
sampleNames
+
"、"
+
sampleTmp
.
getName
());
}
entrustVo
.
setSampleNames
(
sampleNames
);
//检测项 和检测依据 列表里只显示第一个样品的
SampleTmp
sampleTmp
=
sampleTmpList
.
get
(
0
);
String
teamIds
=
sampleTmp
.
getTeamIds
();
String
checkTeam
=
""
;
if
(
teamIds
!=
null
)
{
String
[]
teamIdS
=
teamIds
.
split
(
"、"
);
for
(
String
teamId
:
teamIdS
)
{
Team
team
=
teamMapper
.
selectById
(
Integer
.
valueOf
(
teamId
));
if
(
team
!=
null
)
{
checkTeam
=
checkTeam
.
equals
(
""
)
?
team
.
getName
()
:
(
checkTeam
+
"、"
+
team
.
getName
());
}
}
}
entrustVo
.
setCheckTeam
(
checkTeam
);
entrustVo
.
setCheckMethodNumber
(
sampleTmp
.
getMethodNumbers
());
}
}
}
pages
.
setRecords
(
list
);
return
BaseResponse
.
okData
(
pages
);
}
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
BaseResponse
<
Boolean
>
deleteById
(
Integer
id
)
{
if
(
id
==
null
||
id
<=
0
)
{
return
BaseResponse
.
errorMsg
(
"id编号不能为空!"
);
}
Entrust
entrust
=
this
.
getById
(
id
);
entrust
.
setIsDelete
(
0
);
boolean
b
=
this
.
updateById
(
entrust
);
return
BaseResponse
.
okData
(
b
);
}
@Override
public
List
<
EntrustReport
>
getReportDetail
(
Integer
entrustId
)
{
List
<
EntrustReport
>
list
=
entrustMapper
.
getReportDetail
(
entrustId
);
String
teamKey
=
"CACHE:TEAM"
;
String
methodKey
=
"METHOD:KEY"
;
//缓存 60s
if
(!
redisUtil
.
existsKey
(
teamKey
))
{
List
<
Team
>
teams
=
teamMapper
.
selectList
(
new
QueryWrapper
<>());
String
value
=
JSON
.
toJSONString
(
teams
);
redisUtil
.
setString
(
teamKey
,
value
,
60
);
}
if
(!
redisUtil
.
existsKey
(
methodKey
))
{
List
<
Method
>
methods
=
methodMapper
.
selectList
(
new
QueryWrapper
<>());
String
value
=
JSON
.
toJSONString
(
methods
);
redisUtil
.
setString
(
methodKey
,
value
,
60
);
}
List
<
Team
>
teams
=
JSON
.
parseArray
(
redisUtil
.
getString
(
teamKey
)
+
""
,
Team
.
class
);
List
<
Method
>
methods
=
JSON
.
parseArray
(
redisUtil
.
getString
(
methodKey
)
+
""
,
Method
.
class
);
list
.
forEach
(
arg
->
{
String
teamIds
=
arg
.
getTeamIds
();
String
[]
teamSplit
=
teamIds
.
split
(
"、"
);
for
(
String
idStr
:
teamSplit
)
{
int
id
=
Integer
.
parseInt
(
idStr
);
teams
.
forEach
(
opt
->
{
if
(
opt
.
getId
()
==
id
)
{
if
(
StrUtil
.
isBlank
(
arg
.
getTeamName
()))
{
arg
.
setTeamName
(
opt
.
getName
());
}
else
{
arg
.
setTeamName
(
arg
.
getTeamName
()
+
"、"
+
opt
.
getName
());
}
}
});
}
String
methodNumbers
=
arg
.
getMethodNumbers
();
String
[]
methodSplit
=
methodNumbers
.
split
(
"、"
);
for
(
String
idStr
:
methodSplit
)
{
int
id
=
Integer
.
parseInt
(
idStr
);
methods
.
forEach
(
opt
->
{
if
(
opt
.
getId
()
==
id
)
{
if
(
StrUtil
.
isBlank
(
arg
.
getMethodName
()))
{
arg
.
setMethodName
(
opt
.
getName
());
}
else
{
arg
.
setMethodName
(
arg
.
getMethodName
()
+
"、"
+
opt
.
getName
());
}
}
});
}
});
return
list
;
}
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/HistoryArchivesServiceImpl.java
0 → 100644
View file @
6da27071
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 @
6da27071
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 @
6da27071
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 @
6da27071
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
);
}
}
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/NormProductionServiceImpl.java
0 → 100644
View file @
6da27071
package
cn
.
wise
.
sc
.
cement
.
business
.
service
.
impl
;
import
cn.hutool.core.bean.BeanUtil
;
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.EntrustSample
;
import
cn.wise.sc.cement.business.entity.Handle
;
import
cn.wise.sc.cement.business.entity.NormProduction
;
import
cn.wise.sc.cement.business.entity.NormProductionStatistics
;
import
cn.wise.sc.cement.business.entity.SampleCheckTeam
;
import
cn.wise.sc.cement.business.entity.SampleDistribution
;
import
cn.wise.sc.cement.business.entity.SampleHandle
;
import
cn.wise.sc.cement.business.entity.SysPost
;
import
cn.wise.sc.cement.business.entity.SysUser
;
import
cn.wise.sc.cement.business.entity.TeamGroup
;
import
cn.wise.sc.cement.business.mapper.NormProductionMapper
;
import
cn.wise.sc.cement.business.model.BaseResponse
;
import
cn.wise.sc.cement.business.model.PageQuery
;
import
cn.wise.sc.cement.business.model.vo.NormProductionVo
;
import
cn.wise.sc.cement.business.service.IHandleService
;
import
cn.wise.sc.cement.business.service.INormProductionService
;
import
cn.wise.sc.cement.business.service.ISampleCheckTeamService
;
import
cn.wise.sc.cement.business.service.ISampleDistributionService
;
import
cn.wise.sc.cement.business.service.ISampleHandleService
;
import
cn.wise.sc.cement.business.service.ISysPostService
;
import
cn.wise.sc.cement.business.service.ISysUserService
;
import
cn.wise.sc.cement.business.service.ITeamGroupService
;
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.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
/**
* <p>
* 服务实现类
* </p>
*
* @author ztw
* @since 2020-09-23
*/
@Service
public
class
NormProductionServiceImpl
extends
ServiceImpl
<
NormProductionMapper
,
NormProduction
>
implements
INormProductionService
{
final
public
Map
<
String
,
NormProduction
>
normProductionCache
=
new
HashMap
<>();
final
ISampleDistributionService
iSampleDistributionService
;
final
ISampleHandleService
iSampleHandleService
;
final
ISysUserService
iSysUserService
;
final
ISampleCheckTeamService
iSampleCheckTeamService
;
final
ITeamGroupService
iTeamGroupService
;
final
IHandleService
iHandleService
;
final
ISysPostService
iSysPostService
;
public
NormProductionServiceImpl
(
ISampleDistributionService
iSampleDistributionService
,
ISampleHandleService
iSampleHandleService
,
ISysUserService
iSysUserService
,
ISampleCheckTeamService
iSampleCheckTeamService
,
ITeamGroupService
iTeamGroupService
,
IHandleService
iHandleService
,
ISysPostService
iSysPostService
)
{
this
.
iSampleDistributionService
=
iSampleDistributionService
;
this
.
iSampleHandleService
=
iSampleHandleService
;
this
.
iSysUserService
=
iSysUserService
;
this
.
iSampleCheckTeamService
=
iSampleCheckTeamService
;
this
.
iTeamGroupService
=
iTeamGroupService
;
this
.
iHandleService
=
iHandleService
;
this
.
iSysPostService
=
iSysPostService
;
}
@Override
public
BaseResponse
<
NormProduction
>
addObj
(
NormProduction
normProduction
)
{
//判断配置项目是否已存在
QueryWrapper
<
NormProduction
>
qw
=
new
QueryWrapper
<>();
qw
.
eq
(
"assess_id"
,
normProduction
.
getAssessId
());
qw
.
eq
(
"type"
,
normProduction
.
getType
());
qw
.
eq
(
"status"
,
1
);
int
count
=
this
.
count
(
qw
);
if
(
count
!=
0
)
{
return
BaseResponse
.
errorMsg
(
"当前标准产值已存在!"
);
}
//判断比例是否为总值100%
// if (normProduction.getAnalyseRate()
// + normProduction.getAssessRate()
// + normProduction.getSeparateRate()
// + normProduction.getReportedResultRate() != 1) {
// return BaseResponse.errorMsg("百分比总和不等于1");
// }
//状态为1
normProduction
.
setStatus
(
1
);
boolean
save
=
this
.
save
(
normProduction
);
if
(
save
)
{
return
BaseResponse
.
okData
(
normProduction
);
}
else
{
return
BaseResponse
.
errorMsg
(
"失败!"
);
}
}
@Override
public
BaseResponse
<
IPage
<
NormProductionVo
>>
getPage
(
PageQuery
pageQuery
)
{
IPage
<
NormProduction
>
page
=
new
Page
<>(
pageQuery
.
getPageNo
(),
pageQuery
.
getPageSize
());
IPage
<
NormProduction
>
productionIPage
=
this
.
page
(
page
);
//关联名字
List
<
NormProduction
>
normProductions
=
productionIPage
.
getRecords
();
List
<
Integer
>
npTeamGroupIds
=
new
ArrayList
<>(
normProductions
.
size
());
List
<
Integer
>
npHandleIds
=
new
ArrayList
<>(
normProductions
.
size
());
normProductions
.
forEach
(
arg
->
{
if
(
arg
.
getType
()
==
1
)
{
npTeamGroupIds
.
add
(
arg
.
getAssessId
());
}
else
{
npHandleIds
.
add
(
arg
.
getAssessId
());
}
});
if
(
npTeamGroupIds
.
size
()
==
0
&&
npHandleIds
.
size
()
==
0
)
{
return
BaseResponse
.
errorMsg
(
"没找着相关数据!关联检测组失败!"
);
}
List
<
Handle
>
handles
=
new
ArrayList
<>();
if
(
npHandleIds
.
size
()
!=
0
)
{
handles
=
iHandleService
.
listByIds
(
npHandleIds
);
}
List
<
TeamGroup
>
teamGroups
=
new
ArrayList
<>();
if
(
npTeamGroupIds
.
size
()
!=
0
)
{
teamGroups
=
iTeamGroupService
.
listByIds
(
npTeamGroupIds
);
}
IPage
<
NormProductionVo
>
rts
=
new
Page
<>(
pageQuery
.
getPageNo
(),
pageQuery
.
getPageSize
());
List
<
NormProductionVo
>
records
=
new
ArrayList
<>(
pageQuery
.
getPageSize
());
rts
.
setTotal
(
productionIPage
.
getTotal
());
rts
.
setCurrent
(
productionIPage
.
getCurrent
());
rts
.
setPages
(
productionIPage
.
getPages
());
rts
.
setSize
(
productionIPage
.
getSize
());
List
<
TeamGroup
>
finalTeamGroups
=
teamGroups
;
List
<
Handle
>
finalHandles
=
handles
;
normProductions
.
forEach
(
arg
->
{
if
(
arg
.
getType
()
==
1
)
{
finalTeamGroups
.
stream
()
.
filter
(
opt
->
opt
.
getId
().
intValue
()
==
arg
.
getAssessId
())
.
findFirst
()
.
ifPresent
(
opt
->
{
NormProductionVo
normProductionVo
=
new
NormProductionVo
();
BeanUtil
.
copyProperties
(
arg
,
normProductionVo
);
normProductionVo
.
setAssessName
(
opt
.
getName
());
records
.
add
(
normProductionVo
);
});
}
else
{
finalHandles
.
stream
()
.
filter
(
opt
->
opt
.
getId
().
intValue
()
==
arg
.
getAssessId
())
.
findFirst
()
.
ifPresent
(
opt
->
{
NormProductionVo
normProductionVo
=
new
NormProductionVo
();
BeanUtil
.
copyProperties
(
arg
,
normProductionVo
);
normProductionVo
.
setAssessName
(
opt
.
getName
());
records
.
add
(
normProductionVo
);
});
}
});
rts
.
setRecords
(
records
);
return
BaseResponse
.
okData
(
rts
);
}
@Override
public
BaseResponse
<
Boolean
>
edit
(
NormProduction
production
)
{
if
(
production
.
getId
()
==
null
||
production
.
getId
()
<=
0
)
{
return
BaseResponse
.
errorMsg
(
"编号id是必须的!"
);
}
//判断比例是否为总值100%
// if (production.getAnalyseRate()
// + production.getAssessRate()
// + production.getSeparateRate()
// + production.getReportedResultRate() != 1) {
// return BaseResponse.errorMsg("百分比总和不等于1");
// }
//判断配置项目是否已存在
QueryWrapper
<
NormProduction
>
qw
=
new
QueryWrapper
<>();
qw
.
eq
(
"assess_id"
,
production
.
getAssessId
());
qw
.
eq
(
"type"
,
production
.
getType
());
qw
.
eq
(
"status"
,
1
);
NormProduction
one
=
this
.
getOne
(
qw
);
if
(
one
!=
null
&&
one
.
getId
().
intValue
()
!=
production
.
getId
())
{
return
BaseResponse
.
errorMsg
(
"当前标准产值已存在!"
);
}
boolean
b
=
this
.
updateById
(
production
);
if
(
b
)
{
return
BaseResponse
.
okData
(
true
);
}
else
{
return
BaseResponse
.
errorMsg
(
"修改失败!"
);
}
}
@Override
public
BaseResponse
<
Integer
>
activeOrForbidden
(
Integer
id
)
{
NormProduction
normProduction
=
this
.
getById
(
id
);
Integer
status
=
normProduction
.
getStatus
();
if
(
status
==
1
)
{
normProduction
.
setStatus
(
0
);
this
.
updateById
(
normProduction
);
return
BaseResponse
.
okData
(
0
);
}
else
{
normProduction
.
setStatus
(
1
);
this
.
updateById
(
normProduction
);
return
BaseResponse
.
okData
(
1
);
}
}
@Override
public
BaseResponse
<
List
<
NormProductionStatistics
>>
normProductionStatistics
(
Long
start
,
Long
end
,
String
name
)
{
//统计分样处理的详情
List
<
NormProduction
.
NormProductionDetail
>
normProductionDetails
=
normProductionDetails
(
null
,
start
,
end
);
if
(
normProductionDetails
.
size
()
==
0
){
return
BaseResponse
.
errorMsg
(
"没找到相关数据!"
);
}
Map
<
Integer
,
BigDecimal
>
coefficientMap
=
new
HashMap
<>(
normProductionDetails
.
size
());
normProductionDetails
.
forEach
(
arg
->
{
Integer
userId
=
arg
.
getUserId
();
//不存在 添加
if
(!
coefficientMap
.
containsKey
(
userId
))
{
coefficientMap
.
put
(
userId
,
arg
.
getWorkTimeCoefficient
());
}
else
{
BigDecimal
bigDecimal
=
coefficientMap
.
get
(
userId
);
BigDecimal
newWorkTime
=
arg
.
getWorkTimeCoefficient
().
add
(
bigDecimal
);
coefficientMap
.
put
(
userId
,
newWorkTime
);
}
});
List
<
NormProductionStatistics
>
rts
=
new
ArrayList
<>();
Set
<
Integer
>
userIds
=
coefficientMap
.
keySet
();
QueryWrapper
<
SysUser
>
qw
=
new
QueryWrapper
<>();
qw
.
in
(
"id"
,
userIds
);
List
<
SysUser
>
users
=
iSysUserService
.
list
(
qw
);
List
<
SysPost
>
sysPosts
=
iSysPostService
.
list
();
for
(
Integer
userId
:
coefficientMap
.
keySet
())
{
SysUser
sysUser
=
users
.
stream
()
.
filter
(
arg
->
arg
.
getId
().
intValue
()
==
userId
)
.
findFirst
().
orElse
(
null
);
if
(
sysUser
==
null
)
{
continue
;
}
NormProductionStatistics
productionStatistics
=
new
NormProductionStatistics
();
productionStatistics
.
setAccount
(
sysUser
.
getUsername
());
productionStatistics
.
setCoefficient
(
coefficientMap
.
get
(
userId
).
intValue
());
productionStatistics
.
setCount
(
normProductionDetails
.
stream
()
.
filter
(
arg
->
arg
.
getUserId
().
intValue
()
==
sysUser
.
getId
())
.
count
());
productionStatistics
.
setPosition
(
sysUser
.
getQualifications
());
if
(
start
!=
null
&&
end
!=
null
)
{
DateTime
startTime
=
DateUtil
.
date
(
start
);
DateTime
endTime
=
DateUtil
.
date
(
end
);
productionStatistics
.
setTime
(
startTime
.
toDateStr
()
+
"-"
+
endTime
.
toDateStr
());
}
productionStatistics
.
setSex
(
sysUser
.
getSex
()
==
0
?
"女"
:
"男"
);
productionStatistics
.
setUserId
(
sysUser
.
getId
()
+
""
);
productionStatistics
.
setUserName
(
sysUser
.
getName
());
SysPost
sysPost
=
sysPosts
.
stream
()
.
filter
(
arg
->
arg
.
getId
().
intValue
()
==
sysUser
.
getPostId
()).
findFirst
().
orElse
(
null
);
productionStatistics
.
setPosition
(
sysPost
==
null
?
"职务一"
:
sysPost
.
getName
());
rts
.
add
(
productionStatistics
);
}
//过滤名字
if
(
StrUtil
.
isNotBlank
(
name
))
{
List
<
NormProductionStatistics
>
collect
=
rts
.
stream
().
filter
(
arg
->
{
if
(
arg
.
getUserName
().
contains
(
name
))
{
return
true
;
}
else
{
return
false
;
}
}).
collect
(
Collectors
.
toList
());
return
BaseResponse
.
okData
(
collect
);
}
return
BaseResponse
.
okData
(
rts
);
}
@Override
public
List
<
NormProduction
.
NormProductionDetail
>
normProductionDetails
(
Integer
userId
,
Long
start
,
Long
end
)
{
/*
* 计算的地方: 分样派发和分样处理表
* userId == null,计算所有人数据。
* userId != null,计算单人时间线的数据。
* 当start==0&&end==0时计算历史所有数据
*
* 过程:
* 1.获取分样派发表数据,然后获取标准产值配置,它的检测组相同。
* 3.每条记录*标准产值计算出来的结果。==>得出详情信息。
* 处理项目:
* 1.获取处理派发表数据,获取标准产值配置,查询处理项。
* */
//获取标准产值数据
QueryWrapper
<
SampleDistribution
>
qwDis
=
new
QueryWrapper
<>();
QueryWrapper
<
SampleHandle
>
qwHan
=
new
QueryWrapper
<>();
QueryWrapper
<
SampleCheckTeam
>
qwCT
=
new
QueryWrapper
<>();
if
(
userId
!=
null
&&
userId
>
0
)
{
qwDis
.
eq
(
"user_id"
,
userId
);
qwHan
.
eq
(
"user_id"
,
userId
);
qwCT
.
eq
(
"user_id"
,
userId
);
}
if
(
start
!=
null
&&
end
!=
null
)
{
DateTime
startTime
=
DateUtil
.
date
(
start
);
DateTime
endTime
=
DateUtil
.
date
(
end
);
qwDis
.
between
(
"finish_time"
,
startTime
,
endTime
);
qwHan
.
between
(
"finish_time"
,
startTime
,
endTime
);
qwCT
.
between
(
"finish_time"
,
startTime
,
endTime
);
}
//计算分析任务单产值
List
<
NormProduction
.
NormProductionDetail
>
sampleDistributionDetail
=
calculateSampleDistribution
(
qwDis
);
//计算处理任务单产值
List
<
NormProduction
.
NormProductionDetail
>
sampleHandleDetail
=
calculateSampleHandle
(
qwHan
);
//todo 计算校核任务单产值
// List<NormProduction.NormProductionDetail> sampleCheckTeamDetail = calculateSampleCheck(qwCT);
//todo 计算报出结果产值
List
<
NormProduction
.
NormProductionDetail
>
rts
=
new
ArrayList
<>(
sampleDistributionDetail
.
size
()
+
sampleHandleDetail
.
size
());
rts
.
addAll
(
sampleDistributionDetail
);
rts
.
addAll
(
sampleHandleDetail
);
//关联用户名字
List
<
Integer
>
userIds
=
rts
.
stream
()
.
map
(
NormProduction
.
NormProductionDetail
::
getUserId
)
.
collect
(
Collectors
.
toList
());
if
(
userIds
.
size
()
==
0
){
return
new
ArrayList
<>();
}
List
<
SysUser
>
users
=
iSysUserService
.
listByIds
(
userIds
);
rts
.
forEach
(
arg
->
users
.
stream
()
.
filter
(
opt
->
opt
.
getId
().
intValue
()
==
arg
.
getUserId
())
.
findFirst
()
.
ifPresent
(
sysUser
->
arg
.
setUserName
(
sysUser
.
getName
())));
return
rts
;
}
/**
* 计算校核单每条数据的标准产值
*
* @param qwCheck 统计条件
* @return 校核任务详情
*/
private
List
<
NormProduction
.
NormProductionDetail
>
calculateSampleCheck
(
QueryWrapper
<
SampleCheckTeam
>
qwCheck
)
{
//计算处理的绩效
List
<
SampleCheckTeam
>
sampleCheckTeams
=
iSampleCheckTeamService
.
list
(
qwCheck
);
List
<
EntrustSample
>
entrustSamples
=
iSampleCheckTeamService
.
getEntrustSample
();
List
<
NormProduction
.
NormProductionDetail
>
rts
=
new
ArrayList
<>(
sampleCheckTeams
.
size
());
for
(
SampleCheckTeam
sampleCheckTeam
:
sampleCheckTeams
)
{
//判断是否已经配置了 获取到核算处理的联表
EntrustSample
entrustSample
=
entrustSamples
.
stream
()
.
filter
(
arg
->
arg
.
getDistributionId
().
intValue
()
==
sampleCheckTeam
.
getId
())
.
findFirst
().
orElse
(
null
);
if
(
entrustSample
==
null
)
{
continue
;
}
//todo
String
key
=
entrustSample
.
getTeamGroupId
()
+
":"
+
"1"
;
//判断缓存是否存在
if
(!
normProductionCache
.
containsKey
(
key
))
{
//初始化
initNormProductionCache
();
}
NormProduction
normProduction
=
normProductionCache
.
get
(
key
);
NormProduction
.
NormProductionDetail
productionDetail
=
initNormProductionDetail
(
entrustSample
,
normProduction
,
normProduction
.
getAssessRate
());
productionDetail
.
setUserId
(
entrustSample
.
getUserId
());
productionDetail
.
setCheckTime
(
sampleCheckTeam
.
getCreateTime
());
productionDetail
.
setDistributionId
(
sampleCheckTeam
.
getId
());
productionDetail
.
setAssessId
(
entrustSample
.
getTeamGroupId
());
rts
.
add
(
productionDetail
);
}
return
rts
;
}
/**
* 计算处理派发单每条数据的标准产值
*
* @param qwHan 统计条件
* @return 处理任务详情
*/
private
List
<
NormProduction
.
NormProductionDetail
>
calculateSampleHandle
(
QueryWrapper
<
SampleHandle
>
qwHan
)
{
//计算处理的绩效
List
<
SampleHandle
>
sampleHandles
=
iSampleHandleService
.
list
(
qwHan
);
List
<
EntrustSample
>
entrustSamples
=
iSampleHandleService
.
getEntrustSample
();
List
<
NormProduction
.
NormProductionDetail
>
rts
=
new
ArrayList
<>(
sampleHandles
.
size
());
List
<
Integer
>
handleIds
=
new
ArrayList
<>();
sampleHandles
.
forEach
(
arg
->
{
String
idsStr
=
arg
.
getContent
();
String
[]
split
=
idsStr
.
split
(
"、"
);
try
{
for
(
String
idStr
:
split
)
{
handleIds
.
add
(
Integer
.
parseInt
(
idStr
));
}
}
catch
(
NumberFormatException
ex
)
{
throw
new
RuntimeException
(
"处理项目的id传的有问题呀!"
);
}
});
if
(
handleIds
.
size
()
==
0
)
{
return
new
ArrayList
<>();
}
List
<
Handle
>
handles
=
iHandleService
.
listByIds
(
handleIds
);
//获取每一次派发单的数据
for
(
SampleHandle
sampleHandle
:
sampleHandles
)
{
//判断是否已经配置了
EntrustSample
entrustSample
=
entrustSamples
.
stream
()
.
filter
(
arg
->
arg
.
getDistributionId
().
intValue
()
==
sampleHandle
.
getId
())
.
findFirst
().
orElse
(
null
);
if
(
entrustSample
==
null
)
{
continue
;
}
//处理项是多个处理ids 、分割
String
content
=
sampleHandle
.
getContent
();
String
[]
split
=
content
.
split
(
"、"
);
List
<
Integer
>
ids
=
new
ArrayList
<>(
split
.
length
);
try
{
for
(
String
idStr
:
split
)
{
ids
.
add
(
Integer
.
parseInt
(
idStr
));
}
}
catch
(
NumberFormatException
ex
)
{
throw
new
RuntimeException
(
"处理项目的id传的有问题呀!"
);
}
for
(
Integer
handleId
:
ids
)
{
String
key
=
handleId
+
":"
+
"0"
;
//判断缓存是否存在
if
(!
normProductionCache
.
containsKey
(
key
))
{
//初始化
initNormProductionCache
();
}
NormProduction
normProduction
=
normProductionCache
.
get
(
key
);
Handle
handle
=
handles
.
stream
()
.
filter
(
arg
->
arg
.
getId
().
intValue
()
==
handleId
)
.
findFirst
().
orElse
(
null
);
if
(
normProduction
==
null
||
handle
==
null
)
{
//如果没有配置 标准产值设置 跳过不计算
continue
;
}
NormProduction
.
NormProductionDetail
productionDetail
=
initNormProductionDetail
(
entrustSample
,
normProduction
,
normProduction
.
getAnalyseRate
());
productionDetail
.
setUserId
(
sampleHandle
.
getUserId
());
productionDetail
.
setCheckTime
(
sampleHandle
.
getAcceptTime
());
productionDetail
.
setDistributionId
(
sampleHandle
.
getId
());
productionDetail
.
setAssessId
(
handleId
);
productionDetail
.
setGroupTeamName
(
handle
.
getName
());
rts
.
add
(
productionDetail
);
}
}
return
rts
;
}
/**
* 计算分析派发单每条数据的标准产值
*
* @param qwDis 统计条件
* @return 分析任务详情
*/
private
List
<
NormProduction
.
NormProductionDetail
>
calculateSampleDistribution
(
QueryWrapper
<
SampleDistribution
>
qwDis
)
{
List
<
SampleDistribution
>
distributions
=
iSampleDistributionService
.
list
(
qwDis
);
List
<
EntrustSample
>
entrustSamples
=
iSampleDistributionService
.
getEntrustSample
();
List
<
NormProduction
.
NormProductionDetail
>
rts
=
new
ArrayList
<>(
distributions
.
size
());
List
<
Integer
>
groupTeamIds
=
distributions
.
stream
().
map
(
SampleDistribution:
:
getTeamGroupId
).
collect
(
Collectors
.
toList
());
if
(
groupTeamIds
.
size
()
==
0
)
{
return
new
ArrayList
<>();
}
List
<
TeamGroup
>
teamGroups
=
iTeamGroupService
.
listByIds
(
groupTeamIds
);
//获取每一次派发单的数据
for
(
SampleDistribution
distribution
:
distributions
)
{
//判断是否已经配置了
EntrustSample
entrustSample
=
entrustSamples
.
stream
()
.
filter
(
arg
->
arg
.
getDistributionId
().
intValue
()
==
distribution
.
getId
())
.
findFirst
().
orElse
(
null
);
TeamGroup
teamGroup
=
teamGroups
.
stream
()
.
filter
(
arg
->
arg
.
getId
().
intValue
()
==
distribution
.
getTeamGroupId
())
.
findFirst
().
orElse
(
null
);
if
(
entrustSample
==
null
||
teamGroup
==
null
)
{
continue
;
}
String
key
=
distribution
.
getTeamGroupId
()
+
":"
+
"1"
;
//判断缓存是否存在
if
(!
normProductionCache
.
containsKey
(
key
))
{
//初始化
initNormProductionCache
();
}
NormProduction
normProduction
=
normProductionCache
.
get
(
key
);
if
(
normProduction
==
null
)
{
//如果没有配置 标准产值设置 跳过不计算
continue
;
}
NormProduction
.
NormProductionDetail
productionDetail
=
initNormProductionDetail
(
entrustSample
,
normProduction
,
normProduction
.
getAnalyseRate
());
productionDetail
.
setUserId
(
distribution
.
getUserId
());
productionDetail
.
setCheckTime
(
distribution
.
getAcceptTime
());
productionDetail
.
setDistributionId
(
distribution
.
getId
());
productionDetail
.
setAssessId
(
distribution
.
getTeamGroupId
());
productionDetail
.
setGroupTeamName
(
teamGroup
.
getName
());
rts
.
add
(
productionDetail
);
}
return
rts
;
}
/**
* 初始化产值明细
*
* @param entrustSample 分样任务
* @param normProduction 标准产值配置表
* @return 标准产值明细
*/
private
NormProduction
.
NormProductionDetail
initNormProductionDetail
(
EntrustSample
entrustSample
,
NormProduction
normProduction
,
Double
rate
)
{
NormProduction
.
NormProductionDetail
productionDetail
=
new
NormProduction
.
NormProductionDetail
();
productionDetail
.
setAnalyseRate
(
normProduction
.
getAnalyseRate
());
productionDetail
.
setAssessRate
(
normProduction
.
getAssessRate
());
productionDetail
.
setSeparateRate
(
normProduction
.
getSeparateRate
());
productionDetail
.
setReportedResultRate
(
normProduction
.
getReportedResultRate
());
productionDetail
.
setAssessId
(
normProduction
.
getAssessId
());
productionDetail
.
setEntrustId
(
entrustSample
.
getEntrustId
());
productionDetail
.
setProjectName
(
entrustSample
.
getProjectName
());
productionDetail
.
setSampleName
(
entrustSample
.
getSampleName
());
productionDetail
.
setSampleId
(
entrustSample
.
getSampleId
());
productionDetail
.
setEntrustCode
(
entrustSample
.
getEntrustCode
());
productionDetail
.
setWorkTimeCoefficient
(
calculateWorkTimeCoefficient
(
normProduction
,
rate
));
return
productionDetail
;
}
/**
* 初始化标准产值缓存
*/
private
void
initNormProductionCache
()
{
QueryWrapper
<
NormProduction
>
qw
=
new
QueryWrapper
<>();
qw
.
eq
(
"status"
,
1
);
List
<
NormProduction
>
list
=
this
.
list
(
qw
);
for
(
NormProduction
normProduction
:
list
)
{
String
key
=
normProduction
.
getAssessId
()
+
":"
+
normProduction
.
getType
();
normProductionCache
.
put
(
key
,
normProduction
);
}
}
/**
* 计算标准产值的工时标准系数
* 额定工日*建议系数/报出对应分析结果*考核工值*分析占比
*
* @param normProduction 标准产值配置对象 如:六元素
* @param rate 具体的操作占比 如:统计分析 85%
* @return BigDecimal
*/
private
BigDecimal
calculateWorkTimeCoefficient
(
NormProduction
normProduction
,
Double
rate
)
{
//计算出工时标准系数:
//额定工日*建议系数/报出对应分析结果*考核工值*分析占比
BigDecimal
quotaDayBig
=
BigDecimal
.
valueOf
(
normProduction
.
getQuotaDay
());
BigDecimal
coefficientBig
=
BigDecimal
.
valueOf
(
normProduction
.
getCoefficient
());
BigDecimal
reportedAnalyseRtsBig
=
BigDecimal
.
valueOf
(
normProduction
.
getReportedAnalyseResult
());
BigDecimal
assessValueBig
=
BigDecimal
.
valueOf
(
normProduction
.
getAssessValue
());
BigDecimal
analyseRateBig
=
BigDecimal
.
valueOf
(
rate
);
return
quotaDayBig
.
multiply
(
coefficientBig
)
.
divide
(
reportedAnalyseRtsBig
,
6
,
RoundingMode
.
HALF_DOWN
)
.
multiply
(
assessValueBig
).
multiply
(
analyseRateBig
)
.
setScale
(
6
,
RoundingMode
.
HALF_DOWN
);
}
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/SampleCheckTeamServiceImpl.java
View file @
6da27071
package
cn
.
wise
.
sc
.
cement
.
business
.
service
.
impl
;
import
cn.wise.sc.cement.business.entity.EntrustSample
;
import
cn.wise.sc.cement.business.entity.SampleCheckTeam
;
import
cn.wise.sc.cement.business.mapper.SampleCheckTeamMapper
;
import
cn.wise.sc.cement.business.service.ISampleCheckTeamService
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
* <p>
* 服务实现类
...
...
@@ -17,4 +21,15 @@ import org.springframework.stereotype.Service;
@Service
public
class
SampleCheckTeamServiceImpl
extends
ServiceImpl
<
SampleCheckTeamMapper
,
SampleCheckTeam
>
implements
ISampleCheckTeamService
{
final
SampleCheckTeamMapper
sampleCheckTeamMapper
;
public
SampleCheckTeamServiceImpl
(
SampleCheckTeamMapper
sampleCheckTeamMapper
)
{
this
.
sampleCheckTeamMapper
=
sampleCheckTeamMapper
;
}
@Override
public
List
<
EntrustSample
>
getEntrustSample
()
{
return
sampleCheckTeamMapper
.
getEntrustSample
();
}
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/SampleDistributionServiceImpl.java
View file @
6da27071
package
cn
.
wise
.
sc
.
cement
.
business
.
service
.
impl
;
import
cn.wise.sc.cement.business.entity.EntrustSample
;
import
cn.wise.sc.cement.business.entity.SampleDistribution
;
import
cn.wise.sc.cement.business.mapper.SampleDistributionMapper
;
import
cn.wise.sc.cement.business.service.ISampleDistributionService
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
* <p>
* 服务实现类
...
...
@@ -17,4 +21,12 @@ import org.springframework.stereotype.Service;
@Service
public
class
SampleDistributionServiceImpl
extends
ServiceImpl
<
SampleDistributionMapper
,
SampleDistribution
>
implements
ISampleDistributionService
{
@Autowired
SampleDistributionMapper
sampleDistributionMapper
;
@Override
public
List
<
EntrustSample
>
getEntrustSample
()
{
return
sampleDistributionMapper
.
getEntrustSample
();
}
}
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/SampleHandleServiceImpl.java
View file @
6da27071
package
cn
.
wise
.
sc
.
cement
.
business
.
service
.
impl
;
import
cn.wise.sc.cement.business.entity.EntrustSample
;
import
cn.wise.sc.cement.business.entity.SampleHandle
;
import
cn.wise.sc.cement.business.mapper.SampleHandleMapper
;
import
cn.wise.sc.cement.business.service.ISampleHandleService
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
* <p>
* 服务实现类
...
...
@@ -17,4 +21,11 @@ import org.springframework.stereotype.Service;
@Service
public
class
SampleHandleServiceImpl
extends
ServiceImpl
<
SampleHandleMapper
,
SampleHandle
>
implements
ISampleHandleService
{
@Autowired
SampleHandleMapper
sampleHandleMapper
;
@Override
public
List
<
EntrustSample
>
getEntrustSample
()
{
return
sampleHandleMapper
.
getEntrustSample
();
}
}
cement-business/src/main/java/cn/wise/sc/cement/business/util/PageUtil.java
0 → 100644
View file @
6da27071
package
cn
.
wise
.
sc
.
cement
.
business
.
util
;
import
cn.wise.sc.cement.business.model.PageQuery
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
org.apache.poi.ss.formula.functions.T
;
import
java.util.List
;
/**
* @description:
* @author: qh
* @create: 2020-09-27 18:19
**/
public
class
PageUtil
{
public
static
<
T
>
Page
<
T
>
listConvertToPage
(
List
<
T
>
list
,
PageQuery
pageQuery
)
{
int
start
=
pageQuery
.
getPageNo
();
int
end
=
Math
.
min
((
start
+
pageQuery
.
getPageSize
()),
list
.
size
());
Page
<
T
>
page
=
new
Page
<>(
start
,
end
,
list
.
size
());
page
.
setRecords
(
list
.
subList
(
start
,
end
));
return
page
;
}
}
cement-business/src/main/resources/application.yml
View file @
6da27071
...
...
@@ -11,7 +11,7 @@ spring:
url
:
jdbc:mysql://192.168.110.85:3306/sinoma_tcdri?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false
username
:
root
password
:
admin!@#123
driverClassName
:
com.mysql.jdbc.Driver
driverClassName
:
com.mysql.
cj.
jdbc.Driver
hikari
:
minimum-idle
:
3
maximum-pool-size
:
10
...
...
mybatis-generator/src/main/java/cn/wise/sc/cement/mg/GeneratorApplication.java
View file @
6da27071
...
...
@@ -56,7 +56,7 @@ public class GeneratorApplication {
// 全局配置
GlobalConfig
gc
=
new
GlobalConfig
();
String
projectPath
=
System
.
getProperty
(
"user.dir"
);
gc
.
setOutputDir
(
projectPath
+
"
/cement-business/src/main/
java"
);
gc
.
setOutputDir
(
projectPath
+
"
\\cement-business\\src\\main\\
java"
);
gc
.
setAuthor
(
"ztw"
);
gc
.
setOpen
(
false
);
// gc.setSwagger2(true); 实体属性 Swagger2 注解
...
...
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