1)去除标准指令库、差异比对、差异指令功能
2)去除所有标准指令库概念先关操作及代码逻辑 3)任一机构均可创建任意分类标签、服务类别、服务类型、服务指令以及编辑任意字段 4)新增镜像码管理功能:未生成镜像码机构自动生成镜像码,可更新镜像码,更新后旧的镜像码将失效;可通过复制按钮快速复制镜像码 5)新增服务指令库功能:需要先输入周正确的镜像码后,可查看对应机构所有服务指令,并可“镜像”到本机构中,如果分类标签、服务类别、服务类型、服务名称汉字完全一致,则认定为同一服务指令,不会重复镜像
This commit is contained in:
parent
e4058da047
commit
be7f0052b7
|
|
@ -0,0 +1,67 @@
|
|||
package com.nu.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: 服务指令操作日志详情表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-12-22
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
public class DirectiveOpeLogInfoMQDto implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
private String id;
|
||||
/**nu_config_directive_ope_log_main.id*/
|
||||
private String pkId;
|
||||
/**分类标签*/
|
||||
private String instructionTagId;
|
||||
/**分类标签名称*/
|
||||
private String instructionTagName;
|
||||
/**服务类别id*/
|
||||
private String categoryId;
|
||||
/**服务类别名称*/
|
||||
private String categoryName;
|
||||
/**服务类型id*/
|
||||
private String typeId;
|
||||
/**服务类型名称*/
|
||||
private String typeName;
|
||||
/**服务指令id*/
|
||||
private String directiveId;
|
||||
/**服务指令名称*/
|
||||
private String directiveName;
|
||||
/**收费价格*/
|
||||
private BigDecimal tollPrice;
|
||||
/**提成价格*/
|
||||
private BigDecimal comPrice;
|
||||
/**周期类型 1日常护理 2周期护理 3即时护理*/
|
||||
private String cycleType;
|
||||
/**服务说明*/
|
||||
private String serviceContent;
|
||||
/**服务时长(分钟)*/
|
||||
private String serviceDuration;
|
||||
/**所属部门*/
|
||||
private String sysOrgCode;
|
||||
/**语音文件*/
|
||||
private String mp3File;
|
||||
/**视频文件*/
|
||||
private String mp4File;
|
||||
/**服务指令图片大图*/
|
||||
private String previewFile;
|
||||
/**服务指令图片小图*/
|
||||
private String previewFileSmall;
|
||||
/**即时指令图片*/
|
||||
private String immediateFile;
|
||||
/**即时指令焦点图片*/
|
||||
private String immediateFileFocus;
|
||||
/**创建日期*/
|
||||
private Date createTime;
|
||||
/**数据类型 1修改前 2修改后*/
|
||||
private String dataType;
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
package com.nu.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 服务指令操作日志主表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-12-22
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
public class DirectiveOpeLogMainMQDto implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
private String id;
|
||||
/**机构编码*/
|
||||
private String orgCode;
|
||||
/**操作类型 1新增 2修改*/
|
||||
private String opeType;
|
||||
/**操作人*/
|
||||
private String createBy;
|
||||
/**操作日期*/
|
||||
private Date createTime;
|
||||
/**分类标签名称*/
|
||||
private String instructionTagName;
|
||||
/**服务类别名称*/
|
||||
private String categoryName;
|
||||
/**服务类型名称*/
|
||||
private String typeName;
|
||||
/**服务指令名称*/
|
||||
private String directiveName;
|
||||
/**周期类型名称*/
|
||||
private String cycleTypeName;
|
||||
|
||||
private List<DirectiveOpeLogInfoMQDto> opeInfoList;
|
||||
}
|
||||
|
|
@ -8,6 +8,8 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.nu.dto.DirectiveAsyncMQDto;
|
||||
import com.nu.dto.DirectiveOpeLogInfoMQDto;
|
||||
import com.nu.dto.DirectiveOpeLogMainMQDto;
|
||||
import com.nu.modules.config.canadddirective.entity.CanAddDirective;
|
||||
import com.nu.modules.config.canadddirective.service.ICanAddDirectiveService;
|
||||
import com.nu.modules.config.servicedirective.entity.ConfigServiceDirective;
|
||||
|
|
@ -19,12 +21,14 @@ import io.swagger.annotations.ApiOperation;
|
|||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.compress.utils.Lists;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
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.query.QueryGenerator;
|
||||
import org.jeecg.common.system.query.QueryRuleEnum;
|
||||
import org.jeecg.common.system.vo.LoginUser;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
|
|
@ -283,13 +287,58 @@ public class ConfigServiceDirectiveController extends JeecgController<ConfigServ
|
|||
configServiceDirectiveService.removeEmotionTags(configServiceDirective);
|
||||
}
|
||||
|
||||
//同步给管理平台
|
||||
//同步给管理平台 - 操作日志
|
||||
{
|
||||
DirectiveAsyncMQDto directiveAsyncMQDto = new DirectiveAsyncMQDto();
|
||||
BeanUtils.copyProperties(configServiceDirective, directiveAsyncMQDto);
|
||||
rabbitMQUtil.sendToExchange("hldy.directive", "hldy.directive.newadd", directiveAsyncMQDto);
|
||||
}
|
||||
|
||||
//操作日志
|
||||
{
|
||||
String opeId = IdUtil.simpleUUID();//本次操作主表id
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();//操作人信息
|
||||
DirectiveOpeLogMainMQDto mainMQDto = new DirectiveOpeLogMainMQDto();
|
||||
mainMQDto.setId(opeId);
|
||||
mainMQDto.setOrgCode(deptInfo.getString("code"));
|
||||
mainMQDto.setOpeType("1");//1-新增
|
||||
mainMQDto.setCreateBy(sysUser.getRealname());
|
||||
mainMQDto.setCreateTime(new Date());
|
||||
mainMQDto.setInstructionTagName(configServiceDirective.getInstructionName());//分类标签名称
|
||||
mainMQDto.setCategoryName(configServiceDirective.getCategoryName());//服务类别名称
|
||||
mainMQDto.setTypeName(configServiceDirective.getTypeName());//服务类型名称
|
||||
mainMQDto.setDirectiveName(configServiceDirective.getDirectiveName());//服务指令名称
|
||||
mainMQDto.setCycleTypeName(configServiceDirective.getCycleTypeName());//周期类型名称
|
||||
|
||||
List<DirectiveOpeLogInfoMQDto> infoList = Lists.newArrayList();
|
||||
DirectiveOpeLogInfoMQDto info = new DirectiveOpeLogInfoMQDto();
|
||||
info.setPkId(opeId);//主表id
|
||||
info.setInstructionTagId(configServiceDirective.getInstructionTagId());//分类标签ID
|
||||
info.setInstructionTagName(configServiceDirective.getInstructionName());//分类标签名称
|
||||
info.setCategoryId(configServiceDirective.getCategoryId());//服务类别id
|
||||
info.setCategoryName(configServiceDirective.getCategoryName());//服务类别名称
|
||||
info.setTypeId(configServiceDirective.getTypeId());//服务类型ID
|
||||
info.setTypeName(configServiceDirective.getTypeName());//服务类型名称
|
||||
info.setDirectiveId(configServiceDirective.getId());//服务指令ID
|
||||
info.setDirectiveName(configServiceDirective.getDirectiveName());//服务指令名称
|
||||
info.setTollPrice(configServiceDirective.getTollPrice());//收费价格
|
||||
info.setComPrice(configServiceDirective.getComPrice());//提成价格
|
||||
info.setCycleType(configServiceDirective.getCycleType());//周期类型
|
||||
info.setServiceContent(configServiceDirective.getServiceContent());//服务说明
|
||||
info.setServiceDuration(configServiceDirective.getServiceDuration());//服务时长
|
||||
info.setSysOrgCode(configServiceDirective.getSysOrgCode());//所属部门
|
||||
info.setMp3File(configServiceDirective.getMp3File());//语音文件
|
||||
info.setMp4File(configServiceDirective.getMp4File());//视频文件
|
||||
info.setPreviewFile(configServiceDirective.getPreviewFile());//服务指令图片大图
|
||||
info.setPreviewFileSmall(configServiceDirective.getPreviewFileSmall());//服务指令图片小图
|
||||
info.setImmediateFile(configServiceDirective.getImmediateFile());//即时指令图片
|
||||
info.setImmediateFileFocus(configServiceDirective.getImmediateFileFocus());//即时指令焦点图片
|
||||
info.setCreateTime(new Date());//创建日期
|
||||
infoList.add(info);
|
||||
mainMQDto.setOpeInfoList(infoList);
|
||||
rabbitMQUtil.sendToExchange("hldy.directive", "hldy.directive.ope", mainMQDto);
|
||||
}
|
||||
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
|
|
@ -350,6 +399,8 @@ public class ConfigServiceDirectiveController extends JeecgController<ConfigServ
|
|||
@ApiOperation(value = "服务指令-编辑", notes = "服务指令-编辑")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody ConfigServiceDirective configServiceDirective) {
|
||||
ConfigServiceDirective his = configServiceDirectiveService.queryTranslate(configServiceDirective.getId());
|
||||
|
||||
//处理媒体资源(放在保存方法之前)
|
||||
// configServiceDirectiveService.handleMediaFile(configServiceDirective);
|
||||
configServiceDirectiveService.updateById(configServiceDirective);
|
||||
|
|
@ -372,6 +423,106 @@ public class ConfigServiceDirectiveController extends JeecgController<ConfigServ
|
|||
// rabbitMQUtil.sendToExchange("hldy.directive", "hldy.directive.newadd", directiveAsyncMQDto);
|
||||
// }
|
||||
|
||||
//操作日志
|
||||
{
|
||||
JSONObject deptInfo = sysBaseAPI.getDeptInfo();
|
||||
String opeId = IdUtil.simpleUUID();//本次操作主表id
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();//操作人信息
|
||||
DirectiveOpeLogMainMQDto mainMQDto = new DirectiveOpeLogMainMQDto();
|
||||
mainMQDto.setId(opeId);
|
||||
mainMQDto.setOrgCode(deptInfo.getString("code"));
|
||||
mainMQDto.setOpeType("2");//2-变更
|
||||
mainMQDto.setCreateBy(sysUser.getRealname());
|
||||
mainMQDto.setCreateTime(new Date());
|
||||
mainMQDto.setInstructionTagName(configServiceDirective.getInstructionName());//分类标签名称
|
||||
mainMQDto.setCategoryName(configServiceDirective.getCategoryName());//服务类别名称
|
||||
mainMQDto.setTypeName(configServiceDirective.getTypeName());//服务类型名称
|
||||
mainMQDto.setDirectiveName(configServiceDirective.getDirectiveName());//服务指令名称
|
||||
mainMQDto.setCycleTypeName(configServiceDirective.getCycleTypeName());//周期类型名称
|
||||
|
||||
List<DirectiveOpeLogInfoMQDto> infoList = Lists.newArrayList();
|
||||
//修改前
|
||||
{
|
||||
DirectiveOpeLogInfoMQDto info = new DirectiveOpeLogInfoMQDto();
|
||||
info.setPkId(opeId);//主表id
|
||||
info.setInstructionTagId(his.getInstructionTagId());//分类标签ID
|
||||
info.setInstructionTagName(his.getInstructionName());//分类标签名称
|
||||
info.setCategoryId(his.getCategoryId());//服务类别id
|
||||
info.setCategoryName(his.getCategoryName());//服务类别名称
|
||||
info.setTypeId(his.getTypeId());//服务类型ID
|
||||
info.setTypeName(his.getTypeName());//服务类型名称
|
||||
info.setDirectiveId(his.getId());//服务指令ID
|
||||
info.setDirectiveName(his.getDirectiveName());//服务指令名称
|
||||
info.setTollPrice(his.getTollPrice());//收费价格
|
||||
info.setComPrice(his.getComPrice());//提成价格
|
||||
info.setCycleType(his.getCycleType());//周期类型
|
||||
info.setServiceContent(his.getServiceContent());//服务说明
|
||||
info.setServiceDuration(his.getServiceDuration());//服务时长
|
||||
info.setSysOrgCode(his.getSysOrgCode());//所属部门
|
||||
info.setMp3File(his.getMp3File());//语音文件
|
||||
info.setMp4File(his.getMp4File());//视频文件
|
||||
info.setPreviewFile(his.getPreviewFile());//服务指令图片大图
|
||||
info.setPreviewFileSmall(his.getPreviewFileSmall());//服务指令图片小图
|
||||
info.setImmediateFile(his.getImmediateFile());//即时指令图片
|
||||
info.setImmediateFileFocus(his.getImmediateFileFocus());//即时指令焦点图片
|
||||
info.setCreateTime(new Date());//创建日期
|
||||
info.setDataType("1");
|
||||
infoList.add(info);
|
||||
}
|
||||
//修改后
|
||||
{
|
||||
DirectiveOpeLogInfoMQDto info = new DirectiveOpeLogInfoMQDto();
|
||||
info.setPkId(opeId);//主表id
|
||||
info.setInstructionTagId(configServiceDirective.getInstructionTagId());//分类标签ID
|
||||
info.setInstructionTagName(configServiceDirective.getInstructionName());//分类标签名称
|
||||
info.setCategoryId(configServiceDirective.getCategoryId());//服务类别id
|
||||
info.setCategoryName(configServiceDirective.getCategoryName());//服务类别名称
|
||||
info.setTypeId(configServiceDirective.getTypeId());//服务类型ID
|
||||
info.setTypeName(configServiceDirective.getTypeName());//服务类型名称
|
||||
info.setDirectiveId(configServiceDirective.getId());//服务指令ID
|
||||
info.setDirectiveName(configServiceDirective.getDirectiveName());//服务指令名称
|
||||
info.setTollPrice(configServiceDirective.getTollPrice());//收费价格
|
||||
info.setComPrice(configServiceDirective.getComPrice());//提成价格
|
||||
info.setCycleType(configServiceDirective.getCycleType());//周期类型
|
||||
info.setServiceContent(configServiceDirective.getServiceContent());//服务说明
|
||||
info.setServiceDuration(configServiceDirective.getServiceDuration());//服务时长
|
||||
info.setSysOrgCode(his.getSysOrgCode());//所属部门
|
||||
info.setMp3File(configServiceDirective.getMp3File());//语音文件
|
||||
info.setMp4File(configServiceDirective.getMp4File());//视频文件
|
||||
info.setPreviewFile(configServiceDirective.getPreviewFile());//服务指令图片大图
|
||||
info.setPreviewFileSmall(configServiceDirective.getPreviewFileSmall());//服务指令图片小图
|
||||
info.setImmediateFile(configServiceDirective.getImmediateFile());//即时指令图片
|
||||
info.setImmediateFileFocus(configServiceDirective.getImmediateFileFocus());//即时指令焦点图片
|
||||
info.setCreateTime(new Date());//创建日期
|
||||
info.setDataType("2");
|
||||
infoList.add(info);
|
||||
}
|
||||
mainMQDto.setOpeInfoList(infoList);
|
||||
|
||||
boolean hasChanges = !Objects.equals(his.getInstructionTagId(), configServiceDirective.getInstructionTagId())
|
||||
|| !Objects.equals(his.getInstructionName(), configServiceDirective.getInstructionName())
|
||||
|| !Objects.equals(his.getCategoryId(), configServiceDirective.getCategoryId())
|
||||
|| !Objects.equals(his.getCategoryName(), configServiceDirective.getCategoryName())
|
||||
|| !Objects.equals(his.getTypeId(), configServiceDirective.getTypeId())
|
||||
|| !Objects.equals(his.getTypeName(), configServiceDirective.getTypeName())
|
||||
|| !Objects.equals(his.getDirectiveName(), configServiceDirective.getDirectiveName())
|
||||
|| !Objects.equals(his.getTollPrice(), configServiceDirective.getTollPrice())
|
||||
|| !Objects.equals(his.getComPrice(), configServiceDirective.getComPrice())
|
||||
|| !Objects.equals(his.getCycleType(), configServiceDirective.getCycleType())
|
||||
|| !Objects.equals(his.getServiceContent(), configServiceDirective.getServiceContent())
|
||||
|| !Objects.equals(his.getServiceDuration(), configServiceDirective.getServiceDuration())
|
||||
|| !Objects.equals(his.getMp3File(), configServiceDirective.getMp3File())
|
||||
|| !Objects.equals(his.getMp4File(), configServiceDirective.getMp4File())
|
||||
|| !Objects.equals(his.getPreviewFile(), configServiceDirective.getPreviewFile())
|
||||
|| !Objects.equals(his.getPreviewFileSmall(), configServiceDirective.getPreviewFileSmall())
|
||||
|| !Objects.equals(his.getImmediateFile(), configServiceDirective.getImmediateFile())
|
||||
|| !Objects.equals(his.getImmediateFileFocus(), configServiceDirective.getImmediateFileFocus());
|
||||
|
||||
if (hasChanges) {
|
||||
rabbitMQUtil.sendToExchange("hldy.directive", "hldy.directive.ope", mainMQDto);
|
||||
}
|
||||
}
|
||||
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -80,4 +80,6 @@ public interface ConfigServiceDirectiveMapper extends BaseMapper<ConfigServiceDi
|
|||
|
||||
//字典翻译成中文
|
||||
List<ConfigServiceDirective> queryAndTranslate(@Param("existIds") String[] existIds);
|
||||
|
||||
ConfigServiceDirective queryTranslate(@Param("id") String id);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -268,4 +268,22 @@
|
|||
</where>
|
||||
order by m.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="queryTranslate" resultType="com.nu.modules.config.servicedirective.entity.ConfigServiceDirective">
|
||||
select
|
||||
m.*,
|
||||
i.instruction_name as instructionName,
|
||||
c.category_name as categoryName,
|
||||
t.type_name as typeName,
|
||||
dic.dit as cycleTypeName
|
||||
from nu_config_service_directive m
|
||||
left join nu_config_service_instruction_tag i on m.instruction_tag_id = i.id
|
||||
left join nu_config_service_category c on m.category_id = c.id
|
||||
left join nu_config_service_type t on m.type_id = t.id
|
||||
left join (select di.item_value as diva, di.item_text as dit
|
||||
from sys_dict d
|
||||
left join sys_dict_item di on d.id = di.dict_id where d.dict_code = 'period_type') dic
|
||||
on m.cycle_type = dic.diva
|
||||
where m.id = #{id}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -76,4 +76,6 @@ public interface IConfigServiceDirectiveService extends IService<ConfigServiceDi
|
|||
String updateSyncCode(String orgCode);
|
||||
|
||||
String getOrgCodeBySyncCode(String syncCode);
|
||||
|
||||
ConfigServiceDirective queryTranslate(String id);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -807,4 +807,9 @@ public class ConfigServiceDirectiveServiceImpl extends ServiceImpl<ConfigService
|
|||
|
||||
return orgCode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConfigServiceDirective queryTranslate(String id) {
|
||||
return baseMapper.queryTranslate(id);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue