Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
Z
zlmy-cloud
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
zlmy
zlmy-cloud
Commits
c2688c1b
Commit
c2688c1b
authored
Apr 16, 2025
by
Rensq
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev_2.0.0' into dev_2.0.0
parents
d5320a2b
9913dfc5
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
609 additions
and
0 deletions
+609
-0
PageUtils.java
...src/main/java/com/testor/common/core/utils/PageUtils.java
+8
-0
THazardWorkPlanCheckController.java
...ule/hazard/controller/THazardWorkPlanCheckController.java
+152
-0
THazardWorkPlanCheckDao.java
...com/testor/module/hazard/dao/THazardWorkPlanCheckDao.java
+53
-0
THazardWorkPlanCheck.java
...stor/module/hazard/model/domain/THazardWorkPlanCheck.java
+160
-0
THazardWorkPlanCheckDelParam.java
...module/hazard/model/dto/THazardWorkPlanCheckDelParam.java
+26
-0
THazardWorkPlanCheckParam.java
...or/module/hazard/model/dto/THazardWorkPlanCheckParam.java
+34
-0
THazardWorkPlanDTO.java
...om/testor/module/hazard/model/dto/THazardWorkPlanDTO.java
+3
-0
THazardWorkPlanCheckService.java
...or/module/hazard/service/THazardWorkPlanCheckService.java
+53
-0
THazardWorkPlanCheckServiceImpl.java
.../hazard/service/impl/THazardWorkPlanCheckServiceImpl.java
+69
-0
THazardWorkPlanServiceImpl.java
...odule/hazard/service/impl/THazardWorkPlanServiceImpl.java
+4
-0
THazardWorkPlanCheck.xml
...src/main/resources/mapper/hazard/THazardWorkPlanCheck.xml
+47
-0
No files found.
zlmy-common/zlmy-common-core/src/main/java/com/testor/common/core/utils/PageUtils.java
View file @
c2688c1b
...
@@ -25,6 +25,14 @@ public class PageUtils extends PageHelper
...
@@ -25,6 +25,14 @@ public class PageUtils extends PageHelper
PageHelper
.
startPage
(
pageNum
,
pageSize
,
orderBy
).
setReasonable
(
reasonable
);
PageHelper
.
startPage
(
pageNum
,
pageSize
,
orderBy
).
setReasonable
(
reasonable
);
}
}
public
static
void
startPage
(
Integer
limit
,
Integer
page
)
{
PageDomain
pageDomain
=
TableSupport
.
buildPageRequest
();
String
orderBy
=
SqlUtil
.
escapeOrderBySql
(
pageDomain
.
getOrderBy
());
Boolean
reasonable
=
pageDomain
.
getReasonable
();
PageHelper
.
startPage
(
page
,
limit
,
orderBy
).
setReasonable
(
reasonable
);
}
/**
/**
* 清理分页的线程变量
* 清理分页的线程变量
*/
*/
...
...
zlmy-modules/zlmy-boot/src/main/java/com/testor/module/hazard/controller/THazardWorkPlanCheckController.java
0 → 100644
View file @
c2688c1b
package
com
.
testor
.
module
.
hazard
.
controller
;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
com.testor.common.core.utils.PageUtils
;
import
com.testor.module.emergency.model.vo.TContingencyPlanVO
;
import
com.testor.module.hazard.model.domain.THazardLicenseSignatureRecord
;
import
com.testor.module.hazard.model.dto.THazardWorkPlanCheckDelParam
;
import
com.testor.module.hazard.model.dto.THazardWorkPlanCheckParam
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
lombok.extern.slf4j.Slf4j
;
import
com.tongtech.tfw.backend.core.helper.StringHelper
;
import
com.tongtech.tfw.backend.core.helper.ObjectHelper
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.tongtech.tfw.backend.common.biz.constants.BizConstants
;
import
com.tongtech.tfw.backend.common.biz.models.BaseResponse
;
import
com.tongtech.tfw.backend.common.biz.models.BaseResponse
;
import
com.tongtech.tfw.backend.common.biz.models.BaseResponseList
;
import
com.tongtech.tfw.backend.common.biz.models.BizGeneralResponse
;
import
com.tongtech.tfw.backend.common.models.exceptions.ApiException
;
import
com.tongtech.tfw.backend.common.models.supers.SuperController
;
import
com.tongtech.tfw.backend.core.helper.IdHelper
;
import
com.tongtech.tfw.backend.core.helper.TypeHelper
;
import
com.tongtech.tfw.backend.core.helper.bean.BeanHelper
;
import
com.testor.module.hazard.model.domain.THazardWorkPlanCheck
;
import
com.testor.module.hazard.service.THazardWorkPlanCheckService
;
/**
* 危险作业计划监督检查Controller
*
* @author testor-framework
* @date 2025-04-16 10:09:22
*/
@RestController
@RequestMapping
(
"/hazard/check"
)
@Api
(
value
=
"THazardWorkPlanCheck"
,
tags
=
"危险作业计划监督检查"
)
@Slf4j
public
class
THazardWorkPlanCheckController
extends
SuperController
{
@Autowired
private
THazardWorkPlanCheckService
tHazardWorkPlanCheckService
;
/* Generated Method*/
@ApiOperation
(
value
=
"新增 危险作业计划监督检查"
,
notes
=
"Add THazardWorkPlanCheck"
)
@PostMapping
(
value
=
"/add"
)
public
BaseResponse
<
THazardWorkPlanCheck
>
addEntity
(
@RequestBody
THazardWorkPlanCheck
addRequest
)
{
BaseResponse
<
THazardWorkPlanCheck
>
baseResponse
=
new
BaseResponse
<>();
baseResponse
.
setData
(
tHazardWorkPlanCheckService
.
addEntity
(
addRequest
));
return
baseResponse
;
}
@ApiOperation
(
value
=
"修改 危险作业计划监督检查 "
,
notes
=
"Update THazardWorkPlanCheck By Id"
)
@PutMapping
(
value
=
"/update"
)
public
BaseResponse
<
BizGeneralResponse
>
updateEntity
(
@RequestBody
THazardWorkPlanCheck
updateRequest
){
BaseResponse
<
BizGeneralResponse
>
baseResponse
=
new
BaseResponse
<>();
if
(
ObjectHelper
.
isNotEmpty
(
updateRequest
)&&
StringHelper
.
isNotEmpty
(
updateRequest
.
getId
())){
// TODO 按需求添加数据去重,特殊值设定,业务异常
THazardWorkPlanCheck
data
=
BeanHelper
.
beanToBean
(
updateRequest
,
THazardWorkPlanCheck
.
class
);
boolean
result
=
tHazardWorkPlanCheckService
.
updateById
(
data
);
baseResponse
.
setData
(
BizGeneralResponse
.
builder
().
result
(
TypeHelper
.
castToString
(
result
)).
build
());
}
return
baseResponse
;
}
@ApiOperation
(
value
=
"删除 危险作业计划监督检查 "
,
notes
=
"delete THazardWorkPlanCheck By Id"
)
@PutMapping
(
value
=
"/delete"
)
public
BaseResponse
<
BizGeneralResponse
>
deleteEntity
(
@RequestBody
THazardWorkPlanCheckDelParam
deleteRequest
){
BaseResponse
<
BizGeneralResponse
>
baseResponse
=
new
BaseResponse
<>();
if
(
ObjectHelper
.
isNotEmpty
(
deleteRequest
)&&
StringHelper
.
isNotEmpty
(
deleteRequest
.
getId
())){
// TODO 按需求添加数据去重,特殊值设定,业务异常
THazardWorkPlanCheck
data
=
new
THazardWorkPlanCheck
();
data
.
setId
(
deleteRequest
.
getId
());
data
.
setStatus
(
BizConstants
.
STATUS_DELETE
);
boolean
result
=
tHazardWorkPlanCheckService
.
updateById
(
data
);
baseResponse
.
setData
(
BizGeneralResponse
.
builder
().
result
(
TypeHelper
.
castToString
(
result
)).
build
());
}
return
baseResponse
;
}
@ApiOperation
(
value
=
"批量删除危险作业计划监督检查"
,
notes
=
"delete THazardWorkPlanCheck by batch Id"
)
@PutMapping
(
value
=
"/batch_delete"
)
public
BaseResponse
<
BizGeneralResponse
>
deleteEntityBatch
(
@RequestBody
THazardWorkPlanCheckDelParam
deleteRequest
)
{
BaseResponse
<
BizGeneralResponse
>
baseResponse
=
new
BaseResponse
<>();
if
(
ObjectHelper
.
isNotEmpty
(
deleteRequest
)
&&
(!
deleteRequest
.
getIds
().
isEmpty
()))
{
/* 批量删除 */
List
<
THazardWorkPlanCheck
>
tHazardWorkPlanCheckList
=
new
ArrayList
<>();
for
(
String
id:
deleteRequest
.
getIds
()){
THazardWorkPlanCheck
data
=
new
THazardWorkPlanCheck
();
data
.
setId
(
id
);
data
.
setStatus
(
BizConstants
.
STATUS_DELETE
);
tHazardWorkPlanCheckList
.
add
(
data
);
}
boolean
result
=
tHazardWorkPlanCheckService
.
updateBatchById
(
tHazardWorkPlanCheckList
);
baseResponse
.
setData
(
BizGeneralResponse
.
builder
().
result
(
TypeHelper
.
castToString
(
result
)).
build
());
}
return
baseResponse
;
}
@ApiOperation
(
value
=
"获取 危险作业计划监督检查 分页列表"
,
notes
=
"List THazardWorkPlanCheck with page"
)
@PostMapping
(
value
=
"/selectTHazardWorkPlanCheckList"
)
public
BaseResponse
<
BaseResponseList
<
THazardWorkPlanCheck
>>
selectTHazardWorkPlanCheckList
(
@RequestBody
THazardWorkPlanCheckParam
param
){
BaseResponse
<
BaseResponseList
<
THazardWorkPlanCheck
>>
baseResponse
=
new
BaseResponse
<>();
Page
<
THazardWorkPlanCheck
>
resultList
=
tHazardWorkPlanCheckService
.
selectTHazardWorkPlanCheckList
(
param
);
BaseResponseList
<
THazardWorkPlanCheck
>
baseResponseList
=
new
BaseResponseList
<>();
baseResponseList
.
setData
(
resultList
.
getRecords
());
baseResponseList
.
setTotal
(
resultList
.
getTotal
());
baseResponse
.
setData
(
baseResponseList
);
return
baseResponse
;
}
@ApiOperation
(
value
=
"App查询危险作业计划监督检查列表"
,
notes
=
"List THazardWorkPlanCheck with page"
)
@PostMapping
(
value
=
"/selectAppTHazardWorkPlanCheckList"
)
public
BaseResponse
<
BaseResponseList
<
THazardWorkPlanCheck
>>
selectAppTHazardWorkPlanCheckList
(
@RequestBody
THazardWorkPlanCheckParam
param
){
BaseResponse
<
BaseResponseList
<
THazardWorkPlanCheck
>>
baseResponse
=
new
BaseResponse
<>();
param
.
setCreateBy
(
getUserId
());
Page
<
THazardWorkPlanCheck
>
resultList
=
tHazardWorkPlanCheckService
.
selectAppTHazardWorkPlanCheckList
(
param
);
BaseResponseList
<
THazardWorkPlanCheck
>
baseResponseList
=
new
BaseResponseList
<>();
baseResponseList
.
setData
(
resultList
.
getRecords
());
baseResponseList
.
setTotal
(
resultList
.
getTotal
());
baseResponse
.
setData
(
baseResponseList
);
return
baseResponse
;
}
@ApiOperation
(
value
=
"获取 危险作业计划监督检查详情 "
,
notes
=
"Get THazardWorkPlanCheck By Id"
)
@GetMapping
(
value
=
"/detail"
)
public
BaseResponse
<
THazardWorkPlanCheck
>
detail
(
String
id
){
BaseResponse
<
THazardWorkPlanCheck
>
baseResponse
=
new
BaseResponse
<>();
if
(
StringHelper
.
isNotEmpty
(
id
)){
// TODO 按需求添加业务异常判断
THazardWorkPlanCheck
data
=
tHazardWorkPlanCheckService
.
detail
(
id
);
baseResponse
.
setData
(
data
);
}
return
baseResponse
;
}
}
zlmy-modules/zlmy-boot/src/main/java/com/testor/module/hazard/dao/THazardWorkPlanCheckDao.java
0 → 100644
View file @
c2688c1b
package
com
.
testor
.
module
.
hazard
.
dao
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.testor.module.hazard.model.domain.THazardWorkPlanCheck
;
import
com.testor.module.hazard.model.dto.THazardWorkPlanCheckParam
;
import
com.tongtech.tfw.backend.common.models.supers.SuperDao
;
import
com.tongtech.tfw.workflow.apis.task.model.dto.TodoTask
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
java.util.List
;
/**
* 危险作业计划监督检查Mapper接口
*
* @author testor-framework
* @date 2025-04-16 10:09:22
*/
public
interface
THazardWorkPlanCheckDao
extends
SuperDao
<
THazardWorkPlanCheck
>
{
/**
* 查询危险作业计划监督检查列表
*
* @param tHazardWorkPlanCheckParam 危险作业计划监督检查主键
* @return 危险作业计划监督检查
*/
Page
<
THazardWorkPlanCheck
>
selectTHazardWorkPlanCheckList
(
IPage
page
,
@Param
(
"param"
)
THazardWorkPlanCheckParam
tHazardWorkPlanCheckParam
);
/**
* App查询危险作业计划监督检查列表
*
* @param tHazardWorkPlanCheckParam 危险作业计划监督检查主键
* @return 危险作业计划监督检查
*/
Page
<
THazardWorkPlanCheck
>
selectAppTHazardWorkPlanCheckList
(
IPage
page
,
@Param
(
"param"
)
THazardWorkPlanCheckParam
tHazardWorkPlanCheckParam
);
/**
* 查询危险作业计划监督检查详情
* @param id
* @return
*/
THazardWorkPlanCheck
detail
(
String
id
);
/**
* 查询危险计划下的监督检查数量
* @param planId
* @return
*/
@Select
(
"select count(1) from t_hazard_work_plan_check\n"
+
"where plan_id = #{planId} and status ='0'"
)
Integer
countByPlanId
(
String
planId
);
}
zlmy-modules/zlmy-boot/src/main/java/com/testor/module/hazard/model/domain/THazardWorkPlanCheck.java
0 → 100644
View file @
c2688c1b
package
com
.
testor
.
module
.
hazard
.
model
.
domain
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.testor.common.annotation.Translation
;
import
com.testor.common.constant.TransConstant
;
import
com.tongtech.tfw.backend.common.models.supers.SuperModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.NoArgsConstructor
;
import
lombok.experimental.Accessors
;
import
lombok.experimental.SuperBuilder
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.util.Date
;
/**
* 危险作业计划对象 t_hazard_work_plan
*
* @author testor-framework
* @date 2024-12-19 10:39:26
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@Accessors
(
chain
=
true
)
@TableName
(
"t_hazard_work_plan_check"
)
@ApiModel
(
value
=
"THazardWorkPlanCheck对象"
,
description
=
""
)
@SuperBuilder
@AllArgsConstructor
@NoArgsConstructor
public
class
THazardWorkPlanCheck
extends
SuperModel
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* id
*/
@ApiModelProperty
(
value
=
"id"
)
@TableId
(
"id"
)
private
String
id
;
/**
* 危险作业计划id
*/
@ApiModelProperty
(
value
=
"危险作业计划id"
)
private
String
planId
;
/**
* 检查时间
*/
@ApiModelProperty
(
value
=
"检查时间"
)
@TableField
(
"check_time"
)
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
checkTime
;
/**
* 是否合规 0否 1是
*/
@ApiModelProperty
(
value
=
"是否合规 0否 1是"
)
@TableField
(
"is_compliant"
)
private
String
isCompliant
;
/**
* 问题类别 字典id
*/
@ApiModelProperty
(
value
=
"问题类别 字典id"
)
@TableField
(
"problem_type"
)
private
String
problemType
;
/**
* 问题描述
*/
@ApiModelProperty
(
value
=
"问题描述"
)
@TableField
(
"check_description"
)
private
String
checkDescription
;
/**
* 检查图片地址
*/
@ApiModelProperty
(
value
=
"检查图片地址"
)
@TableField
(
"check_images"
)
private
String
checkImages
;
/**
* 检查人签字
*/
@ApiModelProperty
(
value
=
"检查人签字"
)
@TableField
(
"check_signature"
)
private
String
checkSignature
;
/**
* 检查单位
*/
@ApiModelProperty
(
value
=
"检查单位"
)
@TableField
(
"check_unit"
)
private
String
checkUnit
;
/**
* 基层单位
*/
@ApiModelProperty
(
value
=
"基层单位"
)
@TableField
(
"basic_unit"
)
private
String
basicUnit
;
/**
* 监督检查状态(1 暂存 2正式)
*/
@ApiModelProperty
(
value
=
"监督检查状态(1 暂存 2已完成)"
)
@TableField
(
"check_status"
)
private
String
checkStatus
;
/**
* 签字时间
*/
@ApiModelProperty
(
value
=
"签字时间"
)
@TableField
(
"check_signature_time"
)
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
checkSignatureTime
;
/**
* 作业编号
*/
@ApiModelProperty
(
value
=
"作业编号"
)
@TableField
(
exist
=
false
)
private
String
code
;
/**
* 作业类型
*/
@ApiModelProperty
(
value
=
"作业类型"
)
@TableField
(
exist
=
false
)
private
String
workType
;
/**
* 作业级别
*/
@ApiModelProperty
(
value
=
"作业级别"
)
@TableField
(
exist
=
false
)
private
String
workLevel
;
/**
* 相关方作业
*/
@ApiModelProperty
(
value
=
"相关方作业"
)
@TableField
(
exist
=
false
)
private
String
stakeholderWork
;
}
zlmy-modules/zlmy-boot/src/main/java/com/testor/module/hazard/model/dto/THazardWorkPlanCheckDelParam.java
0 → 100644
View file @
c2688c1b
package
com
.
testor
.
module
.
hazard
.
model
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.List
;
/**
* 危险作业计划监督检查 删除参数对象
*
* @author testor-framework
* @date 2025-04-16 10:09:22
*/
@Data
@ApiModel
(
value
=
"THazardWorkPlanCheck 删除参数对象"
)
public
class
THazardWorkPlanCheckDelParam
implements
java
.
io
.
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"主键ID"
)
private
String
id
;
@ApiModelProperty
(
value
=
"批量ID"
)
private
List
<
String
>
ids
;
}
zlmy-modules/zlmy-boot/src/main/java/com/testor/module/hazard/model/dto/THazardWorkPlanCheckParam.java
0 → 100644
View file @
c2688c1b
package
com
.
testor
.
module
.
hazard
.
model
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.List
;
import
com.testor.module.hazard.model.domain.THazardWorkPlanCheck
;
/**
* 危险作业计划监督检查 删除参数对象
*
* @author testor-framework
* @date 2025-04-16 10:09:22
*/
@Data
@ApiModel
(
value
=
"THazardWorkPlanCheck 列表查询参数对象"
)
@EqualsAndHashCode
(
callSuper
=
true
)
public
class
THazardWorkPlanCheckParam
extends
THazardWorkPlanCheck
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"每页数量"
)
private
String
limit
;
@ApiModelProperty
(
value
=
"当前页数"
)
private
String
page
;
@ApiModelProperty
(
value
=
"排序字段"
)
private
String
orderBy
;
@ApiModelProperty
(
value
=
"排序方式"
)
private
String
orderType
;
}
zlmy-modules/zlmy-boot/src/main/java/com/testor/module/hazard/model/dto/THazardWorkPlanDTO.java
View file @
c2688c1b
...
@@ -116,4 +116,7 @@ public class THazardWorkPlanDTO extends THazardWorkPlan {
...
@@ -116,4 +116,7 @@ public class THazardWorkPlanDTO extends THazardWorkPlan {
@ApiModelProperty
(
"被交底单位"
)
@ApiModelProperty
(
"被交底单位"
)
private
String
disclosedUnitName
;
private
String
disclosedUnitName
;
@ApiModelProperty
(
"检查监督数量"
)
private
Integer
checkCount
;
}
}
zlmy-modules/zlmy-boot/src/main/java/com/testor/module/hazard/service/THazardWorkPlanCheckService.java
0 → 100644
View file @
c2688c1b
package
com
.
testor
.
module
.
hazard
.
service
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.testor.module.hazard.model.domain.THazardWorkPlan
;
import
com.testor.module.hazard.model.domain.THazardWorkPlanCheck
;
import
com.testor.module.hazard.model.dto.THazardWorkPlanCheckParam
;
import
com.tongtech.tfw.backend.common.models.supers.SuperService
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
* 危险作业计划监督检查Service接口
*
* @author testor-framework
* @date 2025-04-16 10:09:22
*/
public
interface
THazardWorkPlanCheckService
extends
SuperService
<
THazardWorkPlanCheck
>
{
/**
* 查询危险作业计划监督检查列表
*
* @param tHazardWorkPlanCheckParam 危险作业计划监督检查主键
* @return 危险作业计划监督检查
*/
Page
<
THazardWorkPlanCheck
>
selectTHazardWorkPlanCheckList
(
THazardWorkPlanCheckParam
tHazardWorkPlanCheckParam
);
/**
* App查询危险作业计划监督检查列表
*
* @param tHazardWorkPlanCheckParam 危险作业计划监督检查主键
* @return 危险作业计划监督检查
*/
Page
<
THazardWorkPlanCheck
>
selectAppTHazardWorkPlanCheckList
(
THazardWorkPlanCheckParam
tHazardWorkPlanCheckParam
);
/**
* 新增危险作业监督检查
* @param addRequest
* @return
*/
THazardWorkPlanCheck
addEntity
(
THazardWorkPlanCheck
addRequest
);
/**
* 查询危险作业计划监督检查详情
* @param id
* @return
*/
THazardWorkPlanCheck
detail
(
String
id
);
}
zlmy-modules/zlmy-boot/src/main/java/com/testor/module/hazard/service/impl/THazardWorkPlanCheckServiceImpl.java
0 → 100644
View file @
c2688c1b
package
com
.
testor
.
module
.
hazard
.
service
.
impl
;
import
cn.hutool.core.util.ObjectUtil
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.testor.module.emergency.model.vo.TContingencyPlanVO
;
import
com.testor.module.hazard.dao.THazardWorkPlanCheckDao
;
import
com.testor.module.hazard.model.domain.THazardWorkPlan
;
import
com.testor.module.hazard.model.domain.THazardWorkPlanCheck
;
import
com.testor.module.hazard.model.dto.THazardWorkPlanCheckParam
;
import
com.testor.module.hazard.service.THazardWorkPlanCheckService
;
import
com.tongtech.tfw.backend.core.helper.IdHelper
;
import
com.tongtech.tfw.backend.core.helper.ObjectHelper
;
import
com.tongtech.tfw.backend.core.helper.bean.BeanHelper
;
import
org.springframework.stereotype.Service
;
import
com.tongtech.tfw.backend.common.models.supers.SuperServiceImpl
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
java.util.Collections
;
import
java.util.List
;
/**
* 危险作业计划监督检查Service业务层处理
*
* @author testor-framework
* @date 2025-04-16 10:09:22
*/
@Service
public
class
THazardWorkPlanCheckServiceImpl
extends
SuperServiceImpl
<
THazardWorkPlanCheckDao
,
THazardWorkPlanCheck
>
implements
THazardWorkPlanCheckService
{
@Autowired
(
required
=
false
)
private
THazardWorkPlanCheckDao
tHazardWorkPlanCheckDao
;
@Override
public
Page
<
THazardWorkPlanCheck
>
selectTHazardWorkPlanCheckList
(
THazardWorkPlanCheckParam
tHazardWorkPlanCheckParam
)
{
IPage
<
THazardWorkPlanCheck
>
page
=
new
Page
<>(
Long
.
valueOf
(
tHazardWorkPlanCheckParam
.
getPage
()),
Long
.
valueOf
(
tHazardWorkPlanCheckParam
.
getLimit
()));
return
this
.
baseMapper
.
selectTHazardWorkPlanCheckList
(
page
,
tHazardWorkPlanCheckParam
);
}
@Override
public
Page
<
THazardWorkPlanCheck
>
selectAppTHazardWorkPlanCheckList
(
THazardWorkPlanCheckParam
tHazardWorkPlanCheckParam
)
{
IPage
<
THazardWorkPlanCheck
>
page
=
new
Page
<>(
Long
.
valueOf
(
tHazardWorkPlanCheckParam
.
getPage
()),
Long
.
valueOf
(
tHazardWorkPlanCheckParam
.
getLimit
()));
return
this
.
baseMapper
.
selectAppTHazardWorkPlanCheckList
(
page
,
tHazardWorkPlanCheckParam
);
}
@Override
public
THazardWorkPlanCheck
addEntity
(
THazardWorkPlanCheck
addRequest
)
{
if
(
ObjectHelper
.
isNotEmpty
(
addRequest
)){
// TODO 按需求添加数据去重,特殊值设定,业务异常
String
id
=
IdHelper
.
getId32bit
();
THazardWorkPlanCheck
data
=
BeanHelper
.
beanToBean
(
addRequest
,
THazardWorkPlanCheck
.
class
);
data
.
setId
(
id
);
boolean
result
=
this
.
save
(
data
);
if
(
result
){
THazardWorkPlanCheck
newEntity
=
new
THazardWorkPlanCheck
();
newEntity
.
setId
(
id
);
return
newEntity
;
}
}
return
null
;
}
@Override
public
THazardWorkPlanCheck
detail
(
String
id
)
{
return
this
.
baseMapper
.
detail
(
id
);
}
}
zlmy-modules/zlmy-boot/src/main/java/com/testor/module/hazard/service/impl/THazardWorkPlanServiceImpl.java
View file @
c2688c1b
...
@@ -24,6 +24,7 @@ import com.testor.module.contractor.ledger.model.domain.TContractorInfo;
...
@@ -24,6 +24,7 @@ import com.testor.module.contractor.ledger.model.domain.TContractorInfo;
import
com.testor.module.contractor.ledger.model.domain.TContractorPerson
;
import
com.testor.module.contractor.ledger.model.domain.TContractorPerson
;
import
com.testor.module.contractor.ledger.service.TContractorInfoService
;
import
com.testor.module.contractor.ledger.service.TContractorInfoService
;
import
com.testor.module.contractor.ledger.service.TContractorPersonService
;
import
com.testor.module.contractor.ledger.service.TContractorPersonService
;
import
com.testor.module.hazard.dao.THazardWorkPlanCheckDao
;
import
com.testor.module.hazard.dao.THazardWorkPlanDao
;
import
com.testor.module.hazard.dao.THazardWorkPlanDao
;
import
com.testor.module.hazard.model.domain.*
;
import
com.testor.module.hazard.model.domain.*
;
import
com.testor.module.hazard.model.dto.*
;
import
com.testor.module.hazard.model.dto.*
;
...
@@ -147,6 +148,8 @@ public class THazardWorkPlanServiceImpl extends SuperServiceImpl<THazardWorkPlan
...
@@ -147,6 +148,8 @@ public class THazardWorkPlanServiceImpl extends SuperServiceImpl<THazardWorkPlan
private
RuTaskService
ruTaskService
;
private
RuTaskService
ruTaskService
;
@Autowired
@Autowired
private
ResourceLoader
resourceLoader
;
private
ResourceLoader
resourceLoader
;
@Autowired
private
THazardWorkPlanCheckDao
tHazardWorkPlanCheckDao
;
@Override
@Override
...
@@ -252,6 +255,7 @@ public class THazardWorkPlanServiceImpl extends SuperServiceImpl<THazardWorkPlan
...
@@ -252,6 +255,7 @@ public class THazardWorkPlanServiceImpl extends SuperServiceImpl<THazardWorkPlan
tHazardWorkPlanDTO
.
setOrgName
(
sysOrgVo
.
getSubSectorPath
());
tHazardWorkPlanDTO
.
setOrgName
(
sysOrgVo
.
getSubSectorPath
());
}
}
tHazardWorkPlanDTO
.
setBuildWorkStatus
(
buildWorkStatus
(
tHazardWorkPlanDTO
));
tHazardWorkPlanDTO
.
setBuildWorkStatus
(
buildWorkStatus
(
tHazardWorkPlanDTO
));
tHazardWorkPlanDTO
.
setCheckCount
(
tHazardWorkPlanCheckDao
.
countByPlanId
(
tHazardWorkPlanDTO
.
getId
()));
}
}
Page
<
THazardWorkPlanDTO
>
planPage
=
new
Page
<>();
Page
<
THazardWorkPlanDTO
>
planPage
=
new
Page
<>();
planPage
.
setRecords
(
tHazardWorkPlanDTOS
);
planPage
.
setRecords
(
tHazardWorkPlanDTOS
);
...
...
zlmy-modules/zlmy-boot/src/main/resources/mapper/hazard/THazardWorkPlanCheck.xml
0 → 100644
View file @
c2688c1b
<?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=
"com.testor.module.hazard.dao.THazardWorkPlanCheckDao"
>
<!-- 开启二级缓存 -->
<!-- <cache type="org.mybatis.caches.ehcache.LoggingEhcache"/> -->
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"com.testor.module.hazard.model.domain.THazardWorkPlanCheck"
>
<id
column=
"id"
property=
"id"
/>
<id
column=
"plan_id"
property=
"planId"
/>
<id
column=
"check_time"
property=
"checkTime"
/>
<id
column=
"is_compliant"
property=
"isCompliant"
/>
<id
column=
"problem_type"
property=
"problemType"
/>
<id
column=
"check_description"
property=
"checkDescription"
/>
<id
column=
"check_images"
property=
"checkImages"
/>
<id
column=
"check_signature"
property=
"checkSignature"
/>
<id
column=
"check_status"
property=
"checkStatus"
/>
<id
column=
"code"
property=
"code"
/>
<id
column=
"workType"
property=
"workType"
/>
<id
column=
"workLevel"
property=
"workLevel"
/>
<id
column=
"stakeholderWork"
property=
"stakeholderWork"
/>
<id
column=
"check_signature_time"
property=
"checkSignatureTime"
/>
</resultMap>
<select
id=
"selectTHazardWorkPlanCheckList"
resultMap=
"BaseResultMap"
>
select hwpc.*,hwp.code code,hwp.work_type workType,hwp.work_level workLevel,hwp.stakeholder_work stakeholderWork
from t_hazard_work_plan_check hwpc
left join t_hazard_work_plan hwp on hwpc.plan_id = hwp.id
where hwpc.status = '0' and hwpc.plan_id = #{param.planId}
order by hwpc.create_date desc
</select>
<select
id=
"selectAppTHazardWorkPlanCheckList"
resultMap=
"BaseResultMap"
>
select hwpc.*,hwp.code code,hwp.work_type workType,hwp.work_level workLevel,hwp.stakeholder_work stakeholderWork
from t_hazard_work_plan_check hwpc
left join t_hazard_work_plan hwp on hwpc.plan_id = hwp.id
where hwpc.status = '0' and hwpc.plan_id = #{param.planId} and hwpc.create_by=#{param.createBy}
order by hwpc.create_date desc
</select>
<select
id=
"detail"
resultMap=
"BaseResultMap"
>
select hwpc.*,hwp.code code,hwp.work_type workType,hwp.work_level workLevel,hwp.stakeholder_work stakeholderWork
from t_hazard_work_plan_check hwpc
left join t_hazard_work_plan hwp on hwpc.plan_id = hwp.id
where hwpc.status = '0' and hwpc.id = #{id}
</select>
</mapper>
\ No newline at end of file
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