Compare commits
No commits in common. "917a089c379091d23152bd7916cc5fc4ce852c45" and "4f3bde6f95c67a679a9062f4d5568e746e7c4b6b" have entirely different histories.
917a089c37
...
4f3bde6f95
|
|
@ -1,8 +1,11 @@
|
||||||
package com.nu.dto;
|
package com.nu.dto;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 服务指令审核
|
* @Description: 服务指令审核
|
||||||
|
|
@ -12,6 +15,8 @@ import java.io.Serializable;
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class DirectiveAsyncMQDto implements Serializable {
|
public class DirectiveAsyncMQDto implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/**id*/
|
/**id*/
|
||||||
private String id;
|
private String id;
|
||||||
/**服务类别id*/
|
/**服务类别id*/
|
||||||
|
|
@ -40,8 +45,6 @@ public class DirectiveAsyncMQDto implements Serializable {
|
||||||
private String serviceContent;
|
private String serviceContent;
|
||||||
/**服务时长(分钟)*/
|
/**服务时长(分钟)*/
|
||||||
private String serviceDuration;
|
private String serviceDuration;
|
||||||
/**指令状态*/
|
|
||||||
private String status;
|
|
||||||
/**是否启用 0启用 1未启用*/
|
/**是否启用 0启用 1未启用*/
|
||||||
private String izEnabled;
|
private String izEnabled;
|
||||||
/**是否删除*/
|
/**是否删除*/
|
||||||
|
|
@ -65,21 +68,21 @@ public class DirectiveAsyncMQDto implements Serializable {
|
||||||
/**即时指令图标*/
|
/**即时指令图标*/
|
||||||
private String immediateFile;
|
private String immediateFile;
|
||||||
|
|
||||||
|
//体型标签
|
||||||
|
List<Map<String,String>> bodyTagList;
|
||||||
|
//情绪标签
|
||||||
|
List<Map<String,String>> emotionTagList;
|
||||||
|
|
||||||
//分类标签中文名称
|
//分类标签中文名称
|
||||||
|
@TableField(exist = false)
|
||||||
private String instructionName;
|
private String instructionName;
|
||||||
//服务类别中文名称
|
//服务类别中文名称
|
||||||
|
@TableField(exist = false)
|
||||||
private String categoryName;
|
private String categoryName;
|
||||||
//服务类型中文名称
|
//服务类型中文名称
|
||||||
|
@TableField(exist = false)
|
||||||
private String typeName;
|
private String typeName;
|
||||||
//周期类型中文名称
|
//周期类型中文名称
|
||||||
|
@TableField(exist = false)
|
||||||
private String cycleTypeName;
|
private String cycleTypeName;
|
||||||
//体型标签id,id,id
|
|
||||||
private String bodyTags;
|
|
||||||
//情绪标签id,id,id
|
|
||||||
private String emotionTags;
|
|
||||||
//体型标签json字符串(有id、label)
|
|
||||||
private String bodyTagsObj;
|
|
||||||
//情绪标签json字符串(有id、label)
|
|
||||||
private String emotionTagsObj;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -42,11 +42,6 @@ public class DirectiveBodyTag implements Serializable {
|
||||||
@Excel(name = "排序", width = 15)
|
@Excel(name = "排序", width = 15)
|
||||||
@ApiModelProperty(value = "排序")
|
@ApiModelProperty(value = "排序")
|
||||||
private Integer sort;
|
private Integer sort;
|
||||||
/**状态 0已授权 1未授权*/
|
|
||||||
@Excel(name = "状态 0已授权 1未授权", width = 15)
|
|
||||||
@ApiModelProperty(value = "状态 0已授权 1未授权")
|
|
||||||
@Dict(dicCode = "status")
|
|
||||||
private java.lang.String status;
|
|
||||||
/**是否启用 0启用 1未启用*/
|
/**是否启用 0启用 1未启用*/
|
||||||
@Excel(name = "是否启用", width = 15, dicCode = "iz_enabled")
|
@Excel(name = "是否启用", width = 15, dicCode = "iz_enabled")
|
||||||
@Dict(dicCode = "iz_enabled")
|
@Dict(dicCode = "iz_enabled")
|
||||||
|
|
|
||||||
|
|
@ -42,11 +42,6 @@ public class DirectiveEmotionTag implements Serializable {
|
||||||
@Excel(name = "排序", width = 15)
|
@Excel(name = "排序", width = 15)
|
||||||
@ApiModelProperty(value = "排序")
|
@ApiModelProperty(value = "排序")
|
||||||
private java.lang.Integer sort;
|
private java.lang.Integer sort;
|
||||||
/**状态 0已授权 1未授权*/
|
|
||||||
@Excel(name = "状态 0已授权 1未授权", width = 15)
|
|
||||||
@ApiModelProperty(value = "状态 0已授权 1未授权")
|
|
||||||
@Dict(dicCode = "status")
|
|
||||||
private java.lang.String status;
|
|
||||||
/**是否启用 0启用 1未启用*/
|
/**是否启用 0启用 1未启用*/
|
||||||
@Excel(name = "是否启用", width = 15, dicCode = "iz_enabled")
|
@Excel(name = "是否启用", width = 15, dicCode = "iz_enabled")
|
||||||
@Dict(dicCode = "iz_enabled")
|
@Dict(dicCode = "iz_enabled")
|
||||||
|
|
|
||||||
|
|
@ -46,11 +46,6 @@ public class InstructionTag implements Serializable {
|
||||||
@Excel(name = "排序", width = 15)
|
@Excel(name = "排序", width = 15)
|
||||||
@ApiModelProperty(value = "排序")
|
@ApiModelProperty(value = "排序")
|
||||||
private java.lang.Integer sort;
|
private java.lang.Integer sort;
|
||||||
/**状态 0已授权 1未授权*/
|
|
||||||
@Excel(name = "状态 0已授权 1未授权", width = 15)
|
|
||||||
@ApiModelProperty(value = "状态 0已授权 1未授权")
|
|
||||||
@Dict(dicCode = "status")
|
|
||||||
private java.lang.String status;
|
|
||||||
/**是否启用 0启用 1未启用*/
|
/**是否启用 0启用 1未启用*/
|
||||||
@Excel(name = "是否启用", width = 15)
|
@Excel(name = "是否启用", width = 15)
|
||||||
@ApiModelProperty(value = "是否启用")
|
@ApiModelProperty(value = "是否启用")
|
||||||
|
|
|
||||||
|
|
@ -47,11 +47,6 @@ public class ConfigServiceCategory implements Serializable {
|
||||||
@Excel(name = "排序", width = 15)
|
@Excel(name = "排序", width = 15)
|
||||||
@ApiModelProperty(value = "排序")
|
@ApiModelProperty(value = "排序")
|
||||||
private java.lang.Integer sort;
|
private java.lang.Integer sort;
|
||||||
/**状态 0已授权 1未授权*/
|
|
||||||
@Excel(name = "状态 0已授权 1未授权", width = 15)
|
|
||||||
@ApiModelProperty(value = "状态 0已授权 1未授权")
|
|
||||||
@Dict(dicCode = "status")
|
|
||||||
private java.lang.String status;
|
|
||||||
/**是否启用 0启用 1未启用*/
|
/**是否启用 0启用 1未启用*/
|
||||||
@Excel(name = "是否启用", width = 15)
|
@Excel(name = "是否启用", width = 15)
|
||||||
@ApiModelProperty(value = "是否启用")
|
@ApiModelProperty(value = "是否启用")
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.nu.dto.DirectiveAsyncMQDto;
|
|
||||||
import com.nu.modules.servicedirective.entity.ConfigServiceDirective;
|
import com.nu.modules.servicedirective.entity.ConfigServiceDirective;
|
||||||
import com.nu.modules.servicedirective.service.IConfigServiceDirectiveService;
|
import com.nu.modules.servicedirective.service.IConfigServiceDirectiveService;
|
||||||
import com.nu.modules.sysconfig.ISysConfigApi;
|
import com.nu.modules.sysconfig.ISysConfigApi;
|
||||||
|
|
@ -17,11 +16,9 @@ import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||||
import org.jeecg.common.system.api.ISysBaseAPI;
|
|
||||||
import org.jeecg.common.system.base.controller.JeecgController;
|
import org.jeecg.common.system.base.controller.JeecgController;
|
||||||
import org.jeecg.common.system.query.QueryGenerator;
|
import org.jeecg.common.system.query.QueryGenerator;
|
||||||
import org.jeecg.common.system.query.QueryRuleEnum;
|
import org.jeecg.common.system.query.QueryRuleEnum;
|
||||||
import org.springframework.beans.BeanUtils;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
@ -49,8 +46,6 @@ public class ConfigServiceDirectiveController extends JeecgController<ConfigServ
|
||||||
private IConfigServiceDirectiveService configServiceDirectiveService;
|
private IConfigServiceDirectiveService configServiceDirectiveService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private RabbitMQUtil rabbitMQUtil;
|
private RabbitMQUtil rabbitMQUtil;
|
||||||
@Autowired
|
|
||||||
private ISysBaseAPI sysBaseAPI;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页列表查询
|
* 分页列表查询
|
||||||
|
|
@ -117,13 +112,10 @@ public class ConfigServiceDirectiveController extends JeecgController<ConfigServ
|
||||||
@ApiOperation(value = "服务指令-添加", notes = "服务指令-添加")
|
@ApiOperation(value = "服务指令-添加", notes = "服务指令-添加")
|
||||||
@PostMapping(value = "/add")
|
@PostMapping(value = "/add")
|
||||||
public Result<String> add(@RequestBody ConfigServiceDirective configServiceDirective) {
|
public Result<String> add(@RequestBody ConfigServiceDirective configServiceDirective) {
|
||||||
//存储机构编码
|
|
||||||
JSONObject deptInfo = sysBaseAPI.getDeptInfo();
|
|
||||||
configServiceDirective.setSysOrgCode(deptInfo.getString("code"));
|
|
||||||
//设置为“未授权”
|
|
||||||
configServiceDirective.setStatus("1");
|
|
||||||
//业务平台添加时无媒体资源 处理媒体资源(放在保存方法之前)
|
//业务平台添加时无媒体资源 处理媒体资源(放在保存方法之前)
|
||||||
// configServiceDirectiveService.handleMediaFile(configServiceDirective);
|
// configServiceDirectiveService.handleMediaFile(configServiceDirective);
|
||||||
|
//业务平台创建的数据初始状态为“未授权” iz_enabled = 2
|
||||||
|
configServiceDirective.setIzEnabled("2");
|
||||||
configServiceDirectiveService.save(configServiceDirective);
|
configServiceDirectiveService.save(configServiceDirective);
|
||||||
if (StringUtils.isNotBlank(configServiceDirective.getBodyTags())) {
|
if (StringUtils.isNotBlank(configServiceDirective.getBodyTags())) {
|
||||||
configServiceDirectiveService.saveBodyTags(configServiceDirective);
|
configServiceDirectiveService.saveBodyTags(configServiceDirective);
|
||||||
|
|
@ -138,12 +130,7 @@ public class ConfigServiceDirectiveController extends JeecgController<ConfigServ
|
||||||
}
|
}
|
||||||
|
|
||||||
//同步给管理平台
|
//同步给管理平台
|
||||||
{
|
// rabbitMQUtil.sendToExchange("hldy.directive.add", "hldy.directive.add", null);
|
||||||
DirectiveAsyncMQDto directiveAsyncMQDto = new DirectiveAsyncMQDto();
|
|
||||||
BeanUtils.copyProperties(configServiceDirective, directiveAsyncMQDto);
|
|
||||||
rabbitMQUtil.sendToExchange("hldy.directive", "hldy.directive.audit", directiveAsyncMQDto);
|
|
||||||
}
|
|
||||||
|
|
||||||
return Result.OK("添加成功!");
|
return Result.OK("添加成功!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -172,13 +159,6 @@ public class ConfigServiceDirectiveController extends JeecgController<ConfigServ
|
||||||
configServiceDirectiveService.removeEmotionTags(configServiceDirective);
|
configServiceDirectiveService.removeEmotionTags(configServiceDirective);
|
||||||
}
|
}
|
||||||
|
|
||||||
//如果是未授权 则同步给管理平台进行更新
|
|
||||||
if("1".equals(configServiceDirective.getStatus())){
|
|
||||||
DirectiveAsyncMQDto directiveAsyncMQDto = new DirectiveAsyncMQDto();
|
|
||||||
BeanUtils.copyProperties(configServiceDirective, directiveAsyncMQDto);
|
|
||||||
rabbitMQUtil.sendToExchange("hldy.directive", "hldy.directive.audit", directiveAsyncMQDto);
|
|
||||||
}
|
|
||||||
|
|
||||||
return Result.OK("编辑成功!");
|
return Result.OK("编辑成功!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -93,15 +93,10 @@ public class ConfigServiceDirective implements Serializable {
|
||||||
@Excel(name = "服务时长(分钟)", width = 15)
|
@Excel(name = "服务时长(分钟)", width = 15)
|
||||||
@ApiModelProperty(value = "服务时长(分钟)")
|
@ApiModelProperty(value = "服务时长(分钟)")
|
||||||
private java.lang.String serviceDuration;
|
private java.lang.String serviceDuration;
|
||||||
/**指令状态*/
|
|
||||||
@Excel(name = "指令状态", width = 15)
|
|
||||||
@ApiModelProperty(value = "指令状态")
|
|
||||||
@Dict(dicCode = "directive_status")
|
|
||||||
private java.lang.String status;
|
|
||||||
/**是否启用 0启用 1未启用*/
|
/**是否启用 0启用 1未启用*/
|
||||||
@Excel(name = "是否启用", width = 15)
|
@Excel(name = "是否启用", width = 15)
|
||||||
@ApiModelProperty(value = "是否启用")
|
@ApiModelProperty(value = "是否启用")
|
||||||
@Dict(dicCode = "iz_enabled")
|
@Dict(dicCode = "directive_status")
|
||||||
private java.lang.String izEnabled;
|
private java.lang.String izEnabled;
|
||||||
/**是否删除*/
|
/**是否删除*/
|
||||||
@Excel(name = "是否删除", width = 15)
|
@Excel(name = "是否删除", width = 15)
|
||||||
|
|
@ -198,12 +193,6 @@ public class ConfigServiceDirective implements Serializable {
|
||||||
//媒体资源存储路径名
|
//媒体资源存储路径名
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String mediaFileSavePath;
|
private String mediaFileSavePath;
|
||||||
//体型标签json字符串(前台封装好的 有id、label)
|
|
||||||
@TableField(exist = false)
|
|
||||||
private String bodyTagsObj;
|
|
||||||
//情绪标签json字符串(前台封装好的 有id、label)
|
|
||||||
@TableField(exist = false)
|
|
||||||
private String emotionTagsObj;
|
|
||||||
//护理分类名称
|
//护理分类名称
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String instructionTagName;
|
private String instructionTagName;
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,6 @@
|
||||||
<result property="sort" column="sort"/>
|
<result property="sort" column="sort"/>
|
||||||
<result property="serviceContent" column="service_content"/>
|
<result property="serviceContent" column="service_content"/>
|
||||||
<result property="serviceDuration" column="service_duration"/>
|
<result property="serviceDuration" column="service_duration"/>
|
||||||
<result property="status" column="status"/>
|
|
||||||
<result property="izEnabled" column="iz_enabled"/>
|
<result property="izEnabled" column="iz_enabled"/>
|
||||||
<result property="delFlag" column="del_flag"/>
|
<result property="delFlag" column="del_flag"/>
|
||||||
<result property="createBy" column="create_by"/>
|
<result property="createBy" column="create_by"/>
|
||||||
|
|
@ -60,7 +59,6 @@
|
||||||
c.sort,
|
c.sort,
|
||||||
c.service_content,
|
c.service_content,
|
||||||
c.service_duration,
|
c.service_duration,
|
||||||
c.status,
|
|
||||||
c.iz_enabled,
|
c.iz_enabled,
|
||||||
c.del_flag,
|
c.del_flag,
|
||||||
c.create_by,
|
c.create_by,
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
package com.nu.modules.servicedirective.service;
|
package com.nu.modules.servicedirective.service;
|
||||||
|
|
||||||
|
import cn.hutool.json.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.nu.dto.DirectiveAsyncMQDto;
|
|
||||||
import com.nu.modules.servicedirective.entity.ConfigServiceDirective;
|
import com.nu.modules.servicedirective.entity.ConfigServiceDirective;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -58,6 +58,4 @@ public interface IConfigServiceDirectiveService extends IService<ConfigServiceDi
|
||||||
void insertAllDirectives(List<ConfigServiceDirective> directives);
|
void insertAllDirectives(List<ConfigServiceDirective> directives);
|
||||||
|
|
||||||
void handleMediaFile(ConfigServiceDirective configServiceDirective);
|
void handleMediaFile(ConfigServiceDirective configServiceDirective);
|
||||||
|
|
||||||
void auditPass(DirectiveAsyncMQDto dto);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,36 +2,23 @@ package com.nu.modules.servicedirective.service.impl;
|
||||||
|
|
||||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.nu.dto.DirectiveAsyncMQDto;
|
|
||||||
import com.nu.modules.directivetag.body.entity.DirectiveBodyTag;
|
import com.nu.modules.directivetag.body.entity.DirectiveBodyTag;
|
||||||
import com.nu.modules.directivetag.body.service.IDirectiveBodyTagService;
|
|
||||||
import com.nu.modules.directivetag.emotion.entity.DirectiveEmotionTag;
|
import com.nu.modules.directivetag.emotion.entity.DirectiveEmotionTag;
|
||||||
import com.nu.modules.directivetag.emotion.service.IDirectiveEmotionTagService;
|
|
||||||
import com.nu.modules.instructiontag.entity.InstructionTag;
|
|
||||||
import com.nu.modules.instructiontag.service.IInstructionTagService;
|
|
||||||
import com.nu.modules.servicecategory.entity.ConfigServiceCategory;
|
|
||||||
import com.nu.modules.servicecategory.service.IConfigServiceCategoryService;
|
|
||||||
import com.nu.modules.servicedirective.entity.ConfigServiceDirective;
|
import com.nu.modules.servicedirective.entity.ConfigServiceDirective;
|
||||||
import com.nu.modules.servicedirective.mapper.ConfigServiceDirectiveMapper;
|
import com.nu.modules.servicedirective.mapper.ConfigServiceDirectiveMapper;
|
||||||
import com.nu.modules.servicedirective.service.IConfigServiceDirectiveService;
|
import com.nu.modules.servicedirective.service.IConfigServiceDirectiveService;
|
||||||
import com.nu.modules.servicetype.entity.ConfigServiceType;
|
|
||||||
import com.nu.modules.servicetype.service.IConfigServiceTypeService;
|
|
||||||
import com.nu.modules.sysconfig.ISysConfigApi;
|
import com.nu.modules.sysconfig.ISysConfigApi;
|
||||||
import com.nu.utils.RabbitMQUtil;
|
import com.nu.utils.RabbitMQUtil;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.jeecg.common.system.api.ISysBaseAPI;
|
import org.jeecg.common.system.api.ISysBaseAPI;
|
||||||
import org.springframework.beans.BeanUtils;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.context.annotation.Lazy;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
|
@ -53,21 +40,6 @@ public class ConfigServiceDirectiveServiceImpl extends ServiceImpl<ConfigService
|
||||||
private ISysBaseAPI sysBaseAPI;
|
private ISysBaseAPI sysBaseAPI;
|
||||||
@Autowired
|
@Autowired
|
||||||
private RabbitMQUtil rabbitMQUtil;
|
private RabbitMQUtil rabbitMQUtil;
|
||||||
@Lazy
|
|
||||||
@Autowired
|
|
||||||
private IInstructionTagService instructionTagService;
|
|
||||||
@Lazy
|
|
||||||
@Autowired
|
|
||||||
private IConfigServiceCategoryService categoryService;
|
|
||||||
@Lazy
|
|
||||||
@Autowired
|
|
||||||
private IConfigServiceTypeService typeService;
|
|
||||||
@Lazy
|
|
||||||
@Autowired
|
|
||||||
private IDirectiveBodyTagService bodyTagService;
|
|
||||||
@Lazy
|
|
||||||
@Autowired
|
|
||||||
private IDirectiveEmotionTagService emotionTagService;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ConfigServiceDirective> pageList(ConfigServiceDirective configServiceDirective, IPage<ConfigServiceDirective> list_) {
|
public List<ConfigServiceDirective> pageList(ConfigServiceDirective configServiceDirective, IPage<ConfigServiceDirective> list_) {
|
||||||
|
|
@ -298,7 +270,6 @@ public class ConfigServiceDirectiveServiceImpl extends ServiceImpl<ConfigService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 处理单个文件,检查路径是否需要迁移
|
* 处理单个文件,检查路径是否需要迁移
|
||||||
*
|
|
||||||
* @param basePath 基础路径
|
* @param basePath 基础路径
|
||||||
* @param targetDir 目标目录
|
* @param targetDir 目标目录
|
||||||
* @param filePath 文件路径
|
* @param filePath 文件路径
|
||||||
|
|
@ -351,50 +322,4 @@ public class ConfigServiceDirectiveServiceImpl extends ServiceImpl<ConfigService
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void auditPass(DirectiveAsyncMQDto dto) {
|
|
||||||
//将相应字典项改为已授权
|
|
||||||
|
|
||||||
//分类标签
|
|
||||||
UpdateWrapper<InstructionTag> instruUW = new UpdateWrapper<>();
|
|
||||||
instruUW.eq("id", dto.getInstructionTagId());
|
|
||||||
instruUW.eq("status", "1");
|
|
||||||
InstructionTag instructionTag = new InstructionTag();
|
|
||||||
instructionTag.setStatus("0");
|
|
||||||
instructionTagService.update(instructionTag, instruUW);
|
|
||||||
//服务类别
|
|
||||||
UpdateWrapper<ConfigServiceCategory> categoryUW = new UpdateWrapper<>();
|
|
||||||
categoryUW.eq("id", dto.getCategoryId());
|
|
||||||
categoryUW.eq("status", "1");
|
|
||||||
ConfigServiceCategory category = new ConfigServiceCategory();
|
|
||||||
category.setStatus("0");
|
|
||||||
categoryService.update(category, categoryUW);
|
|
||||||
//服务类型
|
|
||||||
UpdateWrapper<ConfigServiceType> typeUW = new UpdateWrapper<>();
|
|
||||||
typeUW.eq("id", dto.getTypeId());
|
|
||||||
typeUW.eq("status", "1");
|
|
||||||
ConfigServiceType type = new ConfigServiceType();
|
|
||||||
type.setStatus("0");
|
|
||||||
typeService.update(type, typeUW);
|
|
||||||
//体型标签
|
|
||||||
List<String> bodyTags = Arrays.asList(dto.getBodyTags().split(","));
|
|
||||||
bodyTags.stream().forEach(b -> {
|
|
||||||
UpdateWrapper<DirectiveBodyTag> bodyTagUW = new UpdateWrapper<>();
|
|
||||||
bodyTagUW.eq("id", b);
|
|
||||||
bodyTagUW.eq("status", "1");
|
|
||||||
DirectiveBodyTag bodyTag = new DirectiveBodyTag();
|
|
||||||
bodyTag.setStatus("0");
|
|
||||||
bodyTagService.update(bodyTag, bodyTagUW);
|
|
||||||
});
|
|
||||||
//情绪标签
|
|
||||||
List<String> emotionTags = Arrays.asList(dto.getEmotionTags().split(","));
|
|
||||||
emotionTags.stream().forEach(b -> {
|
|
||||||
UpdateWrapper<DirectiveEmotionTag> emotionTagUW = new UpdateWrapper<>();
|
|
||||||
emotionTagUW.eq("id", b);
|
|
||||||
emotionTagUW.eq("status", "1");
|
|
||||||
DirectiveEmotionTag emotionTag = new DirectiveEmotionTag();
|
|
||||||
emotionTag.setStatus("0");
|
|
||||||
emotionTagService.update(emotionTag, emotionTagUW);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -52,11 +52,6 @@ public class ConfigServiceType implements Serializable {
|
||||||
@Excel(name = "排序", width = 15)
|
@Excel(name = "排序", width = 15)
|
||||||
@ApiModelProperty(value = "排序")
|
@ApiModelProperty(value = "排序")
|
||||||
private java.lang.Integer sort;
|
private java.lang.Integer sort;
|
||||||
/**状态 0已授权 1未授权*/
|
|
||||||
@Excel(name = "状态 0已授权 1未授权", width = 15)
|
|
||||||
@ApiModelProperty(value = "状态 0已授权 1未授权")
|
|
||||||
@Dict(dicCode = "status")
|
|
||||||
private java.lang.String status;
|
|
||||||
/**是否启用 0启用 1未启用*/
|
/**是否启用 0启用 1未启用*/
|
||||||
@Excel(name = "是否启用", width = 15)
|
@Excel(name = "是否启用", width = 15)
|
||||||
@ApiModelProperty(value = "是否启用")
|
@ApiModelProperty(value = "是否启用")
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,6 @@
|
||||||
package com.nu.mq.directive.listener;
|
package com.nu.mq.directive.listener;
|
||||||
|
|
||||||
import com.nu.dto.DirectiveAsyncMQDto;
|
|
||||||
import com.nu.modules.servicedirective.entity.ConfigServiceDirective;
|
|
||||||
import com.nu.modules.servicedirective.service.IConfigServiceDirectiveService;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.amqp.core.ExchangeTypes;
|
|
||||||
import org.springframework.amqp.rabbit.annotation.Exchange;
|
|
||||||
import org.springframework.amqp.rabbit.annotation.Queue;
|
|
||||||
import org.springframework.amqp.rabbit.annotation.QueueBinding;
|
|
||||||
import org.springframework.amqp.rabbit.annotation.RabbitListener;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
|
|
@ -27,8 +18,8 @@ public class DirectiveMQListener {
|
||||||
// private ISysConfigService sysConfigService;
|
// private ISysConfigService sysConfigService;
|
||||||
// @Autowired
|
// @Autowired
|
||||||
// private IMediaAsyncErrorLogService mediaAsyncErrorLogService;
|
// private IMediaAsyncErrorLogService mediaAsyncErrorLogService;
|
||||||
@Autowired
|
// @Autowired
|
||||||
private IConfigServiceDirectiveService directiveService;
|
// private IConfigServiceDirectiveService directiveService;
|
||||||
// @Autowired
|
// @Autowired
|
||||||
// private IDirectiveBodyTagService bodyTagService;
|
// private IDirectiveBodyTagService bodyTagService;
|
||||||
// @Autowired
|
// @Autowired
|
||||||
|
|
@ -39,25 +30,7 @@ public class DirectiveMQListener {
|
||||||
// private IConfigServiceTypeService serviceTypeService;
|
// private IConfigServiceTypeService serviceTypeService;
|
||||||
// @Autowired
|
// @Autowired
|
||||||
// private RabbitMQUtil rabbitMQUtil;
|
// private RabbitMQUtil rabbitMQUtil;
|
||||||
|
//
|
||||||
@RabbitListener(
|
|
||||||
bindings = @QueueBinding(
|
|
||||||
value = @Queue(name = "#{directiveAsyncDQNP.getAuditResultQueueName()}"),
|
|
||||||
exchange = @Exchange(name = "hldy.directive", type = ExchangeTypes.DIRECT),
|
|
||||||
key = "#{directiveAsyncDQNP.getAuditResultKeyName()}"
|
|
||||||
),
|
|
||||||
errorHandler = "directiveMQErrorHandler"
|
|
||||||
)
|
|
||||||
public void handleMessage(DirectiveAsyncMQDto dto) {
|
|
||||||
//将字典项更新为已授权
|
|
||||||
directiveService.auditPass(dto);
|
|
||||||
//更新服务指令状态
|
|
||||||
ConfigServiceDirective configServiceDirective = new ConfigServiceDirective();
|
|
||||||
configServiceDirective.setId(dto.getId());
|
|
||||||
configServiceDirective.setStatus(dto.getStatus());
|
|
||||||
directiveService.updateById(configServiceDirective);
|
|
||||||
}
|
|
||||||
|
|
||||||
// /**
|
// /**
|
||||||
// * if 未到运营开始时间时 全量变更
|
// * if 未到运营开始时间时 全量变更
|
||||||
// * else 增量
|
// * else 增量
|
||||||
|
|
|
||||||
|
|
@ -25,18 +25,4 @@ public class DynamicQueueNameProvider {
|
||||||
public String getKeyName() {
|
public String getKeyName() {
|
||||||
return getQueueName();
|
return getQueueName();
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getAuditResultQueueName() {
|
|
||||||
JSONObject deptInfo = sysBaseAPI.getDeptInfo();
|
|
||||||
String orgCode = deptInfo.getString("code");
|
|
||||||
if (StringUtils.isNotBlank(orgCode)) {
|
|
||||||
return orgCode + ".directive.auditresult";
|
|
||||||
} else {
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getAuditResultKeyName() {
|
|
||||||
return getAuditResultQueueName();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue