修改bug

This commit is contained in:
yangjun 2026-03-03 17:22:20 +08:00
parent 1d7e993fc4
commit 5b29851955
3 changed files with 32 additions and 28 deletions

View File

@ -93,26 +93,30 @@ public class ConfigServiceDirectiveController extends JeecgController<ConfigServ
customeRuleMap.put("izEnabled", QueryRuleEnum.EQ);
QueryWrapper<ConfigServiceDirective> queryWrapper = QueryGenerator.initQueryWrapper(configServiceDirective, req.getParameterMap(), customeRuleMap);
queryWrapper.select("id");
if(StringUtils.isNotBlank(configServiceDirective.getNotId())){
queryWrapper.notIn("id", configServiceDirective.getNotId().split(","));
}
//如果有服务指令需要提前查询下对应的服务指令id
List<ConfigServiceDirective> directiveIds = null;
if (StringUtils.isNotBlank(configServiceDirective.getBodyTags())) {
directiveIds = configServiceDirectiveService.queryDirectiveIdByBodyTagIds(configServiceDirective.getBodyTags());
if (directiveIds != null && !directiveIds.isEmpty()) {
queryWrapper.in("id", directiveIds.stream().map(ConfigServiceDirective::getId).collect(Collectors.toList()));
} else {
//体重标签下没有数据
queryWrapper.eq("id", "null");
}
}
if (StringUtils.isNotBlank(configServiceDirective.getEmotionTags())) {
directiveIds = configServiceDirectiveService.queryDirectiveIdByEmotionTagIds(configServiceDirective.getEmotionTags());
if (directiveIds != null && !directiveIds.isEmpty() && StringUtils.isNotBlank(configServiceDirective.getEmotionTags())) {
queryWrapper.in("id", directiveIds.stream().map(ConfigServiceDirective::getId).collect(Collectors.toList()));
} else {
//情绪标签下没有数据
queryWrapper.eq("id", "null");
}
}
// List<ConfigServiceDirective> directiveIds = null;
// if (StringUtils.isNotBlank(configServiceDirective.getBodyTags())) {
// directiveIds = configServiceDirectiveService.queryDirectiveIdByBodyTagIds(configServiceDirective.getBodyTags());
// if (directiveIds != null && !directiveIds.isEmpty()) {
// queryWrapper.in("id", directiveIds.stream().map(ConfigServiceDirective::getId).collect(Collectors.toList()));
// } else {
// //体重标签下没有数据
// queryWrapper.eq("id", "null");
// }
// }
// if (StringUtils.isNotBlank(configServiceDirective.getEmotionTags())) {
// directiveIds = configServiceDirectiveService.queryDirectiveIdByEmotionTagIds(configServiceDirective.getEmotionTags());
// if (directiveIds != null && !directiveIds.isEmpty() && StringUtils.isNotBlank(configServiceDirective.getEmotionTags())) {
// queryWrapper.in("id", directiveIds.stream().map(ConfigServiceDirective::getId).collect(Collectors.toList()));
// } else {
// //情绪标签下没有数据
// queryWrapper.eq("id", "null");
// }
// }
if (configServiceDirective.isIzAbnormal()) {
queryWrapper.eq("toll_price", new BigDecimal("0"));
queryWrapper.eq("com_price", new BigDecimal("0"));

View File

@ -333,6 +333,8 @@ public class ConfigServiceDirective implements Serializable {
// private String cycleTypeValue;
@TableField(exist = false)
private String syncCode;
@TableField(exist = false)
private String notId;
// /**
// * 指令类型 1日常护理 2周期护理 3即时护理
// */

View File

@ -89,16 +89,8 @@
c.preview_file_md5,
c.preview_file_small_md5,
c.immediate_file_md5,
c.immediate_file_focus_md5,
bodytag.id as bodyTagId,
bodytag.tag_name as bodyTagName,
emotag.id as emotionTagId,
emotag.tag_name as emotionTagName
c.immediate_file_focus_md5
FROM nu_config_service_directive c
LEFT JOIN nu_directive_body_tag dbt ON c.id = dbt.directive_id
LEFT JOIN nu_config_body_tag bodytag ON dbt.tag_id = bodytag.id
LEFT JOIN nu_directive_emotion_tag det ON c.id = det.directive_id
LEFT JOIN nu_config_emotion_tag emotag ON det.tag_id = emotag.id
<where>
c.id IN
<foreach collection="ids" item="item" open="(" separator="," close=")">
@ -107,6 +99,12 @@
<if test="directive !=null and directive.izEnabled != null and directive.izEnabled != ''">
and c.iz_enabled = #{directive.izEnabled}
</if>
<if test="directive !=null and directive.notId != null and directive.notId != ''">
c.id not IN
<foreach collection="directive.notId" item="item" open="(" separator="," close=")">
#{item.id}
</foreach>
</if>
</where>
ORDER BY c.category_id ASC, c.type_id ASC, c.instruction_tag_id ASC,c.create_time desc
</select>