服务指令-缩减无用冗余字段
This commit is contained in:
parent
c5efcf1b70
commit
31e2879715
|
|
@ -4,45 +4,23 @@
|
||||||
|
|
||||||
<select id="queryPlanList" resultType="com.nu.modules.biz.datapool.entity.DirectiveDataPool">
|
<select id="queryPlanList" resultType="com.nu.modules.biz.datapool.entity.DirectiveDataPool">
|
||||||
select
|
select
|
||||||
id as bizId,
|
a.id as bizId,
|
||||||
nu_id as nuId,
|
a.nu_id as nuId,
|
||||||
nu_name as nuName,
|
a.directive_id as directiveId,
|
||||||
elder_id as elderId,
|
a.iz_package as izPackage,
|
||||||
elder_name as elderName,
|
CONCAT(CURDATE(), ' ',STR_TO_DATE(a.start_time, '%H:%i')) as startTime,
|
||||||
(case when iz_package = 'Y' then '' else directive_id end) as directiveId,
|
a.cycle_type_id as cycleTypeId,
|
||||||
(case when iz_package = 'Y' then '' else directive_name end) as directiveName,
|
a.cycle_value as cycleValue,
|
||||||
(case when iz_package = 'Y' then directive_id else '' end) as packageId,
|
a.opt_time as optTime,
|
||||||
(case when iz_package = 'Y' then directive_name else '' end) as packageName,
|
a.opt_count as optCount
|
||||||
iz_package as izPackage,
|
from nu_biz_nu_care_directive_plan a
|
||||||
CONCAT(CURDATE(), ' ',STR_TO_DATE(start_time, '%H:%i')) as startTime,
|
|
||||||
CONCAT(CURDATE(), ' ',STR_TO_DATE(end_time, '%H:%i')) as endTime,
|
|
||||||
cycle_type_id as cycleTypeId,
|
|
||||||
cycle_type as cycleType,
|
|
||||||
cycle_value as cycleValue,
|
|
||||||
preview_file as previewFile,
|
|
||||||
net_preview_file as netPreviewFile,
|
|
||||||
preview_file_small as previewFileSmall,
|
|
||||||
net_preview_file_small as netPreviewFileSmall,
|
|
||||||
mp3_file as mp3File,
|
|
||||||
net_mp3_file as netMp3File,
|
|
||||||
mp4_file as mp4File,
|
|
||||||
net_mp4_file as netMp4File,
|
|
||||||
service_duration as serviceDuration,
|
|
||||||
service_content as serviceContent
|
|
||||||
from nu_biz_nu_care_directive_plan
|
|
||||||
<where>
|
<where>
|
||||||
<if test="nuId != null and nuId != ''">
|
<if test="nuId != null and nuId != ''">
|
||||||
AND nu_id = #{nuId}
|
AND nu_id = #{nuId}
|
||||||
</if>
|
</if>
|
||||||
<if test="elderId != null and elderId != ''">
|
|
||||||
AND elder_id = #{elderId}
|
|
||||||
</if>
|
|
||||||
<if test="directiveId != null and directiveId != ''">
|
<if test="directiveId != null and directiveId != ''">
|
||||||
AND directive_id = #{directiveId}
|
AND directive_id = #{directiveId}
|
||||||
</if>
|
</if>
|
||||||
<if test="packageId != null and packageId != ''">
|
|
||||||
AND package_id = #{packageId}
|
|
||||||
</if>
|
|
||||||
<if test="startTime != null">
|
<if test="startTime != null">
|
||||||
AND CONCAT(CURDATE(), ' ',STR_TO_DATE(start_time, '%H:%i')) >= #{startTime}
|
AND CONCAT(CURDATE(), ' ',STR_TO_DATE(start_time, '%H:%i')) >= #{startTime}
|
||||||
</if>
|
</if>
|
||||||
|
|
@ -54,33 +32,31 @@
|
||||||
|
|
||||||
<select id="queryPlanById" resultType="com.nu.modules.biz.datapool.entity.DirectiveDataPool">
|
<select id="queryPlanById" resultType="com.nu.modules.biz.datapool.entity.DirectiveDataPool">
|
||||||
select
|
select
|
||||||
id as bizId,
|
a.id as bizId,
|
||||||
nu_id as nuId,
|
a.nu_id as nuId,
|
||||||
nu_name as nuName,
|
a.directive_id as directiveId,
|
||||||
elder_id as elderId,
|
a.iz_package as izPackage,
|
||||||
elder_name as elderName,
|
CONCAT(CURDATE(), ' ',STR_TO_DATE(a.start_time, '%H:%i')) as startTime,
|
||||||
(case when iz_package = 'Y' then '' else directive_id end) as directiveId,
|
a.cycle_type_id as cycleTypeId,
|
||||||
(case when iz_package = 'Y' then '' else directive_name end) as directiveName,
|
a.cycle_value as cycleValue,
|
||||||
(case when iz_package = 'Y' then directive_id else '' end) as packageId,
|
a.opt_time as optTime,
|
||||||
(case when iz_package = 'Y' then directive_name else '' end) as packageName,
|
a.opt_count as optCount
|
||||||
iz_package as izPackage,
|
from nu_biz_nu_care_directive_plan a
|
||||||
CONCAT(CURDATE(), ' ',STR_TO_DATE(start_time, '%H:%i')) as startTime,
|
|
||||||
CONCAT(CURDATE(), ' ',STR_TO_DATE(end_time, '%H:%i')) as endTime,
|
|
||||||
cycle_type_id as cycleTypeId,
|
|
||||||
cycle_type as cycleType,
|
|
||||||
cycle_value as cycleValue,
|
|
||||||
preview_file as previewFile,
|
|
||||||
net_preview_file as netPreviewFile,
|
|
||||||
preview_file_small as previewFileSmall,
|
|
||||||
net_preview_file_small as netPreviewFileSmall,
|
|
||||||
mp3_file as mp3File,
|
|
||||||
net_mp3_file as netMp3File,
|
|
||||||
mp4_file as mp4File,
|
|
||||||
net_mp4_file as netMp4File,
|
|
||||||
service_duration as serviceDuration,
|
|
||||||
service_content as serviceContent
|
|
||||||
from nu_biz_nu_care_directive_plan
|
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getOrderOptCount" resultType="int">
|
||||||
|
select count(*)
|
||||||
|
from nu_biz_nu_directive_order
|
||||||
|
where nu_id = #{nuId}
|
||||||
|
and elder_id = #{elderId}
|
||||||
|
and start_time >= #{optTime}
|
||||||
|
<if test="directiveId != null and directiveId != ''">
|
||||||
|
AND directive_id = #{directiveId}
|
||||||
|
</if>
|
||||||
|
<if test="packageId != null and packageId != ''">
|
||||||
|
AND package_id = #{packageId}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue