You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

147 lines
3.0 KiB
Markdown

examinationFinancialByQuery
===
* 根据条件获取ExaminationInstances数据 用于学生创建实训/练习实例 个人业务处理方法
SELECT
*
FROM
examination_instances
WHERE
team_id=#teamId#
AND examination_id=#examinationId#
AND flow_id=#flowId#
queryByCondition
===
* 根据不为空的参数进行分页查询
select
@pageTag(){
t.*
@}
from examination_instances t
where 1=1
@//数据权限该sql语句功能点,如果不考虑数据权限,可以删除此行
and #function("examinationInstances.query")#
@if(!isEmpty(id)){
and t.id =#id#
@}
@if(!isEmpty(createdAt)){
and t.created_at =#createdAt#
@}
@if(!isEmpty(updatedAt)){
and t.updated_at =#updatedAt#
@}
@if(!isEmpty(data)){
and t.data =#data#
@}
@if(!isEmpty(examinationId)){
and t.examination_id =#examinationId#
@}
@if(!isEmpty(flowId)){
and t.flow_id =#flowId#
@}
@if(!isEmpty(finishStep)){
and t.finish_step =#finishStep#
@}
@if(!isEmpty(status)){
and t.status =#status#
@}
@if(!isEmpty(teamId)){
and t.team_id =#teamId#
@}
deleteExaminationInstancesByIds
===
* 批量删除
delete from examination_instances where find_in_set(id,#ids#)
getExaminationInstancesValues
===
* 根据不为空的参数进行查询
select t.*
from examination_instances t
where 1=1
@if(!isEmpty(id)){
and t.id =#id#
@}
@if(!isEmpty(createdAt)){
and t.created_at =#createdAt#
@}
@if(!isEmpty(updatedAt)){
and t.updated_at =#updatedAt#
@}
@if(!isEmpty(data)){
and t.data =#data#
@}
@if(!isEmpty(examinationId)){
and t.examination_id =#examinationId#
@}
@if(!isEmpty(flowId)){
and t.flow_id =#flowId#
@}
@if(!isEmpty(finishStep)){
and t.finish_step =#finishStep#
@}
@if(!isEmpty(status)){
and t.status =#status#
@}
@if(!isEmpty(teamId)){
and t.team_id =#teamId#
@}
getValuesByQuery
===
* 根据不为空的参数进行查询
select t.*
from examination_instances t
where 1=1
@if(!isEmpty(id)){
and t.id =#id#
@}
@if(!isEmpty(createdAt)){
and t.created_at =#createdAt#
@}
@if(!isEmpty(updatedAt)){
and t.updated_at =#updatedAt#
@}
@if(!isEmpty(data)){
and t.data =#data#
@}
@if(!isEmpty(examinationId)){
and t.examination_id =#examinationId#
@}
@if(!isEmpty(flowId)){
and t.flow_id =#flowId#
@}
@if(!isEmpty(finishStep)){
and t.finish_step =#finishStep#
@}
@if(!isEmpty(status)){
and t.status =#status#
@}
@if(!isEmpty(teamId)){
and t.team_id =#teamId#
@}
finishStep
===
* 完成当前步骤
update examination_instances
set finish_step = #step#
where id = #id# and finish_step < #step#