Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
platform
Project
Project
Details
Activity
Releases
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
王琮
platform
Commits
03dfc821
Commit
03dfc821
authored
May 29, 2023
by
张宇杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新创SQL
parent
70655d9c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
488 additions
and
364 deletions
+488
-364
Questionnaire.xml
src/main/resources/mapper/Questionnaire.xml
+488
-364
No files found.
src/main/resources/mapper/Questionnaire.xml
View file @
03dfc821
...
...
@@ -4,56 +4,57 @@
<mapper
namespace=
"com.tiptimes.dao.QuestionnaireDao"
>
<insert
id=
"insertQuestionnaire"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
INSERT INTO t_questionnaire(questionnaire_name,
status,create_time,create_by,
qn_year)
VALUES
(#{questionnaireName},#{status},#{createTime},#{createBy},
#{qnYear})
INSERT INTO t_questionnaire(questionnaire_name,
status, create_time, create_by,
qn_year)
VALUES
(#{questionnaireName}, #{status}, #{createTime}, #{createBy},
#{qnYear})
</insert>
<!--根据年份查询问卷的id-->
<select
id=
"queryQuestionsId"
parameterType=
"Integer"
resultType=
"Integer"
>
select id from t_questionnaire where
<if
test=
"qnYear != null and qnYear != ''"
>
qn_year = #{qnYear}
</if>
select id from t_questionnaire where
<if
test=
"qnYear != null and qnYear != ''"
>
qn_year = #{qnYear}
</if>
</select>
<insert
id=
"insertQuestions"
parameterType=
"com.tiptimes.model.Questions"
>
INSERT INTO t_questions(questionnaire_uuid,
question,status,
create_time)
VALUES
(#{questionnaireUuid},#{question},#{status},
#{createTime})
<insert
id=
"insertQuestions"
parameterType=
"com.tiptimes.model.Questions"
>
INSERT INTO t_questions(questionnaire_uuid,
question, status,
create_time)
VALUES
(#{questionnaireUuid}, #{question}, #{status},
#{createTime})
</insert>
<!--根据年份查询问题集合-->
<select
id=
"queryQuestionsList"
parameterType=
"Integer"
resultType=
"com.tiptimes.model.Questions"
>
SELECT tq.id,tq.questionnaire_uuid AS questionnaireUuid,tq.question FROM t_questions tq
LEFT JOIN t_questionnaire qn ON qn.id = tq.questionnaire_uuid
WHERE
<if
test=
"qnYear != null and qnYear != ''"
>
qn.qn_year = #{qnYear}
</if>
WHERE
<if
test=
"qnYear != null and qnYear != ''"
>
qn.qn_year = #{qnYear}
</if>
</select>
<insert
id=
"insertOptions"
parameterType=
"com.tiptimes.model.Options"
>
INSERT INTO t_options(question_id,
option_value,
status)
VALUES
(#{questionId},#{optionValue},
#{status})
<insert
id=
"insertOptions"
parameterType=
"com.tiptimes.model.Options"
>
INSERT INTO t_options(question_id,
option_value,
status)
VALUES
(#{questionId}, #{optionValue},
#{status})
</insert>
<!--查询商报记录相关数据,用于生成每年的数据使用-->
<select
id=
"queryRecordList"
resultType=
"com.tiptimes.model.Record"
>
SELECT
create_by AS createBy,
SELECT create_by AS createBy,
write_people AS writePeople,
phone_number AS phoneNumber,
create_id AS createId,
process_status AS processStatus
FROM
t_record
FROM t_record
WHERE questionnaire_uuid = 1
</select>
<!--查询商报记录相关数据,用于生成每年的数据使用-->
<select
id=
"queryQuestionnaireList"
parameterType=
"Integer"
resultType=
"com.tiptimes.model.Questionnaire"
>
select id,questionnaire_name as questionnaireName,qn_year as qnYear from t_questionnaire
where
<if
test=
"qnYear != null and qnYear != ''"
>
qn_year = #{qnYear}
</if>
where
<if
test=
"qnYear != null and qnYear != ''"
>
qn_year = #{qnYear}
</if>
</select>
<insert
id=
"insertRecord"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
INSERT INTO t_record(questionnaire_uuid,
questionnaire_name,process_status,phone_number,
create_time,
create_by,
create_id,write_people,
qn_year)
VALUES
(#{questionnaireUuid},#{questionnaireName},#{processStatus},#{phoneNumber},
#{createTime},
#{createBy},#{createId},#{writePeople},
#{qnYear})
INSERT INTO t_record(questionnaire_uuid,
questionnaire_name, process_status, phone_number,
create_time,
create_by,
create_id, write_people,
qn_year)
VALUES
(#{questionnaireUuid}, #{questionnaireName}, #{processStatus}, #{phoneNumber},
#{createTime},
#{createBy}, #{createId}, #{writePeople},
#{qnYear})
</insert>
<insert
id=
"insertAnswer"
parameterType=
"com.tiptimes.model.Answer"
>
...
...
@@ -82,34 +83,43 @@
</update>
<delete
id=
"delAnswer"
>
DELETE FROM t_answer WHERE record_id=#{recordId}
DELETE
FROM t_answer
WHERE record_id = #{recordId}
</delete>
<delete
id=
"delView"
>
DELETE FROM t_review WHERE record_id=#{recordId} and questions_id =#{questionsId}
DELETE
FROM t_review
WHERE record_id = #{recordId}
and questions_id = #{questionsId}
</delete>
<select
id=
"selectRecordId"
resultType=
"java.lang.Long"
>
SELECT id FROM t_record WHERE questionnaire_uuid=#{questionnaireUuid} AND create_id = #{createId}
SELECT id
FROM t_record
WHERE questionnaire_uuid = #{questionnaireUuid}
AND create_id = #{createId}
</select>
<select
id=
"selectAnswerByRecordId"
resultType=
"com.tiptimes.model.Answer"
>
SELECT options_id AS 'optionsId',`value`,`group` FROM t_answer WHERE record_id =#{recordId}
SELECT options_id AS 'optionsId',`value`, `group`
FROM t_answer
WHERE record_id = #{recordId}
</select>
<select
id=
"selectReviewByRecordId"
resultType=
"com.tiptimes.model.Review"
>
SELECT
questions_id AS 'questionsId',
`remark`,score,approval_status as approvalStatus
FROM
t_review
WHERE
record_id =#{recordId}
SELECT questions_id AS 'questionsId', `remark`
, score
, approval_status as approvalStatus
FROM t_review
WHERE record_id = #{recordId}
</select>
<select
id=
"selectById"
resultType=
"com.tiptimes.model.Record"
>
SELECT process_status AS 'processStatus',reason,create_by AS 'createBy',phone_number AS 'phoneNumber'
FROM t_record WHERE id=#{recordId}
SELECT process_status AS 'processStatus',reason, create_by AS 'createBy',phone_number AS 'phoneNumber'
FROM t_record
WHERE id = #{recordId}
</select>
<select
id=
"selectRecordList"
resultType=
"com.tiptimes.model.Record"
>
...
...
@@ -127,7 +137,10 @@
</select>
<select
id=
"selectFileId"
resultType=
"java.lang.String"
>
select `value` from t_answer where options_id=#{optionId} and record_id =#{recordId}
select `value`
from t_answer
where options_id = #{optionId}
and record_id = #{recordId}
</select>
<!--绩效汇总列表查询-->
...
...
@@ -135,16 +148,19 @@
SELECT
DISTINCT t_record.id as id,
t_answer.`value` as optinName,
CASE WHEN t_record.process_status = 2 THEN '0' WHEN t_record.process_status = 3 THEN '30' ELSE '0' END as basicIndicators,
CASE WHEN t_record.process_status = 2 THEN '0' WHEN t_record.process_status = 3 THEN '30' ELSE '0' END as
basicIndicators,
(
SELECT
CASE WHEN SUM(t_review.score) > 50 THEN 50 WHEN SUM(t_review.score) THEN SUM(t_review.score) ELSE '0' END as score
CASE WHEN SUM(t_review.score) > 50 THEN 50 WHEN SUM(t_review.score) THEN SUM(t_review.score) ELSE '0' END as
score
FROM t_review
WHERE t_review.questions_id IN(22,21,20,19,18,17,16,15,14,13,12,11,10) AND record_id=t_record.id
) as guideIndicators,
(
SELECT
CASE WHEN SUM(t_review.score) > 10 THEN 10 WHEN SUM(t_review.score) THEN SUM(t_review.score) ELSE '0' END as score
CASE WHEN SUM(t_review.score) > 10 THEN 10 WHEN SUM(t_review.score) THEN SUM(t_review.score) ELSE '0' END as
score
FROM t_review
WHERE t_review.questions_id IN(27,26,25,24,23) AND record_id=t_record.id
) as rewardIndicators
...
...
@@ -164,102 +180,169 @@
<!--绩效汇总导出-->
<select
id=
"queryGuideAndRewardIndexList"
resultType=
"com.tiptimes.model.exportDTO.PerformanceSummaryTotal"
>
SELECT
DISTINCT t_record.id as id,
SELECT DISTINCT t_record.id as id,
t_record.create_by as spaceName,
(CASE WHEN (SELECT t_review.approval_status FROM t_review WHERE t_review.questions_id=1 AND t_review.record_id=t_record.id)=0
(CASE
WHEN (SELECT t_review.approval_status
FROM t_review
WHERE t_review.questions_id = 1 AND t_review.record_id = t_record.id) = 0
THEN '驳回'
ELSE '通过'
END
)AS basisIndexOne,
(CASE WHEN (SELECT t_review.approval_status FROM t_review WHERE t_review.questions_id=2 AND t_review.record_id=t_record.id)=0
) AS basisIndexOne,
(CASE
WHEN (SELECT t_review.approval_status
FROM t_review
WHERE t_review.questions_id = 2 AND t_review.record_id = t_record.id) = 0
THEN '驳回'
ELSE '通过'
END
)AS basisIndexTwo,
(CASE WHEN (SELECT t_review.approval_status FROM t_review WHERE t_review.questions_id=3 AND t_review.record_id=t_record.id)=0
) AS basisIndexTwo,
(CASE
WHEN (SELECT t_review.approval_status
FROM t_review
WHERE t_review.questions_id = 3 AND t_review.record_id = t_record.id) = 0
THEN '驳回'
ELSE '通过'
END
)AS basisIndexThree,
(CASE WHEN (SELECT t_review.approval_status FROM t_review WHERE t_review.questions_id=4 AND t_review.record_id=t_record.id)=0
) AS basisIndexThree,
(CASE
WHEN (SELECT t_review.approval_status
FROM t_review
WHERE t_review.questions_id = 4 AND t_review.record_id = t_record.id) = 0
THEN '驳回'
ELSE '通过'
END
)AS basisIndexFour,
(CASE WHEN (SELECT t_review.approval_status FROM t_review WHERE t_review.questions_id=5 AND t_review.record_id=t_record.id)=0
) AS basisIndexFour,
(CASE
WHEN (SELECT t_review.approval_status
FROM t_review
WHERE t_review.questions_id = 5 AND t_review.record_id = t_record.id) = 0
THEN '驳回'
ELSE '通过'
END
)AS basisIndexFive,
(CASE WHEN (SELECT t_review.approval_status FROM t_review WHERE t_review.questions_id=6 AND t_review.record_id=t_record.id)=0
) AS basisIndexFive,
(CASE
WHEN (SELECT t_review.approval_status
FROM t_review
WHERE t_review.questions_id = 6 AND t_review.record_id = t_record.id) = 0
THEN '驳回'
ELSE '通过'
END
)AS basisIndexSix,
(CASE WHEN (SELECT t_review.approval_status FROM t_review WHERE t_review.questions_id=7 AND t_review.record_id=t_record.id)=0
) AS basisIndexSix,
(CASE
WHEN (SELECT t_review.approval_status
FROM t_review
WHERE t_review.questions_id = 7 AND t_review.record_id = t_record.id) = 0
THEN '驳回'
ELSE '通过'
END
)AS basisIndexSeven,
(CASE WHEN (SELECT t_review.approval_status FROM t_review WHERE t_review.questions_id=8 AND t_review.record_id=t_record.id)=0
) AS basisIndexSeven,
(CASE
WHEN (SELECT t_review.approval_status
FROM t_review
WHERE t_review.questions_id = 8 AND t_review.record_id = t_record.id) = 0
THEN '驳回'
ELSE '通过'
END
)AS basisIndexEight,
(CASE WHEN (SELECT t_review.approval_status FROM t_review WHERE t_review.questions_id=9 AND t_review.record_id=t_record.id)=0
) AS basisIndexEight,
(CASE
WHEN (SELECT t_review.approval_status
FROM t_review
WHERE t_review.questions_id = 9 AND t_review.record_id = t_record.id) = 0
THEN '驳回'
ELSE '通过'
END
)AS basisIndexNine,
(CASE WHEN t_record.process_status=2 THEN 0
WHEN t_record.process_status=3 THEN 30
) AS basisIndexNine,
(CASE
WHEN t_record.process_status = 2 THEN 0
WHEN t_record.process_status = 3 THEN 30
END
) AS basisIndexScore,
(SELECT t_review.score FROM t_review WHERE t_review.questions_id=10 AND t_review.record_id=t_record.id)AS guideIndexOne,
(SELECT t_review.score FROM t_review WHERE t_review.questions_id=11 AND t_review.record_id=t_record.id) AS guideIndexTwo,
(SELECT t_review.score FROM t_review WHERE t_review.questions_id=12 AND t_review.record_id=t_record.id) AS guideIndexThree,
(SELECT t_review.score FROM t_review WHERE t_review.questions_id=13 AND t_review.record_id=t_record.id) AS guideIndexFour,
(SELECT t_review.score FROM t_review WHERE t_review.questions_id=14 AND t_review.record_id=t_record.id) AS guideIndexFive,
(SELECT t_review.score FROM t_review WHERE t_review.questions_id=15 AND t_review.record_id=t_record.id) AS guideIndexSix,
(SELECT t_review.score FROM t_review WHERE t_review.questions_id=16 AND t_review.record_id=t_record.id) AS guideIndexSeven,
(SELECT t_review.score FROM t_review WHERE t_review.questions_id=17 AND t_review.record_id=t_record.id) AS guideIndexEight,
(SELECT t_review.score FROM t_review WHERE t_review.questions_id=18 AND t_review.record_id=t_record.id) AS guideIndexNine,
(SELECT t_review.score FROM t_review WHERE t_review.questions_id=19 AND t_review.record_id=t_record.id) AS guideIndexTen,
(SELECT t_review.score FROM t_review WHERE t_review.questions_id=20 AND t_review.record_id=t_record.id) AS guideIndexEleven,
(SELECT t_review.score FROM t_review WHERE t_review.questions_id=21 AND t_review.record_id=t_record.id) AS guideIndexTwelve,
(SELECT t_review.score FROM t_review WHERE t_review.questions_id=22 AND t_review.record_id=t_record.id) AS guideIndexThirteen,
(SELECT t_review.score FROM t_review WHERE t_review.questions_id=23 AND t_review.record_id=t_record.id) AS rewardIndexOne,
(SELECT t_review.score FROM t_review WHERE t_review.questions_id=24 AND t_review.record_id=t_record.id) AS rewardIndexTwo,
(SELECT t_review.score FROM t_review WHERE t_review.questions_id=25 AND t_review.record_id=t_record.id) AS rewardIndexThree,
(SELECT t_review.score FROM t_review WHERE t_review.questions_id=26 AND t_review.record_id=t_record.id) AS rewardIndexFour,
(SELECT t_review.score FROM t_review WHERE t_review.questions_id=27 AND t_review.record_id=t_record.id) AS rewardIndexFive
(SELECT t_review.score
FROM t_review
WHERE t_review.questions_id = 10 AND t_review.record_id = t_record.id) AS guideIndexOne,
(SELECT t_review.score
FROM t_review
WHERE t_review.questions_id = 11 AND t_review.record_id = t_record.id) AS guideIndexTwo,
(SELECT t_review.score
FROM t_review
WHERE t_review.questions_id = 12 AND t_review.record_id = t_record.id) AS guideIndexThree,
(SELECT t_review.score
FROM t_review
WHERE t_review.questions_id = 13 AND t_review.record_id = t_record.id) AS guideIndexFour,
(SELECT t_review.score
FROM t_review
WHERE t_review.questions_id = 14 AND t_review.record_id = t_record.id) AS guideIndexFive,
(SELECT t_review.score
FROM t_review
WHERE t_review.questions_id = 15 AND t_review.record_id = t_record.id) AS guideIndexSix,
(SELECT t_review.score
FROM t_review
WHERE t_review.questions_id = 16 AND t_review.record_id = t_record.id) AS guideIndexSeven,
(SELECT t_review.score
FROM t_review
WHERE t_review.questions_id = 17 AND t_review.record_id = t_record.id) AS guideIndexEight,
(SELECT t_review.score
FROM t_review
WHERE t_review.questions_id = 18 AND t_review.record_id = t_record.id) AS guideIndexNine,
(SELECT t_review.score
FROM t_review
WHERE t_review.questions_id = 19 AND t_review.record_id = t_record.id) AS guideIndexTen,
(SELECT t_review.score
FROM t_review
WHERE t_review.questions_id = 20 AND t_review.record_id = t_record.id) AS guideIndexEleven,
(SELECT t_review.score
FROM t_review
WHERE t_review.questions_id = 21 AND t_review.record_id = t_record.id) AS guideIndexTwelve,
(SELECT t_review.score
FROM t_review
WHERE t_review.questions_id = 22 AND t_review.record_id = t_record.id) AS guideIndexThirteen,
(SELECT t_review.score
FROM t_review
WHERE t_review.questions_id = 23 AND t_review.record_id = t_record.id) AS rewardIndexOne,
(SELECT t_review.score
FROM t_review
WHERE t_review.questions_id = 24 AND t_review.record_id = t_record.id) AS rewardIndexTwo,
(SELECT t_review.score
FROM t_review
WHERE t_review.questions_id = 25 AND t_review.record_id = t_record.id) AS rewardIndexThree,
(SELECT t_review.score
FROM t_review
WHERE t_review.questions_id = 26 AND t_review.record_id = t_record.id) AS rewardIndexFour,
(SELECT t_review.score
FROM t_review
WHERE t_review.questions_id = 27 AND t_review.record_id = t_record.id) AS rewardIndexFive
FROM t_record
RIGHT JOIN t_review ON t_record.id = t_review.record_id
WHERE t_record.process_status=2 OR process_status=3
WHERE t_record.process_status = 2
OR process_status = 3
</select>
<!--2022年10月新增加功能问卷管理-审批页面根据基础指标、引导指标和奖励指标导出所有空间的数据-->
<!-- 问卷管理-导出基础指标1 众创空间场地情况、是否租赁场地-->
<select
id=
"selectSiteConditionList"
resultType=
"com.tiptimes.model.exportDTO.SiteCondition"
>
SELECT *
FROM
(
SELECT
t_answer.`group`,t_record.create_by
as spaceName,
MAX(IF(options_id = 5,`value`,
NULL)) as area,
MAX(IF(options_id = 6,`value`,
NULL)) as locationNumber,
MAX(IF(options_id = 7,`value`,
NULL)) as leasePremises
SELECT *
FROM
(
SELECT t_answer.`group`,
t_record.create_by
as spaceName,
MAX(IF(options_id = 5, `value`,
NULL)) as area,
MAX(IF(options_id = 6, `value`,
NULL)) as locationNumber,
MAX(IF(options_id = 7, `value`,
NULL)) as leasePremises
FROM t_answer
LEFT JOIN t_record ON t_record.id = t_answer.record_id where t_record.process_status=3
GROUP BY t_answer.`group`,t_record.create_by
LEFT JOIN t_record ON t_record.id = t_answer.record_id
where t_record.process_status = 3
GROUP BY t_answer.`group`, t_record.create_by
) as queation
WHERE queation.area IS NOT NULL ORDER BY spaceName
WHERE queation.area IS NOT NULL
ORDER BY spaceName
</select>
<!-- 问卷管理-基础指标2 众创空间配备专职工作人员情况-->
<select
id=
"selectFullTimeWorkPersonList"
parameterType=
"string"
resultType=
"com.tiptimes.model.exportDTO.FullTimeWorkPerson"
>
<select
id=
"selectFullTimeWorkPersonList"
parameterType=
"string"
resultType=
"com.tiptimes.model.exportDTO.FullTimeWorkPerson"
>
SELECT * FROM
(
SELECT
...
...
@@ -283,74 +366,80 @@
<!-- 问卷管理-基础指标3 入孵企业情况-->
<select
id=
"selectIncubatedEnterprisesList"
resultType=
"com.tiptimes.model.exportDTO.IncubatedEnterprises"
>
SELECT *
FROM
(
SELECT
t_answer.`group`,t_record.create_by
as spaceName,
MAX(IF(options_id = 16,`value`,
NULL)) as enterpriseName,
MAX(IF(options_id = 17,`value`,
NULL)) as isSubmitScreenshot,
MAX(IF(options_id = 18,`value`,
NULL)) as isSubmitCertificate,
MAX(IF(options_id = 19,`value`,
NULL)) as isSubmitIncubation,
MAX(IF(options_id = 20,`value`,
NULL)) as isEntryYear
SELECT *
FROM
(
SELECT t_answer.`group`,
t_record.create_by
as spaceName,
MAX(IF(options_id = 16, `value`,
NULL)) as enterpriseName,
MAX(IF(options_id = 17, `value`,
NULL)) as isSubmitScreenshot,
MAX(IF(options_id = 18, `value`,
NULL)) as isSubmitCertificate,
MAX(IF(options_id = 19, `value`,
NULL)) as isSubmitIncubation,
MAX(IF(options_id = 20, `value`,
NULL)) as isEntryYear
FROM t_answer
LEFT JOIN t_record ON t_record.id = t_answer.record_id where t_record.process_status=3
GROUP BY t_answer.`group`,t_record.create_by
LEFT JOIN t_record ON t_record.id = t_answer.record_id
where t_record.process_status = 3
GROUP BY t_answer.`group`, t_record.create_by
) as queation
WHERE queation.enterpriseName IS NOT NULL ORDER BY spaceName
WHERE queation.enterpriseName IS NOT NULL
ORDER BY spaceName
</select>
<!-- 问卷管理-基础指标4 新增就业情况-->
<select
id=
"selectEmploymentSituationList"
resultType=
"com.tiptimes.model.exportDTO.EmploymentSituation"
>
SELECT *
FROM
(
SELECT
t_answer.`group`,t_record.create_by
as spaceName,
MAX(IF(options_id = 21,`value`,
NULL)) as enterpriseName,
MAX(IF(options_id = 22,`value`,
NULL)) as employName,
MAX(IF(options_id = 23,`value`,
NULL)) as isAgreementMaterials,
MAX(IF(options_id = 24,`value`,
NULL)) as isAssessmentPeriod
SELECT *
FROM
(
SELECT t_answer.`group`,
t_record.create_by
as spaceName,
MAX(IF(options_id = 21, `value`,
NULL)) as enterpriseName,
MAX(IF(options_id = 22, `value`,
NULL)) as employName,
MAX(IF(options_id = 23, `value`,
NULL)) as isAgreementMaterials,
MAX(IF(options_id = 24, `value`,
NULL)) as isAssessmentPeriod
FROM t_answer
LEFT JOIN t_record ON t_record.id = t_answer.record_id where t_record.process_status=3
GROUP BY t_answer.`group`,t_record.create_by
LEFT JOIN t_record ON t_record.id = t_answer.record_id
where t_record.process_status = 3
GROUP BY t_answer.`group`, t_record.create_by
) as queation
WHERE queation.enterpriseName IS NOT NULL ORDER BY spaceName
WHERE queation.enterpriseName IS NOT NULL
ORDER BY spaceName
</select>
<!-- 问卷管理-基础指标5 开设创新创业课程情况-->
<select
id=
"selectEntrepreneurshipCoursesList"
resultType=
"com.tiptimes.model.exportDTO.EntrepreneurshipCourses"
>
SELECT *
FROM
(
SELECT
t_answer.`group`,t_record.create_by
as spaceName,
MAX(IF(options_id = 25,`value`,
NULL)) as courseName,
MAX(IF(options_id = 26,`value`,
NULL)) as teacher,
MAX(IF(options_id = 27,`value`,
NULL)) as school,
MAX(IF(options_id = 28,`value`,
NULL)) as credits,
MAX(IF(options_id = 29,`value`,
NULL)) as isScreenshotOrExport,
MAX(IF(options_id = 30,`value`,
NULL)) as isSystem,
MAX(IF(options_id = 31,`value`,
NULL)) as islectureCourseware,
MAX(IF(options_id = 32,`value`,
NULL)) as isPresentation,
MAX(IF(options_id = 33,`value`,
NULL)) as isNetworkConnection,
MAX(IF(options_id = 34,`value`,
NULL)) as alliance
SELECT *
FROM
(
SELECT t_answer.`group`,
t_record.create_by
as spaceName,
MAX(IF(options_id = 25, `value`,
NULL)) as courseName,
MAX(IF(options_id = 26, `value`,
NULL)) as teacher,
MAX(IF(options_id = 27, `value`,
NULL)) as school,
MAX(IF(options_id = 28, `value`,
NULL)) as credits,
MAX(IF(options_id = 29, `value`,
NULL)) as isScreenshotOrExport,
MAX(IF(options_id = 30, `value`,
NULL)) as isSystem,
MAX(IF(options_id = 31, `value`,
NULL)) as islectureCourseware,
MAX(IF(options_id = 32, `value`,
NULL)) as isPresentation,
MAX(IF(options_id = 33, `value`,
NULL)) as isNetworkConnection,
MAX(IF(options_id = 34, `value`,
NULL)) as alliance
FROM t_answer
LEFT JOIN t_record ON t_record.id = t_answer.record_id where t_record.process_status=3
GROUP BY t_answer.`group`,t_record.create_by
LEFT JOIN t_record ON t_record.id = t_answer.record_id
where t_record.process_status = 3
GROUP BY t_answer.`group`, t_record.create_by
) as queation
WHERE queation.courseName IS NOT NULL ORDER BY spaceName
WHERE queation.courseName IS NOT NULL
ORDER BY spaceName
</select>
<!-- 问卷管理-基础指标6 签约创业导师情况-->
<select
id=
"selectSigningMentorsList"
resultType=
"com.tiptimes.model.exportDTO.SigningMentors"
>
SELECT *
FROM
(
SELECT
t_answer.`group`,t_record.create_by
as spaceName,
MAX(IF(options_id = 35,`value`,
NULL)) as mentorName,
MAX(IF(options_id = 36,`value`,
NULL)) as gender,
MAX(IF(options_id = 37,`value`,NULL)) as record
,
MAX(IF(options_id = 38,`value`,
NULL)) as phoneNumber,
MAX(IF(options_id = 39,`value`,
NULL)) as unit,
MAX(IF(options_id = 40,`value`,
NULL)) as position,
SELECT *
FROM
(
SELECT t_answer.`group`,
t_record.create_by
as spaceName,
MAX(IF(options_id = 35, `value`,
NULL)) as mentorName,
MAX(IF(options_id = 36, `value`,
NULL)) as gender,
MAX(IF(options_id = 37, `value`, NULL)) as record
,
MAX(IF(options_id = 38, `value`,
NULL)) as phoneNumber,
MAX(IF(options_id = 39, `value`,
NULL)) as unit,
MAX(IF(options_id = 40, `value`,
NULL)) as position,
MAX(IF(options_id = 41,`value`,NULL)) as theTitle,
MAX(IF(options_id = 42,`value`,NULL)) as signingDate,
MAX(IF(options_id = 43,`value`,NULL)) as contractTime,
...
...
@@ -363,231 +452,263 @@
MAX(IF(options_id = 50,`value`,NULL)) as mentor,
MAX(IF(options_id = 51,`value`,NULL)) as isSupporting
FROM t_answer
LEFT JOIN t_record ON t_record.id = t_answer.record_id where t_record.process_status=3
GROUP BY t_answer.`group`,t_record.create_by
LEFT JOIN t_record
ON t_record.id = t_answer.record_id
where t_record.process_status=3
GROUP BY t_answer.`group`, t_record.create_by
) as queation
WHERE queation.mentorName IS NOT NULL ORDER BY spaceName
WHERE queation.mentorName IS NOT NULL
ORDER BY spaceName
</select>
<!-- 问卷管理-基础指标7 组织双创活动情况-->
<select
id=
"selectOrganizationActivityList"
resultType=
"com.tiptimes.model.exportDTO.OrganizationActivity"
>
SELECT *
FROM
(
SELECT
t_answer.`group`,t_record.create_by
as spaceName,
MAX(IF(options_id = 52,`value`,
NULL)) as activityTime,
MAX(IF(options_id = 53,`value`,
NULL)) as theme,
MAX(IF(options_id = 54,`value`,
NULL)) as activityType,
MAX(IF(options_id = 55,`value`,
NULL)) as platformNews,
MAX(IF(options_id = 56,`value`,
NULL)) as platformNewsPhoto
SELECT *
FROM
(
SELECT t_answer.`group`,
t_record.create_by
as spaceName,
MAX(IF(options_id = 52, `value`,
NULL)) as activityTime,
MAX(IF(options_id = 53, `value`,
NULL)) as theme,
MAX(IF(options_id = 54, `value`,
NULL)) as activityType,
MAX(IF(options_id = 55, `value`,
NULL)) as platformNews,
MAX(IF(options_id = 56, `value`,
NULL)) as platformNewsPhoto
FROM t_answer
LEFT JOIN t_record ON t_record.id = t_answer.record_id where t_record.process_status=3
GROUP BY t_answer.`group`,t_record.create_by
LEFT JOIN t_record ON t_record.id = t_answer.record_id
where t_record.process_status = 3
GROUP BY t_answer.`group`, t_record.create_by
) as queation
WHERE queation.activityTime IS NOT NULL ORDER BY spaceName
WHERE queation.activityTime IS NOT NULL
ORDER BY spaceName
</select>
<!-- 问卷管理-基础指标8 参赛情况-->
<select
id=
"selectCompetingSituationList"
resultType=
"com.tiptimes.model.exportDTO.CompetingSituation"
>
SELECT *
FROM
(
SELECT
t_answer.`group`,t_record.create_by
as spaceName,
MAX(IF(options_id = 57,`value`,
NULL)) as eventName,
MAX(IF(options_id = 58,`value`,
NULL)) as organizer,
MAX(IF(options_id = 59,`value`,
NULL)) as projectName
SELECT *
FROM
(
SELECT t_answer.`group`,
t_record.create_by
as spaceName,
MAX(IF(options_id = 57, `value`,
NULL)) as eventName,
MAX(IF(options_id = 58, `value`,
NULL)) as organizer,
MAX(IF(options_id = 59, `value`,
NULL)) as projectName
FROM t_answer
LEFT JOIN t_record ON t_record.id = t_answer.record_id where t_record.process_status=3
GROUP BY t_answer.`group`,t_record.create_by
LEFT JOIN t_record ON t_record.id = t_answer.record_id
where t_record.process_status = 3
GROUP BY t_answer.`group`, t_record.create_by
) as queation
WHERE queation.eventName IS NOT NULL ORDER BY spaceName
WHERE queation.eventName IS NOT NULL
ORDER BY spaceName
</select>
<!-- 问卷管理-基础指标9 2021年创新创业工作经费(万元)-->
<select
id=
"selectEntrepreneurshipFundingList"
resultType=
"com.tiptimes.model.exportDTO.EntrepreneurshipFunding"
>
SELECT *
FROM
(
SELECT
t_answer.`group`,t_record.create_by
as spaceName,
MAX(IF(options_id = 60,`value`,
NULL)) as funding
SELECT *
FROM
(
SELECT t_answer.`group`,
t_record.create_by
as spaceName,
MAX(IF(options_id = 60, `value`,
NULL)) as funding
FROM t_answer
LEFT JOIN t_record ON t_record.id = t_answer.record_id where t_record.process_status=3
GROUP BY t_answer.`group`,t_record.create_by
LEFT JOIN t_record ON t_record.id = t_answer.record_id
where t_record.process_status = 3
GROUP BY t_answer.`group`, t_record.create_by
) as queation
WHERE queation.funding IS NOT NULL ORDER BY spaceName;
WHERE queation.funding IS NOT NULL
ORDER BY spaceName;
</select>
<!-- 问卷管理-引导指标6 申报成功高校众创空间联盟发布的创新创业研究课题信息-->
<select
id=
"selectEntrepreneurshipProjectList"
resultType=
"com.tiptimes.model.exportDTO.EntrepreneurshipProject"
>
SELECT *
FROM
(
SELECT
t_answer.`group`,t_record.create_by
as spaceName,
MAX(IF(options_id = 62,`value`,
NULL)) as issueNumber,
MAX(IF(options_id = 63,`value`,
NULL)) as projectName,
MAX(IF(options_id = 64,`value`,
NULL)) as projectLeaderName
SELECT *
FROM
(
SELECT t_answer.`group`,
t_record.create_by
as spaceName,
MAX(IF(options_id = 62, `value`,
NULL)) as issueNumber,
MAX(IF(options_id = 63, `value`,
NULL)) as projectName,
MAX(IF(options_id = 64, `value`,
NULL)) as projectLeaderName
FROM t_answer
LEFT JOIN t_record ON t_record.id = t_answer.record_id where t_record.process_status=3
GROUP BY t_answer.`group`,t_record.create_by
LEFT JOIN t_record ON t_record.id = t_answer.record_id
where t_record.process_status = 3
GROUP BY t_answer.`group`, t_record.create_by
) as queation
WHERE queation.issueNumber IS NOT NULL ORDER BY spaceName;
WHERE queation.issueNumber IS NOT NULL
ORDER BY spaceName;
</select>
<!-- 问卷管理-引导指标9 在孵企业销售收入或累计合同额情况 -->
<select
id=
"selecEnterprisestAmountList"
resultType=
"com.tiptimes.model.exportDTO.EnterprisestAmount"
>
SELECT *
FROM
(
SELECT
t_answer.`group`,t_record.create_by
as spaceName,
MAX(IF(options_id = 65,`value`,
NULL)) as enterpriseName,
MAX(IF(options_id = 66,`value`,
NULL)) as contractAmount,
MAX(IF(options_id = 67,`value`,
NULL)) as isSupportingMaterials
SELECT *
FROM
(
SELECT t_answer.`group`,
t_record.create_by
as spaceName,
MAX(IF(options_id = 65, `value`,
NULL)) as enterpriseName,
MAX(IF(options_id = 66, `value`,
NULL)) as contractAmount,
MAX(IF(options_id = 67, `value`,
NULL)) as isSupportingMaterials
FROM t_answer
LEFT JOIN t_record ON t_record.id = t_answer.record_id where t_record.process_status=3
GROUP BY t_answer.`group`,t_record.create_by
LEFT JOIN t_record ON t_record.id = t_answer.record_id
where t_record.process_status = 3
GROUP BY t_answer.`group`, t_record.create_by
) as queation
WHERE queation.enterpriseName IS NOT NULL ORDER BY spaceName;
WHERE queation.enterpriseName IS NOT NULL
ORDER BY spaceName;
</select>
<!-- 问卷管理-引导指标10 本评估周期实现股权或债权融资情况(含股东增资或股东借款) -->
<select
id=
"selectEvaluationBorrowingList"
resultType=
"com.tiptimes.model.exportDTO.EvaluationBorrowing"
>
SELECT *
FROM
(
SELECT
t_answer.`group`,t_record.create_by
as spaceName,
MAX(IF(options_id = 68,`value`,
NULL)) as financingEnterpriseName,
MAX(IF(options_id = 69,`value`,
NULL)) as financingAmount,
MAX(IF(options_id = 70,`value`,
NULL)) as financingWay,
MAX(IF(options_id = 71,`value`,
NULL)) as isSupportingMaterials
SELECT *
FROM
(
SELECT t_answer.`group`,
t_record.create_by
as spaceName,
MAX(IF(options_id = 68, `value`,
NULL)) as financingEnterpriseName,
MAX(IF(options_id = 69, `value`,
NULL)) as financingAmount,
MAX(IF(options_id = 70, `value`,
NULL)) as financingWay,
MAX(IF(options_id = 71, `value`,
NULL)) as isSupportingMaterials
FROM t_answer
LEFT JOIN t_record ON t_record.id = t_answer.record_id where t_record.process_status=3
GROUP BY t_answer.`group`,t_record.create_by
LEFT JOIN t_record ON t_record.id = t_answer.record_id
where t_record.process_status = 3
GROUP BY t_answer.`group`, t_record.create_by
) as queation
WHERE queation.financingEnterpriseName IS NOT NULL ORDER BY spaceName;
WHERE queation.financingEnterpriseName IS NOT NULL
ORDER BY spaceName;
</select>
<!-- 问卷管理-引导指标11 主办或承办市级及以上级别路演、双创周活动 -->
<select
id=
"selectInnovationWeekList"
resultType=
"com.tiptimes.model.exportDTO.InnovationWeek"
>
SELECT *
FROM
(
SELECT
t_answer.`group`,t_record.create_by
as spaceName,
MAX(IF(options_id = 72,`value`,
NULL)) as activitiesName,
MAX(IF(options_id = 73,`value`,
NULL)) as activitiesFrom,
MAX(IF(options_id = 74,`value`,
NULL)) as municipalLevel
SELECT *
FROM
(
SELECT t_answer.`group`,
t_record.create_by
as spaceName,
MAX(IF(options_id = 72, `value`,
NULL)) as activitiesName,
MAX(IF(options_id = 73, `value`,
NULL)) as activitiesFrom,
MAX(IF(options_id = 74, `value`,
NULL)) as municipalLevel
FROM t_answer
LEFT JOIN t_record ON t_record.id = t_answer.record_id where t_record.process_status=3
GROUP BY t_answer.`group`,t_record.create_by
LEFT JOIN t_record ON t_record.id = t_answer.record_id
where t_record.process_status = 3
GROUP BY t_answer.`group`, t_record.create_by
) as queation
WHERE queation.activitiesName IS NOT NULL ORDER BY spaceName;
WHERE queation.activitiesName IS NOT NULL
ORDER BY spaceName;
</select>
<!-- 问卷管理-引导指标12 在孵企业在OTC高校板挂牌情况 -->
<select
id=
"selectCollegeSituationList"
resultType=
"com.tiptimes.model.exportDTO.CollegeSituation"
>
SELECT *
FROM
(
SELECT
t_answer.`group`,t_record.create_by
as spaceName,
MAX(IF(options_id = 75,`value`,
NULL)) as activitiesName,
MAX(IF(options_id = 76,`value`,
NULL)) as activitiesFrom
SELECT *
FROM
(
SELECT t_answer.`group`,
t_record.create_by
as spaceName,
MAX(IF(options_id = 75, `value`,
NULL)) as activitiesName,
MAX(IF(options_id = 76, `value`,
NULL)) as activitiesFrom
FROM t_answer
LEFT JOIN t_record ON t_record.id = t_answer.record_id where t_record.process_status=3
GROUP BY t_answer.`group`,t_record.create_by
LEFT JOIN t_record ON t_record.id = t_answer.record_id
where t_record.process_status = 3
GROUP BY t_answer.`group`, t_record.create_by
) as queation
WHERE queation.activitiesName IS NOT NULL ORDER BY spaceName;
WHERE queation.activitiesName IS NOT NULL
ORDER BY spaceName;
</select>
<!-- 问卷管理-引导指标13 在孵企业新增知识产权(包括专利、软著等) -->
<select
id=
"selectEnterprisesIntellectualList"
resultType=
"com.tiptimes.model.exportDTO.EnterprisesIntellectual"
>
SELECT *
FROM
(
SELECT
t_answer.`group`,t_record.create_by
as spaceName,
MAX(IF(options_id = 77,`value`,
NULL)) as enterpriseName,
MAX(IF(options_id = 78,`value`,
NULL)) as forTime,
MAX(IF(options_id = 79,`value`,
NULL)) as acquiredType,
MAX(IF(options_id = 80,`value`,
NULL)) as serialNumber,
MAX(IF(options_id = 81,`value`,
NULL)) as supportingMaterials
SELECT *
FROM
(
SELECT t_answer.`group`,
t_record.create_by
as spaceName,
MAX(IF(options_id = 77, `value`,
NULL)) as enterpriseName,
MAX(IF(options_id = 78, `value`,
NULL)) as forTime,
MAX(IF(options_id = 79, `value`,
NULL)) as acquiredType,
MAX(IF(options_id = 80, `value`,
NULL)) as serialNumber,
MAX(IF(options_id = 81, `value`,
NULL)) as supportingMaterials
FROM t_answer
LEFT JOIN t_record ON t_record.id = t_answer.record_id where t_record.process_status=3
GROUP BY t_answer.`group`,t_record.create_by
LEFT JOIN t_record ON t_record.id = t_answer.record_id
where t_record.process_status = 3
GROUP BY t_answer.`group`, t_record.create_by
) as queation
WHERE queation.enterpriseName IS NOT NULL ORDER BY spaceName;
WHERE queation.enterpriseName IS NOT NULL
ORDER BY spaceName;
</select>
<!-- 问卷管理-奖励指标1 获得“互联网+”大赛全国赛事奖项情况 -->
<select
id=
"selectNationalCompetitionAwardsList"
resultType=
"com.tiptimes.model.exportDTO.NationalCompetitionAwards"
>
SELECT * FROM
(
SELECT
t_answer.`group`,t_record.create_by as spaceName,
MAX(IF(options_id = 82,`value`,NULL)) as track,
MAX(IF(options_id = 83,`value`,NULL)) as prizes,
MAX(IF(options_id = 84,`value`,NULL)) as winningTeam,
MAX(IF(options_id = 85,`value`,NULL)) as winningProject,
MAX(IF(options_id = 86,`value`,NULL)) as isSupportingMaterials
<select
id=
"selectNationalCompetitionAwardsList"
resultType=
"com.tiptimes.model.exportDTO.NationalCompetitionAwards"
>
SELECT *
FROM (
SELECT t_answer.`group`,
t_record.create_by as spaceName,
MAX(IF(options_id = 82, `value`, NULL)) as track,
MAX(IF(options_id = 83, `value`, NULL)) as prizes,
MAX(IF(options_id = 84, `value`, NULL)) as winningTeam,
MAX(IF(options_id = 85, `value`, NULL)) as winningProject,
MAX(IF(options_id = 86, `value`, NULL)) as isSupportingMaterials
FROM t_answer
LEFT JOIN t_record ON t_record.id = t_answer.record_id where t_record.process_status=3
GROUP BY t_answer.`group`,t_record.create_by
LEFT JOIN t_record ON t_record.id = t_answer.record_id
where t_record.process_status = 3
GROUP BY t_answer.`group`, t_record.create_by
) as queation
WHERE queation.track IS NOT NULL ORDER BY spaceName;
WHERE queation.track IS NOT NULL
ORDER BY spaceName;
</select>
<!-- 问卷管理-奖励指标2 获得创客马拉松大赛及市教委组织的其他双创大赛奖项情况 -->
<select
id=
"selectEducationCommissionList"
resultType=
"com.tiptimes.model.exportDTO.EducationCommission"
>
SELECT *
FROM
(
SELECT
t_answer.`group`,t_record.create_by
as spaceName,
MAX(IF(options_id = 87,`value`,
NULL)) as eventName,
MAX(IF(options_id = 88,`value`,
NULL)) as organizedCompetition,
MAX(IF(options_id = 89,`value`,
NULL)) as wonPrizes,
MAX(IF(options_id = 90,`value`,
NULL)) as winningTeam,
MAX(IF(options_id = 91,`value`,
NULL)) as winningProject,
MAX(IF(options_id = 92,`value`,
NULL)) as supportingMaterials
SELECT *
FROM
(
SELECT t_answer.`group`,
t_record.create_by
as spaceName,
MAX(IF(options_id = 87, `value`,
NULL)) as eventName,
MAX(IF(options_id = 88, `value`,
NULL)) as organizedCompetition,
MAX(IF(options_id = 89, `value`,
NULL)) as wonPrizes,
MAX(IF(options_id = 90, `value`,
NULL)) as winningTeam,
MAX(IF(options_id = 91, `value`,
NULL)) as winningProject,
MAX(IF(options_id = 92, `value`,
NULL)) as supportingMaterials
FROM t_answer
LEFT JOIN t_record ON t_record.id = t_answer.record_id where t_record.process_status=3
GROUP BY t_answer.`group`,t_record.create_by
LEFT JOIN t_record ON t_record.id = t_answer.record_id
where t_record.process_status = 3
GROUP BY t_answer.`group`, t_record.create_by
) as queation
WHERE queation.eventName IS NOT NULL ORDER BY spaceName;
WHERE queation.eventName IS NOT NULL
ORDER BY spaceName;
</select>
<!-- 问卷管理-奖励指标3 入选天津市创业拔尖项目情况 -->
<select
id=
"selectEntrepreneurialProjectList"
resultType=
"com.tiptimes.model.exportDTO.EntrepreneurialProject"
>
SELECT *
FROM
(
SELECT
t_answer.`group`,t_record.create_by
as spaceName,
MAX(IF(options_id = 93,`value`,
NULL)) as theYear,
MAX(IF(options_id = 94,`value`,
NULL)) as projectName,
MAX(IF(options_id = 95,`value`,
NULL)) as isWhetherProject,
MAX(IF(options_id = 96,`value`,NULL)) as
isOutstandingProject
SELECT *
FROM
(
SELECT t_answer.`group`,
t_record.create_by
as spaceName,
MAX(IF(options_id = 93, `value`,
NULL)) as theYear,
MAX(IF(options_id = 94, `value`,
NULL)) as projectName,
MAX(IF(options_id = 95, `value`,
NULL)) as isWhetherProject,
MAX(IF(options_id = 96, `value`, NULL)) as
isOutstandingProject
FROM t_answer
LEFT JOIN t_record ON t_record.id = t_answer.record_id where t_record.process_status=3
GROUP BY t_answer.`group`,t_record.create_by
LEFT JOIN t_record ON t_record.id = t_answer.record_id
where t_record.process_status = 3
GROUP BY t_answer.`group`, t_record.create_by
) as queation
WHERE queation.theYear IS NOT NULL ORDER BY spaceName;
WHERE queation.theYear IS NOT NULL
ORDER BY spaceName;
</select>
<!-- 问卷管理-奖励指标4 是否为国家级备案众创空间/是否为国家创业孵化示范基地 -->
<select
id=
"selectSpaceAndIncubationList"
resultType=
"com.tiptimes.model.exportDTO.SpaceAndIncubation"
>
SELECT *
FROM
(
SELECT
t_answer.`group`,t_record.create_by
as spaceName,
MAX(IF(options_id = 97,`value`,
NULL)) as isWhetherSpace,
MAX(IF(options_id = 98,`value`,
NULL)) as isWhetherIncubation
SELECT *
FROM
(
SELECT t_answer.`group`,
t_record.create_by
as spaceName,
MAX(IF(options_id = 97, `value`,
NULL)) as isWhetherSpace,
MAX(IF(options_id = 98, `value`,
NULL)) as isWhetherIncubation
FROM t_answer
LEFT JOIN t_record ON t_record.id = t_answer.record_id where t_record.process_status=3
GROUP BY t_answer.`group`,t_record.create_by
LEFT JOIN t_record ON t_record.id = t_answer.record_id
where t_record.process_status = 3
GROUP BY t_answer.`group`, t_record.create_by
) as queation
WHERE queation.isWhetherSpace IS NOT NULL ORDER BY spaceName;
WHERE queation.isWhetherSpace IS NOT NULL
ORDER BY spaceName;
</select>
<!--更新问题表的分数,汇总统计使用-->
<update
id=
"updateAnswerScore"
>
UPDATE t_answer SET score = #{score}
WHERE record_id = #{recordId} and options_id = #{optionsId}
UPDATE t_answer
SET score = #{score}
WHERE record_id = #{recordId}
and options_id = #{optionsId}
</update>
<!--查询审批页面各个问题是否都是通过状态,审批列表的审批状态使用-->
...
...
@@ -613,26 +734,29 @@
</select>
<select
id=
"selectOneReviewByRecordIdAndQuestionsId"
resultType=
"com.tiptimes.model.Review"
>
select id,
questions_id,record_id,remark,approval_status,
score
select id,
questions_id, record_id, remark, approval_status,
score
from t_review
where questions_id=#{questionsId} and record_id=#{recordId}
where questions_id = #{questionsId}
and record_id = #{recordId}
</select>
<update
id=
"updateOneReviewByRecordIdAndQuestionsId"
parameterType=
"com.tiptimes.model.Review"
>
<update
id=
"updateOneReviewByRecordIdAndQuestionsId"
parameterType=
"com.tiptimes.model.Review"
>
update t_review
set remark=#{review.remark}
where questions_id=#{review.questionsId} and record_id=#{review.recordId}
where questions_id = #{review.questionsId}
and record_id = #{review.recordId}
</update>
<insert
id=
"insertOneReview"
parameterType=
"com.tiptimes.model.Review"
>
insert into t_review(questions_id,
record_id,
remark)
values (#{review.questionsId},
#{review.recordId},
#{review.remark})
<insert
id=
"insertOneReview"
parameterType=
"com.tiptimes.model.Review"
>
insert into t_review(questions_id,
record_id,
remark)
values (#{review.questionsId},
#{review.recordId},
#{review.remark})
</insert>
<select
id=
"selectReviewListByRecordId"
resultType=
"com.tiptimes.model.Review"
parameterType=
"long"
>
select id,
questions_id,record_id,remark,approval_status,
score
select id,
questions_id, record_id, remark, approval_status,
score
from t_review
where record_id=#{recordId} and approval_status is not null
where record_id = #{recordId}
and approval_status is not null
</select>
<select
id=
"AboutViewList"
resultType=
"com.tiptimes.model.Record"
>
...
...
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