解决pad矩阵不显示指令问题
This commit is contained in:
parent
460008e13a
commit
a3bf3a2a49
|
|
@ -22,6 +22,8 @@ public interface CareDirectivePlanMapper extends BaseMapper<CareDirectivePlan> {
|
|||
|
||||
List<CareDirectivePlan> list(@Param("dto") CareDirectiveEntity careDirectiveEntity);
|
||||
|
||||
List<CareDirectivePlan> jzList(@Param("dto") CareDirectiveEntity careDirectiveEntity);
|
||||
|
||||
List<DirectiveOrderEntity> queryFuture( @Param("dto") CareDirectiveEntity dto);
|
||||
|
||||
List<DirectiveOrderEntity> queryListByDateTime( @Param("dto") CareDirectiveEntity dto);
|
||||
|
|
|
|||
|
|
@ -254,6 +254,86 @@
|
|||
</if>
|
||||
</select>
|
||||
|
||||
<select id="jzList" resultMap="DirectiveOrderMap">
|
||||
SELECT p.id,
|
||||
p.nu_id,
|
||||
base.nu_name,
|
||||
p.instruction_tag_id,
|
||||
inst.instruction_name,
|
||||
directive.category_id,
|
||||
category.category_name,
|
||||
directive.type_id,
|
||||
stype.type_name,
|
||||
p.directive_id,
|
||||
directive.directive_name,
|
||||
p.cycle_type_id,
|
||||
p.cycle_value,
|
||||
p.opt_time,
|
||||
p.opt_count,
|
||||
p.iz_multi,
|
||||
directive.immediate_file,
|
||||
directive.immediate_file_focus,
|
||||
directive.preview_file,
|
||||
directive.preview_file_small,
|
||||
directive.mp3_file,
|
||||
directive.mp4_file,
|
||||
directive.service_duration,
|
||||
directive.service_content,
|
||||
p.positioning,
|
||||
p.positioning_long,
|
||||
p.tag_name,
|
||||
p.start_time,
|
||||
DATE_FORMAT(
|
||||
DATE_ADD(
|
||||
STR_TO_DATE(CONCAT(CURDATE(), ' ', p.start_time), '%Y-%m-%d %H:%i'),
|
||||
INTERVAL CAST(directive.service_duration AS UNSIGNED) MINUTE
|
||||
),
|
||||
'%H:%i'
|
||||
) AS end_time,
|
||||
p.create_by,
|
||||
p.create_time,
|
||||
p.update_by,
|
||||
p.update_time,
|
||||
p.sys_org_code
|
||||
FROM nu_biz_directive_plan p
|
||||
LEFT JOIN nu_base_info base ON p.nu_id = base.nu_id
|
||||
LEFT JOIN nu_config_service_directive directive ON p.directive_id = directive.id
|
||||
LEFT JOIN nu_config_service_instruction_tag inst ON directive.instruction_tag_id = inst.id
|
||||
LEFT JOIN nu_config_service_category category ON directive.category_id = category.id
|
||||
LEFT JOIN nu_config_service_type stype ON directive.type_id = stype.id
|
||||
WHERE 1 = 1
|
||||
<if test="dto != null and dto.nuId != null and dto.nuId != ''">
|
||||
AND p.nu_id = #{dto.nuId}
|
||||
</if>
|
||||
<if test="dto != null and dto.instructionTagId != null and dto.instructionTagId != ''">
|
||||
AND p.instruction_tag_id = #{dto.instructionTagId}
|
||||
</if>
|
||||
<if test="dto != null and dto.queryType != null and dto.queryType != ''">
|
||||
<choose>
|
||||
<when test="dto.queryType == 'service'">
|
||||
AND p.cycle_type_id != '2'
|
||||
</when>
|
||||
<when test="dto.queryType == 'instant'">
|
||||
AND p.cycle_type_id = '2'
|
||||
</when>
|
||||
</choose>
|
||||
</if>
|
||||
<if test="dto != null and dto.queryDate != null and dto.queryDate != ''">
|
||||
AND CONCAT(DATE_FORMAT(#{dto.queryDate}, '%Y-%m-%d'), ' ', p.start_time, ':00') >= #{dto.queryDate}
|
||||
</if>
|
||||
ORDER BY p.nu_id ASC, p.instruction_tag_id ASC
|
||||
<if test="dto != null and dto.queryType != null and dto.queryType != ''">
|
||||
<choose>
|
||||
<when test="dto.queryType == 'service'">
|
||||
, start_time ASC
|
||||
</when>
|
||||
<when test="dto.queryType == 'instant'">
|
||||
, directive.directive_name ASC
|
||||
</when>
|
||||
</choose>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="queryFuture" resultMap="DirectiveOrderMap">
|
||||
SELECT
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ public class CareDirectivePlanServiceImpl extends ServiceImpl<CareDirectivePlanM
|
|||
Map<String, Object> resMap = new HashMap<>();
|
||||
//服务指令计划
|
||||
careDirectiveEntity.setQueryType("service");
|
||||
List<CareDirectivePlan> planList = baseMapper.list(careDirectiveEntity);
|
||||
List<CareDirectivePlan> planList = baseMapper.jzList(careDirectiveEntity);
|
||||
// if (!CollectionUtils.isEmpty(groupList)) {
|
||||
// //将包的指令塞进去(写一个sql效率低)
|
||||
// CareDirectivePackageEntity queryParams = new CareDirectivePackageEntity();
|
||||
|
|
|
|||
Loading…
Reference in New Issue