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