Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zhengyuan-danger-chemistry-manage
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
耿迪迪
zhengyuan-danger-chemistry-manage
Commits
da29a3f9
Commit
da29a3f9
authored
Dec 27, 2022
by
耿迪迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
承包商及访客培训 gengdidi
parent
f62d76ec
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
1189 additions
and
0 deletions
+1189
-0
TContractorTrainCourseController.java
...oller/contractTrain/TContractorTrainCourseController.java
+103
-0
TContractorTrainCourseTopicController.java
.../contractTrain/TContractorTrainCourseTopicController.java
+103
-0
TContractorTrainCourse.java
...java/com/zehong/system/domain/TContractorTrainCourse.java
+151
-0
TContractorTrainCourseTopic.java
...com/zehong/system/domain/TContractorTrainCourseTopic.java
+109
-0
TContractorTrainCourseMapper.java
...om/zehong/system/mapper/TContractorTrainCourseMapper.java
+61
-0
TContractorTrainCourseTopicMapper.java
...hong/system/mapper/TContractorTrainCourseTopicMapper.java
+61
-0
ITContractorTrainCourseService.java
...zehong/system/service/ITContractorTrainCourseService.java
+61
-0
ITContractorTrainCourseTopicService.java
...g/system/service/ITContractorTrainCourseTopicService.java
+61
-0
TContractorTrainCourseServiceImpl.java
...ystem/service/impl/TContractorTrainCourseServiceImpl.java
+95
-0
TContractorTrainCourseTopicServiceImpl.java
.../service/impl/TContractorTrainCourseTopicServiceImpl.java
+95
-0
TContractorTrainCourseMapper.xml
.../resources/mapper/system/TContractorTrainCourseMapper.xml
+99
-0
TContractorTrainCourseTopicMapper.xml
...urces/mapper/system/TContractorTrainCourseTopicMapper.xml
+84
-0
contractTrain.js
danger-manage-web/src/api/contractTrain/contractTrain.js
+53
-0
contractTrainTopic.js
...er-manage-web/src/api/contractTrain/contractTrainTopic.js
+53
-0
No files found.
danger-manage-admin/src/main/java/com/zehong/web/controller/contractTrain/TContractorTrainCourseController.java
0 → 100644
View file @
da29a3f9
package
com
.
zehong
.
web
.
controller
.
contractTrain
;
import
java.util.List
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.zehong.common.annotation.Log
;
import
com.zehong.common.core.controller.BaseController
;
import
com.zehong.common.core.domain.AjaxResult
;
import
com.zehong.common.enums.BusinessType
;
import
com.zehong.system.domain.TContractorTrainCourse
;
import
com.zehong.system.service.ITContractorTrainCourseService
;
import
com.zehong.common.utils.poi.ExcelUtil
;
import
com.zehong.common.core.page.TableDataInfo
;
/**
* 承包商及访客培训Controller
*
* @author zehong
* @date 2022-12-27
*/
@RestController
@RequestMapping
(
"/contractTrain"
)
public
class
TContractorTrainCourseController
extends
BaseController
{
@Autowired
private
ITContractorTrainCourseService
tContractorTrainCourseService
;
/**
* 查询承包商及访客培训列表
*/
//@PreAuthorize("@ss.hasPermi('system:course:list')")
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
TContractorTrainCourse
tContractorTrainCourse
)
{
startPage
();
List
<
TContractorTrainCourse
>
list
=
tContractorTrainCourseService
.
selectTContractorTrainCourseList
(
tContractorTrainCourse
);
return
getDataTable
(
list
);
}
/**
* 导出承包商及访客培训列表
*/
//@PreAuthorize("@ss.hasPermi('system:course:export')")
@Log
(
title
=
"承包商及访客培训"
,
businessType
=
BusinessType
.
EXPORT
)
@GetMapping
(
"/export"
)
public
AjaxResult
export
(
TContractorTrainCourse
tContractorTrainCourse
)
{
List
<
TContractorTrainCourse
>
list
=
tContractorTrainCourseService
.
selectTContractorTrainCourseList
(
tContractorTrainCourse
);
ExcelUtil
<
TContractorTrainCourse
>
util
=
new
ExcelUtil
<
TContractorTrainCourse
>(
TContractorTrainCourse
.
class
);
return
util
.
exportExcel
(
list
,
"承包商及访客培训数据"
);
}
/**
* 获取承包商及访客培训详细信息
*/
//@PreAuthorize("@ss.hasPermi('system:course:query')")
@GetMapping
(
value
=
"/{contractorCourseId}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"contractorCourseId"
)
Long
contractorCourseId
)
{
return
AjaxResult
.
success
(
tContractorTrainCourseService
.
selectTContractorTrainCourseById
(
contractorCourseId
));
}
/**
* 新增承包商及访客培训
*/
//@PreAuthorize("@ss.hasPermi('system:course:add')")
@Log
(
title
=
"承包商及访客培训"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
TContractorTrainCourse
tContractorTrainCourse
)
{
return
toAjax
(
tContractorTrainCourseService
.
insertTContractorTrainCourse
(
tContractorTrainCourse
));
}
/**
* 修改承包商及访客培训
*/
//@PreAuthorize("@ss.hasPermi('system:course:edit')")
@Log
(
title
=
"承包商及访客培训"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
TContractorTrainCourse
tContractorTrainCourse
)
{
return
toAjax
(
tContractorTrainCourseService
.
updateTContractorTrainCourse
(
tContractorTrainCourse
));
}
/**
* 删除承包商及访客培训
*/
//@PreAuthorize("@ss.hasPermi('system:course:remove')")
@Log
(
title
=
"承包商及访客培训"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{contractorCourseIds}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
contractorCourseIds
)
{
return
toAjax
(
tContractorTrainCourseService
.
deleteTContractorTrainCourseByIds
(
contractorCourseIds
));
}
}
danger-manage-admin/src/main/java/com/zehong/web/controller/contractTrain/TContractorTrainCourseTopicController.java
0 → 100644
View file @
da29a3f9
package
com
.
zehong
.
web
.
controller
.
contractTrain
;
import
java.util.List
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.zehong.common.annotation.Log
;
import
com.zehong.common.core.controller.BaseController
;
import
com.zehong.common.core.domain.AjaxResult
;
import
com.zehong.common.enums.BusinessType
;
import
com.zehong.system.domain.TContractorTrainCourseTopic
;
import
com.zehong.system.service.ITContractorTrainCourseTopicService
;
import
com.zehong.common.utils.poi.ExcelUtil
;
import
com.zehong.common.core.page.TableDataInfo
;
/**
* 承包商及访客培训题库Controller
*
* @author zehong
* @date 2022-12-27
*/
@RestController
@RequestMapping
(
"/contractTrainTopic"
)
public
class
TContractorTrainCourseTopicController
extends
BaseController
{
@Autowired
private
ITContractorTrainCourseTopicService
tContractorTrainCourseTopicService
;
/**
* 查询承包商及访客培训题库列表
*/
//@PreAuthorize("@ss.hasPermi('system:topic:list')")
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
TContractorTrainCourseTopic
tContractorTrainCourseTopic
)
{
startPage
();
List
<
TContractorTrainCourseTopic
>
list
=
tContractorTrainCourseTopicService
.
selectTContractorTrainCourseTopicList
(
tContractorTrainCourseTopic
);
return
getDataTable
(
list
);
}
/**
* 导出承包商及访客培训题库列表
*/
//@PreAuthorize("@ss.hasPermi('system:topic:export')")
@Log
(
title
=
"承包商及访客培训题库"
,
businessType
=
BusinessType
.
EXPORT
)
@GetMapping
(
"/export"
)
public
AjaxResult
export
(
TContractorTrainCourseTopic
tContractorTrainCourseTopic
)
{
List
<
TContractorTrainCourseTopic
>
list
=
tContractorTrainCourseTopicService
.
selectTContractorTrainCourseTopicList
(
tContractorTrainCourseTopic
);
ExcelUtil
<
TContractorTrainCourseTopic
>
util
=
new
ExcelUtil
<
TContractorTrainCourseTopic
>(
TContractorTrainCourseTopic
.
class
);
return
util
.
exportExcel
(
list
,
"承包商及访客培训题库数据"
);
}
/**
* 获取承包商及访客培训题库详细信息
*/
//@PreAuthorize("@ss.hasPermi('system:topic:query')")
@GetMapping
(
value
=
"/{topicId}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"topicId"
)
Long
topicId
)
{
return
AjaxResult
.
success
(
tContractorTrainCourseTopicService
.
selectTContractorTrainCourseTopicById
(
topicId
));
}
/**
* 新增承包商及访客培训题库
*/
//@PreAuthorize("@ss.hasPermi('system:topic:add')")
@Log
(
title
=
"承包商及访客培训题库"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
TContractorTrainCourseTopic
tContractorTrainCourseTopic
)
{
return
toAjax
(
tContractorTrainCourseTopicService
.
insertTContractorTrainCourseTopic
(
tContractorTrainCourseTopic
));
}
/**
* 修改承包商及访客培训题库
*/
//@PreAuthorize("@ss.hasPermi('system:topic:edit')")
@Log
(
title
=
"承包商及访客培训题库"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
TContractorTrainCourseTopic
tContractorTrainCourseTopic
)
{
return
toAjax
(
tContractorTrainCourseTopicService
.
updateTContractorTrainCourseTopic
(
tContractorTrainCourseTopic
));
}
/**
* 删除承包商及访客培训题库
*/
//@PreAuthorize("@ss.hasPermi('system:topic:remove')")
@Log
(
title
=
"承包商及访客培训题库"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{topicIds}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
topicIds
)
{
return
toAjax
(
tContractorTrainCourseTopicService
.
deleteTContractorTrainCourseTopicByIds
(
topicIds
));
}
}
danger-manage-system/src/main/java/com/zehong/system/domain/TContractorTrainCourse.java
0 → 100644
View file @
da29a3f9
package
com
.
zehong
.
system
.
domain
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.zehong.common.annotation.Excel
;
import
com.zehong.common.core.domain.BaseEntity
;
/**
* 承包商及访客培训对象 t_contractor_train_course
*
* @author zehong
* @date 2022-12-27
*/
public
class
TContractorTrainCourse
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** 培训id */
private
Long
contractorCourseId
;
/** 培训名称 */
@Excel
(
name
=
"培训名称"
)
private
String
courseName
;
/** 培训内容 */
@Excel
(
name
=
"培训内容"
)
private
String
courseConent
;
/** 培训附件 */
@Excel
(
name
=
"培训附件"
)
private
String
enclosure
;
/** 培训视频 */
@Excel
(
name
=
"培训视频"
)
private
String
video
;
/** 答题合格数 */
@Excel
(
name
=
"答题合格数"
)
private
Integer
qualifiedNum
;
/** 录入题数量 */
@Excel
(
name
=
"录入题数量"
)
private
Integer
topicNum
;
/** 创建人 */
@Excel
(
name
=
"创建人"
)
private
String
createUser
;
/** 是否删除(0正常,1删除) */
@Excel
(
name
=
"是否删除(0正常,1删除)"
)
private
String
isDel
;
public
void
setContractorCourseId
(
Long
contractorCourseId
)
{
this
.
contractorCourseId
=
contractorCourseId
;
}
public
Long
getContractorCourseId
()
{
return
contractorCourseId
;
}
public
void
setCourseName
(
String
courseName
)
{
this
.
courseName
=
courseName
;
}
public
String
getCourseName
()
{
return
courseName
;
}
public
void
setCourseConent
(
String
courseConent
)
{
this
.
courseConent
=
courseConent
;
}
public
String
getCourseConent
()
{
return
courseConent
;
}
public
void
setEnclosure
(
String
enclosure
)
{
this
.
enclosure
=
enclosure
;
}
public
String
getEnclosure
()
{
return
enclosure
;
}
public
void
setVideo
(
String
video
)
{
this
.
video
=
video
;
}
public
String
getVideo
()
{
return
video
;
}
public
void
setQualifiedNum
(
Integer
qualifiedNum
)
{
this
.
qualifiedNum
=
qualifiedNum
;
}
public
Integer
getQualifiedNum
()
{
return
qualifiedNum
;
}
public
void
setTopicNum
(
Integer
topicNum
)
{
this
.
topicNum
=
topicNum
;
}
public
Integer
getTopicNum
()
{
return
topicNum
;
}
public
void
setCreateUser
(
String
createUser
)
{
this
.
createUser
=
createUser
;
}
public
String
getCreateUser
()
{
return
createUser
;
}
public
void
setIsDel
(
String
isDel
)
{
this
.
isDel
=
isDel
;
}
public
String
getIsDel
()
{
return
isDel
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"contractorCourseId"
,
getContractorCourseId
())
.
append
(
"courseName"
,
getCourseName
())
.
append
(
"courseConent"
,
getCourseConent
())
.
append
(
"enclosure"
,
getEnclosure
())
.
append
(
"video"
,
getVideo
())
.
append
(
"qualifiedNum"
,
getQualifiedNum
())
.
append
(
"topicNum"
,
getTopicNum
())
.
append
(
"createTime"
,
getCreateTime
())
.
append
(
"createUser"
,
getCreateUser
())
.
append
(
"isDel"
,
getIsDel
())
.
append
(
"remark"
,
getRemark
())
.
toString
();
}
}
danger-manage-system/src/main/java/com/zehong/system/domain/TContractorTrainCourseTopic.java
0 → 100644
View file @
da29a3f9
package
com
.
zehong
.
system
.
domain
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
com.zehong.common.annotation.Excel
;
import
com.zehong.common.core.domain.BaseEntity
;
/**
* 承包商及访客培训题库对象 t_contractor_train_course_topic
*
* @author zehong
* @date 2022-12-27
*/
public
class
TContractorTrainCourseTopic
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** 题目id */
private
Long
topicId
;
/** 所属培训id */
@Excel
(
name
=
"所属培训id"
)
private
Long
contractorCourseId
;
/** 题目内容 */
@Excel
(
name
=
"题目内容"
)
private
String
topicTitle
;
/** 题目选项(json) */
@Excel
(
name
=
"题目选项"
,
readConverterExp
=
"j=son"
)
private
String
topicOption
;
/** 答案 */
@Excel
(
name
=
"答案"
)
private
Integer
answer
;
/** 是否删除(0正常,1删除) */
@Excel
(
name
=
"是否删除(0正常,1删除)"
)
private
String
isDel
;
public
void
setTopicId
(
Long
topicId
)
{
this
.
topicId
=
topicId
;
}
public
Long
getTopicId
()
{
return
topicId
;
}
public
void
setContractorCourseId
(
Long
contractorCourseId
)
{
this
.
contractorCourseId
=
contractorCourseId
;
}
public
Long
getContractorCourseId
()
{
return
contractorCourseId
;
}
public
void
setTopicTitle
(
String
topicTitle
)
{
this
.
topicTitle
=
topicTitle
;
}
public
String
getTopicTitle
()
{
return
topicTitle
;
}
public
void
setTopicOption
(
String
topicOption
)
{
this
.
topicOption
=
topicOption
;
}
public
String
getTopicOption
()
{
return
topicOption
;
}
public
void
setAnswer
(
Integer
answer
)
{
this
.
answer
=
answer
;
}
public
Integer
getAnswer
()
{
return
answer
;
}
public
void
setIsDel
(
String
isDel
)
{
this
.
isDel
=
isDel
;
}
public
String
getIsDel
()
{
return
isDel
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"topicId"
,
getTopicId
())
.
append
(
"contractorCourseId"
,
getContractorCourseId
())
.
append
(
"topicTitle"
,
getTopicTitle
())
.
append
(
"topicOption"
,
getTopicOption
())
.
append
(
"answer"
,
getAnswer
())
.
append
(
"createTime"
,
getCreateTime
())
.
append
(
"isDel"
,
getIsDel
())
.
append
(
"remark"
,
getRemark
())
.
toString
();
}
}
danger-manage-system/src/main/java/com/zehong/system/mapper/TContractorTrainCourseMapper.java
0 → 100644
View file @
da29a3f9
package
com
.
zehong
.
system
.
mapper
;
import
java.util.List
;
import
com.zehong.system.domain.TContractorTrainCourse
;
/**
* 承包商及访客培训Mapper接口
*
* @author zehong
* @date 2022-12-27
*/
public
interface
TContractorTrainCourseMapper
{
/**
* 查询承包商及访客培训
*
* @param contractorCourseId 承包商及访客培训ID
* @return 承包商及访客培训
*/
public
TContractorTrainCourse
selectTContractorTrainCourseById
(
Long
contractorCourseId
);
/**
* 查询承包商及访客培训列表
*
* @param tContractorTrainCourse 承包商及访客培训
* @return 承包商及访客培训集合
*/
public
List
<
TContractorTrainCourse
>
selectTContractorTrainCourseList
(
TContractorTrainCourse
tContractorTrainCourse
);
/**
* 新增承包商及访客培训
*
* @param tContractorTrainCourse 承包商及访客培训
* @return 结果
*/
public
int
insertTContractorTrainCourse
(
TContractorTrainCourse
tContractorTrainCourse
);
/**
* 修改承包商及访客培训
*
* @param tContractorTrainCourse 承包商及访客培训
* @return 结果
*/
public
int
updateTContractorTrainCourse
(
TContractorTrainCourse
tContractorTrainCourse
);
/**
* 删除承包商及访客培训
*
* @param contractorCourseId 承包商及访客培训ID
* @return 结果
*/
public
int
deleteTContractorTrainCourseById
(
Long
contractorCourseId
);
/**
* 批量删除承包商及访客培训
*
* @param contractorCourseIds 需要删除的数据ID
* @return 结果
*/
public
int
deleteTContractorTrainCourseByIds
(
Long
[]
contractorCourseIds
);
}
danger-manage-system/src/main/java/com/zehong/system/mapper/TContractorTrainCourseTopicMapper.java
0 → 100644
View file @
da29a3f9
package
com
.
zehong
.
system
.
mapper
;
import
java.util.List
;
import
com.zehong.system.domain.TContractorTrainCourseTopic
;
/**
* 承包商及访客培训题库Mapper接口
*
* @author zehong
* @date 2022-12-27
*/
public
interface
TContractorTrainCourseTopicMapper
{
/**
* 查询承包商及访客培训题库
*
* @param topicId 承包商及访客培训题库ID
* @return 承包商及访客培训题库
*/
public
TContractorTrainCourseTopic
selectTContractorTrainCourseTopicById
(
Long
topicId
);
/**
* 查询承包商及访客培训题库列表
*
* @param tContractorTrainCourseTopic 承包商及访客培训题库
* @return 承包商及访客培训题库集合
*/
public
List
<
TContractorTrainCourseTopic
>
selectTContractorTrainCourseTopicList
(
TContractorTrainCourseTopic
tContractorTrainCourseTopic
);
/**
* 新增承包商及访客培训题库
*
* @param tContractorTrainCourseTopic 承包商及访客培训题库
* @return 结果
*/
public
int
insertTContractorTrainCourseTopic
(
TContractorTrainCourseTopic
tContractorTrainCourseTopic
);
/**
* 修改承包商及访客培训题库
*
* @param tContractorTrainCourseTopic 承包商及访客培训题库
* @return 结果
*/
public
int
updateTContractorTrainCourseTopic
(
TContractorTrainCourseTopic
tContractorTrainCourseTopic
);
/**
* 删除承包商及访客培训题库
*
* @param topicId 承包商及访客培训题库ID
* @return 结果
*/
public
int
deleteTContractorTrainCourseTopicById
(
Long
topicId
);
/**
* 批量删除承包商及访客培训题库
*
* @param topicIds 需要删除的数据ID
* @return 结果
*/
public
int
deleteTContractorTrainCourseTopicByIds
(
Long
[]
topicIds
);
}
danger-manage-system/src/main/java/com/zehong/system/service/ITContractorTrainCourseService.java
0 → 100644
View file @
da29a3f9
package
com
.
zehong
.
system
.
service
;
import
java.util.List
;
import
com.zehong.system.domain.TContractorTrainCourse
;
/**
* 承包商及访客培训Service接口
*
* @author zehong
* @date 2022-12-27
*/
public
interface
ITContractorTrainCourseService
{
/**
* 查询承包商及访客培训
*
* @param contractorCourseId 承包商及访客培训ID
* @return 承包商及访客培训
*/
public
TContractorTrainCourse
selectTContractorTrainCourseById
(
Long
contractorCourseId
);
/**
* 查询承包商及访客培训列表
*
* @param tContractorTrainCourse 承包商及访客培训
* @return 承包商及访客培训集合
*/
public
List
<
TContractorTrainCourse
>
selectTContractorTrainCourseList
(
TContractorTrainCourse
tContractorTrainCourse
);
/**
* 新增承包商及访客培训
*
* @param tContractorTrainCourse 承包商及访客培训
* @return 结果
*/
public
int
insertTContractorTrainCourse
(
TContractorTrainCourse
tContractorTrainCourse
);
/**
* 修改承包商及访客培训
*
* @param tContractorTrainCourse 承包商及访客培训
* @return 结果
*/
public
int
updateTContractorTrainCourse
(
TContractorTrainCourse
tContractorTrainCourse
);
/**
* 批量删除承包商及访客培训
*
* @param contractorCourseIds 需要删除的承包商及访客培训ID
* @return 结果
*/
public
int
deleteTContractorTrainCourseByIds
(
Long
[]
contractorCourseIds
);
/**
* 删除承包商及访客培训信息
*
* @param contractorCourseId 承包商及访客培训ID
* @return 结果
*/
public
int
deleteTContractorTrainCourseById
(
Long
contractorCourseId
);
}
danger-manage-system/src/main/java/com/zehong/system/service/ITContractorTrainCourseTopicService.java
0 → 100644
View file @
da29a3f9
package
com
.
zehong
.
system
.
service
;
import
java.util.List
;
import
com.zehong.system.domain.TContractorTrainCourseTopic
;
/**
* 承包商及访客培训题库Service接口
*
* @author zehong
* @date 2022-12-27
*/
public
interface
ITContractorTrainCourseTopicService
{
/**
* 查询承包商及访客培训题库
*
* @param topicId 承包商及访客培训题库ID
* @return 承包商及访客培训题库
*/
public
TContractorTrainCourseTopic
selectTContractorTrainCourseTopicById
(
Long
topicId
);
/**
* 查询承包商及访客培训题库列表
*
* @param tContractorTrainCourseTopic 承包商及访客培训题库
* @return 承包商及访客培训题库集合
*/
public
List
<
TContractorTrainCourseTopic
>
selectTContractorTrainCourseTopicList
(
TContractorTrainCourseTopic
tContractorTrainCourseTopic
);
/**
* 新增承包商及访客培训题库
*
* @param tContractorTrainCourseTopic 承包商及访客培训题库
* @return 结果
*/
public
int
insertTContractorTrainCourseTopic
(
TContractorTrainCourseTopic
tContractorTrainCourseTopic
);
/**
* 修改承包商及访客培训题库
*
* @param tContractorTrainCourseTopic 承包商及访客培训题库
* @return 结果
*/
public
int
updateTContractorTrainCourseTopic
(
TContractorTrainCourseTopic
tContractorTrainCourseTopic
);
/**
* 批量删除承包商及访客培训题库
*
* @param topicIds 需要删除的承包商及访客培训题库ID
* @return 结果
*/
public
int
deleteTContractorTrainCourseTopicByIds
(
Long
[]
topicIds
);
/**
* 删除承包商及访客培训题库信息
*
* @param topicId 承包商及访客培训题库ID
* @return 结果
*/
public
int
deleteTContractorTrainCourseTopicById
(
Long
topicId
);
}
danger-manage-system/src/main/java/com/zehong/system/service/impl/TContractorTrainCourseServiceImpl.java
0 → 100644
View file @
da29a3f9
package
com
.
zehong
.
system
.
service
.
impl
;
import
java.util.List
;
import
com.zehong.common.utils.DateUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.zehong.system.mapper.TContractorTrainCourseMapper
;
import
com.zehong.system.domain.TContractorTrainCourse
;
import
com.zehong.system.service.ITContractorTrainCourseService
;
/**
* 承包商及访客培训Service业务层处理
*
* @author zehong
* @date 2022-12-27
*/
@Service
public
class
TContractorTrainCourseServiceImpl
implements
ITContractorTrainCourseService
{
@Autowired
private
TContractorTrainCourseMapper
tContractorTrainCourseMapper
;
/**
* 查询承包商及访客培训
*
* @param contractorCourseId 承包商及访客培训ID
* @return 承包商及访客培训
*/
@Override
public
TContractorTrainCourse
selectTContractorTrainCourseById
(
Long
contractorCourseId
)
{
return
tContractorTrainCourseMapper
.
selectTContractorTrainCourseById
(
contractorCourseId
);
}
/**
* 查询承包商及访客培训列表
*
* @param tContractorTrainCourse 承包商及访客培训
* @return 承包商及访客培训
*/
@Override
public
List
<
TContractorTrainCourse
>
selectTContractorTrainCourseList
(
TContractorTrainCourse
tContractorTrainCourse
)
{
return
tContractorTrainCourseMapper
.
selectTContractorTrainCourseList
(
tContractorTrainCourse
);
}
/**
* 新增承包商及访客培训
*
* @param tContractorTrainCourse 承包商及访客培训
* @return 结果
*/
@Override
public
int
insertTContractorTrainCourse
(
TContractorTrainCourse
tContractorTrainCourse
)
{
tContractorTrainCourse
.
setCreateTime
(
DateUtils
.
getNowDate
());
return
tContractorTrainCourseMapper
.
insertTContractorTrainCourse
(
tContractorTrainCourse
);
}
/**
* 修改承包商及访客培训
*
* @param tContractorTrainCourse 承包商及访客培训
* @return 结果
*/
@Override
public
int
updateTContractorTrainCourse
(
TContractorTrainCourse
tContractorTrainCourse
)
{
return
tContractorTrainCourseMapper
.
updateTContractorTrainCourse
(
tContractorTrainCourse
);
}
/**
* 批量删除承包商及访客培训
*
* @param contractorCourseIds 需要删除的承包商及访客培训ID
* @return 结果
*/
@Override
public
int
deleteTContractorTrainCourseByIds
(
Long
[]
contractorCourseIds
)
{
return
tContractorTrainCourseMapper
.
deleteTContractorTrainCourseByIds
(
contractorCourseIds
);
}
/**
* 删除承包商及访客培训信息
*
* @param contractorCourseId 承包商及访客培训ID
* @return 结果
*/
@Override
public
int
deleteTContractorTrainCourseById
(
Long
contractorCourseId
)
{
return
tContractorTrainCourseMapper
.
deleteTContractorTrainCourseById
(
contractorCourseId
);
}
}
danger-manage-system/src/main/java/com/zehong/system/service/impl/TContractorTrainCourseTopicServiceImpl.java
0 → 100644
View file @
da29a3f9
package
com
.
zehong
.
system
.
service
.
impl
;
import
java.util.List
;
import
com.zehong.common.utils.DateUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.zehong.system.mapper.TContractorTrainCourseTopicMapper
;
import
com.zehong.system.domain.TContractorTrainCourseTopic
;
import
com.zehong.system.service.ITContractorTrainCourseTopicService
;
/**
* 承包商及访客培训题库Service业务层处理
*
* @author zehong
* @date 2022-12-27
*/
@Service
public
class
TContractorTrainCourseTopicServiceImpl
implements
ITContractorTrainCourseTopicService
{
@Autowired
private
TContractorTrainCourseTopicMapper
tContractorTrainCourseTopicMapper
;
/**
* 查询承包商及访客培训题库
*
* @param topicId 承包商及访客培训题库ID
* @return 承包商及访客培训题库
*/
@Override
public
TContractorTrainCourseTopic
selectTContractorTrainCourseTopicById
(
Long
topicId
)
{
return
tContractorTrainCourseTopicMapper
.
selectTContractorTrainCourseTopicById
(
topicId
);
}
/**
* 查询承包商及访客培训题库列表
*
* @param tContractorTrainCourseTopic 承包商及访客培训题库
* @return 承包商及访客培训题库
*/
@Override
public
List
<
TContractorTrainCourseTopic
>
selectTContractorTrainCourseTopicList
(
TContractorTrainCourseTopic
tContractorTrainCourseTopic
)
{
return
tContractorTrainCourseTopicMapper
.
selectTContractorTrainCourseTopicList
(
tContractorTrainCourseTopic
);
}
/**
* 新增承包商及访客培训题库
*
* @param tContractorTrainCourseTopic 承包商及访客培训题库
* @return 结果
*/
@Override
public
int
insertTContractorTrainCourseTopic
(
TContractorTrainCourseTopic
tContractorTrainCourseTopic
)
{
tContractorTrainCourseTopic
.
setCreateTime
(
DateUtils
.
getNowDate
());
return
tContractorTrainCourseTopicMapper
.
insertTContractorTrainCourseTopic
(
tContractorTrainCourseTopic
);
}
/**
* 修改承包商及访客培训题库
*
* @param tContractorTrainCourseTopic 承包商及访客培训题库
* @return 结果
*/
@Override
public
int
updateTContractorTrainCourseTopic
(
TContractorTrainCourseTopic
tContractorTrainCourseTopic
)
{
return
tContractorTrainCourseTopicMapper
.
updateTContractorTrainCourseTopic
(
tContractorTrainCourseTopic
);
}
/**
* 批量删除承包商及访客培训题库
*
* @param topicIds 需要删除的承包商及访客培训题库ID
* @return 结果
*/
@Override
public
int
deleteTContractorTrainCourseTopicByIds
(
Long
[]
topicIds
)
{
return
tContractorTrainCourseTopicMapper
.
deleteTContractorTrainCourseTopicByIds
(
topicIds
);
}
/**
* 删除承包商及访客培训题库信息
*
* @param topicId 承包商及访客培训题库ID
* @return 结果
*/
@Override
public
int
deleteTContractorTrainCourseTopicById
(
Long
topicId
)
{
return
tContractorTrainCourseTopicMapper
.
deleteTContractorTrainCourseTopicById
(
topicId
);
}
}
danger-manage-system/src/main/resources/mapper/system/TContractorTrainCourseMapper.xml
0 → 100644
View file @
da29a3f9
<?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.zehong.system.mapper.TContractorTrainCourseMapper"
>
<resultMap
type=
"TContractorTrainCourse"
id=
"TContractorTrainCourseResult"
>
<result
property=
"contractorCourseId"
column=
"contractor_course_id"
/>
<result
property=
"courseName"
column=
"course_name"
/>
<result
property=
"courseConent"
column=
"course_conent"
/>
<result
property=
"enclosure"
column=
"enclosure"
/>
<result
property=
"video"
column=
"video"
/>
<result
property=
"qualifiedNum"
column=
"qualified_num"
/>
<result
property=
"topicNum"
column=
"topic_num"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"createUser"
column=
"create_user"
/>
<result
property=
"isDel"
column=
"is_del"
/>
<result
property=
"remark"
column=
"remark"
/>
</resultMap>
<sql
id=
"selectTContractorTrainCourseVo"
>
select contractor_course_id, course_name, course_conent, enclosure, video, qualified_num, topic_num, create_time, create_user, is_del, remark from t_contractor_train_course
</sql>
<select
id=
"selectTContractorTrainCourseList"
parameterType=
"TContractorTrainCourse"
resultMap=
"TContractorTrainCourseResult"
>
<include
refid=
"selectTContractorTrainCourseVo"
/>
<where>
<if
test=
"courseName != null and courseName != ''"
>
and course_name like concat('%', #{courseName}, '%')
</if>
<if
test=
"courseConent != null and courseConent != ''"
>
and course_conent = #{courseConent}
</if>
<if
test=
"enclosure != null and enclosure != ''"
>
and enclosure = #{enclosure}
</if>
<if
test=
"video != null and video != ''"
>
and video = #{video}
</if>
<if
test=
"qualifiedNum != null "
>
and qualified_num = #{qualifiedNum}
</if>
<if
test=
"topicNum != null "
>
and topic_num = #{topicNum}
</if>
<if
test=
"createUser != null and createUser != ''"
>
and create_user = #{createUser}
</if>
<if
test=
"isDel != null and isDel != ''"
>
and is_del = #{isDel}
</if>
</where>
</select>
<select
id=
"selectTContractorTrainCourseById"
parameterType=
"Long"
resultMap=
"TContractorTrainCourseResult"
>
<include
refid=
"selectTContractorTrainCourseVo"
/>
where contractor_course_id = #{contractorCourseId}
</select>
<insert
id=
"insertTContractorTrainCourse"
parameterType=
"TContractorTrainCourse"
useGeneratedKeys=
"true"
keyProperty=
"contractorCourseId"
>
insert into t_contractor_train_course
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"courseName != null"
>
course_name,
</if>
<if
test=
"courseConent != null"
>
course_conent,
</if>
<if
test=
"enclosure != null"
>
enclosure,
</if>
<if
test=
"video != null"
>
video,
</if>
<if
test=
"qualifiedNum != null"
>
qualified_num,
</if>
<if
test=
"topicNum != null"
>
topic_num,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"createUser != null"
>
create_user,
</if>
<if
test=
"isDel != null"
>
is_del,
</if>
<if
test=
"remark != null"
>
remark,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"courseName != null"
>
#{courseName},
</if>
<if
test=
"courseConent != null"
>
#{courseConent},
</if>
<if
test=
"enclosure != null"
>
#{enclosure},
</if>
<if
test=
"video != null"
>
#{video},
</if>
<if
test=
"qualifiedNum != null"
>
#{qualifiedNum},
</if>
<if
test=
"topicNum != null"
>
#{topicNum},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"createUser != null"
>
#{createUser},
</if>
<if
test=
"isDel != null"
>
#{isDel},
</if>
<if
test=
"remark != null"
>
#{remark},
</if>
</trim>
</insert>
<update
id=
"updateTContractorTrainCourse"
parameterType=
"TContractorTrainCourse"
>
update t_contractor_train_course
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"courseName != null"
>
course_name = #{courseName},
</if>
<if
test=
"courseConent != null"
>
course_conent = #{courseConent},
</if>
<if
test=
"enclosure != null"
>
enclosure = #{enclosure},
</if>
<if
test=
"video != null"
>
video = #{video},
</if>
<if
test=
"qualifiedNum != null"
>
qualified_num = #{qualifiedNum},
</if>
<if
test=
"topicNum != null"
>
topic_num = #{topicNum},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
<if
test=
"createUser != null"
>
create_user = #{createUser},
</if>
<if
test=
"isDel != null"
>
is_del = #{isDel},
</if>
<if
test=
"remark != null"
>
remark = #{remark},
</if>
</trim>
where contractor_course_id = #{contractorCourseId}
</update>
<delete
id=
"deleteTContractorTrainCourseById"
parameterType=
"Long"
>
delete from t_contractor_train_course where contractor_course_id = #{contractorCourseId}
</delete>
<delete
id=
"deleteTContractorTrainCourseByIds"
parameterType=
"String"
>
delete from t_contractor_train_course where contractor_course_id in
<foreach
item=
"contractorCourseId"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{contractorCourseId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
danger-manage-system/src/main/resources/mapper/system/TContractorTrainCourseTopicMapper.xml
0 → 100644
View file @
da29a3f9
<?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.zehong.system.mapper.TContractorTrainCourseTopicMapper"
>
<resultMap
type=
"TContractorTrainCourseTopic"
id=
"TContractorTrainCourseTopicResult"
>
<result
property=
"topicId"
column=
"topic_id"
/>
<result
property=
"contractorCourseId"
column=
"contractor_course_id"
/>
<result
property=
"topicTitle"
column=
"topic_title"
/>
<result
property=
"topicOption"
column=
"topic_option"
/>
<result
property=
"answer"
column=
"answer"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"isDel"
column=
"is_del"
/>
<result
property=
"remark"
column=
"remark"
/>
</resultMap>
<sql
id=
"selectTContractorTrainCourseTopicVo"
>
select topic_id, contractor_course_id, topic_title, topic_option, answer, create_time, is_del, remark from t_contractor_train_course_topic
</sql>
<select
id=
"selectTContractorTrainCourseTopicList"
parameterType=
"TContractorTrainCourseTopic"
resultMap=
"TContractorTrainCourseTopicResult"
>
<include
refid=
"selectTContractorTrainCourseTopicVo"
/>
<where>
<if
test=
"contractorCourseId != null "
>
and contractor_course_id = #{contractorCourseId}
</if>
<if
test=
"topicTitle != null and topicTitle != ''"
>
and topic_title = #{topicTitle}
</if>
<if
test=
"topicOption != null and topicOption != ''"
>
and topic_option = #{topicOption}
</if>
<if
test=
"answer != null "
>
and answer = #{answer}
</if>
<if
test=
"isDel != null and isDel != ''"
>
and is_del = #{isDel}
</if>
</where>
</select>
<select
id=
"selectTContractorTrainCourseTopicById"
parameterType=
"Long"
resultMap=
"TContractorTrainCourseTopicResult"
>
<include
refid=
"selectTContractorTrainCourseTopicVo"
/>
where topic_id = #{topicId}
</select>
<insert
id=
"insertTContractorTrainCourseTopic"
parameterType=
"TContractorTrainCourseTopic"
useGeneratedKeys=
"true"
keyProperty=
"topicId"
>
insert into t_contractor_train_course_topic
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"contractorCourseId != null"
>
contractor_course_id,
</if>
<if
test=
"topicTitle != null"
>
topic_title,
</if>
<if
test=
"topicOption != null"
>
topic_option,
</if>
<if
test=
"answer != null"
>
answer,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"isDel != null"
>
is_del,
</if>
<if
test=
"remark != null"
>
remark,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"contractorCourseId != null"
>
#{contractorCourseId},
</if>
<if
test=
"topicTitle != null"
>
#{topicTitle},
</if>
<if
test=
"topicOption != null"
>
#{topicOption},
</if>
<if
test=
"answer != null"
>
#{answer},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"isDel != null"
>
#{isDel},
</if>
<if
test=
"remark != null"
>
#{remark},
</if>
</trim>
</insert>
<update
id=
"updateTContractorTrainCourseTopic"
parameterType=
"TContractorTrainCourseTopic"
>
update t_contractor_train_course_topic
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"contractorCourseId != null"
>
contractor_course_id = #{contractorCourseId},
</if>
<if
test=
"topicTitle != null"
>
topic_title = #{topicTitle},
</if>
<if
test=
"topicOption != null"
>
topic_option = #{topicOption},
</if>
<if
test=
"answer != null"
>
answer = #{answer},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
<if
test=
"isDel != null"
>
is_del = #{isDel},
</if>
<if
test=
"remark != null"
>
remark = #{remark},
</if>
</trim>
where topic_id = #{topicId}
</update>
<delete
id=
"deleteTContractorTrainCourseTopicById"
parameterType=
"Long"
>
delete from t_contractor_train_course_topic where topic_id = #{topicId}
</delete>
<delete
id=
"deleteTContractorTrainCourseTopicByIds"
parameterType=
"String"
>
delete from t_contractor_train_course_topic where topic_id in
<foreach
item=
"topicId"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{topicId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
danger-manage-web/src/api/contractTrain/contractTrain.js
0 → 100644
View file @
da29a3f9
import
request
from
'@/utils/request'
// 查询承包商及访客培训列表
export
function
listCourse
(
query
)
{
return
request
({
url
:
'/contractTrain/list'
,
method
:
'get'
,
params
:
query
})
}
// 查询承包商及访客培训详细
export
function
getCourse
(
contractorCourseId
)
{
return
request
({
url
:
'/contractTrain/'
+
contractorCourseId
,
method
:
'get'
})
}
// 新增承包商及访客培训
export
function
addCourse
(
data
)
{
return
request
({
url
:
'/contractTrain'
,
method
:
'post'
,
data
:
data
})
}
// 修改承包商及访客培训
export
function
updateCourse
(
data
)
{
return
request
({
url
:
'/contractTrain'
,
method
:
'put'
,
data
:
data
})
}
// 删除承包商及访客培训
export
function
delCourse
(
contractorCourseId
)
{
return
request
({
url
:
'/contractTrain/'
+
contractorCourseId
,
method
:
'delete'
})
}
// 导出承包商及访客培训
export
function
exportCourse
(
query
)
{
return
request
({
url
:
'/contractTrain/export'
,
method
:
'get'
,
params
:
query
})
}
danger-manage-web/src/api/contractTrain/contractTrainTopic.js
0 → 100644
View file @
da29a3f9
import
request
from
'@/utils/request'
// 查询承包商及访客培训题库列表
export
function
listTopic
(
query
)
{
return
request
({
url
:
'/contractTrainTopic/list'
,
method
:
'get'
,
params
:
query
})
}
// 查询承包商及访客培训题库详细
export
function
getTopic
(
topicId
)
{
return
request
({
url
:
'/contractTrainTopic/'
+
topicId
,
method
:
'get'
})
}
// 新增承包商及访客培训题库
export
function
addTopic
(
data
)
{
return
request
({
url
:
'/contractTrainTopic'
,
method
:
'post'
,
data
:
data
})
}
// 修改承包商及访客培训题库
export
function
updateTopic
(
data
)
{
return
request
({
url
:
'/contractTrainTopic'
,
method
:
'put'
,
data
:
data
})
}
// 删除承包商及访客培训题库
export
function
delTopic
(
topicId
)
{
return
request
({
url
:
'/contractTrainTopic/'
+
topicId
,
method
:
'delete'
})
}
// 导出承包商及访客培训题库
export
function
exportTopic
(
query
)
{
return
request
({
url
:
'/contractTrainTopic/export'
,
method
:
'get'
,
params
:
query
})
}
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