服务指令:1、分类标签加数据字典类型指定,2、类别、类型增加默认图片、动态图片组,3、服务指令树接口增加图片网络地址、网络标识字段。
This commit is contained in:
parent
31a03f9fca
commit
0b1d72c0dd
|
|
@ -27,7 +27,7 @@ public class NuConfigServiceCategoryController extends JeecgController<NuConfigS
|
||||||
private INuConfigServiceCategoryService nuConfigServiceCategoryService;
|
private INuConfigServiceCategoryService nuConfigServiceCategoryService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页列表查询
|
* 获取护理类服务器指令树
|
||||||
*
|
*
|
||||||
* @param nuConfigServiceCategory
|
* @param nuConfigServiceCategory
|
||||||
* @return
|
* @return
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,9 @@ public class NuConfigServiceCategory implements Serializable {
|
||||||
@Excel(name = "服务类别名称", width = 15)
|
@Excel(name = "服务类别名称", width = 15)
|
||||||
@ApiModelProperty(value = "服务类别名称")
|
@ApiModelProperty(value = "服务类别名称")
|
||||||
private java.lang.String categoryName;
|
private java.lang.String categoryName;
|
||||||
|
@Excel(name = "分类标签id", width = 15)
|
||||||
|
@ApiModelProperty(value = "分类标签id")
|
||||||
|
private java.lang.String instructionId;
|
||||||
/**排序*/
|
/**排序*/
|
||||||
@Excel(name = "排序", width = 15)
|
@Excel(name = "排序", width = 15)
|
||||||
@ApiModelProperty(value = "排序")
|
@ApiModelProperty(value = "排序")
|
||||||
|
|
@ -73,4 +76,14 @@ public class NuConfigServiceCategory implements Serializable {
|
||||||
/**所属部门*/
|
/**所属部门*/
|
||||||
@ApiModelProperty(value = "所属部门")
|
@ApiModelProperty(value = "所属部门")
|
||||||
private java.lang.String sysOrgCode;
|
private java.lang.String sysOrgCode;
|
||||||
|
/**网络标记,0为用pad本地静态图片,1为用网络图*/
|
||||||
|
@ApiModelProperty(value = "网络标记")
|
||||||
|
private java.lang.String netFlag;
|
||||||
|
/**默认图片*/
|
||||||
|
@ApiModelProperty(value = "默认图片")
|
||||||
|
private java.lang.String staticPath;
|
||||||
|
/**动画图片*/
|
||||||
|
@ApiModelProperty(value = "动画图片")
|
||||||
|
private java.lang.String animationPath;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -123,7 +123,16 @@ public class NuConfigServiceDirective implements Serializable {
|
||||||
@Excel(name = "视频文件", width = 15)
|
@Excel(name = "视频文件", width = 15)
|
||||||
@ApiModelProperty(value = "视频文件")
|
@ApiModelProperty(value = "视频文件")
|
||||||
private java.lang.String mp4File;
|
private java.lang.String mp4File;
|
||||||
|
/**
|
||||||
|
* 即时指令图标
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "即时指令图标")
|
||||||
|
private java.lang.String immediateFile;
|
||||||
|
/**
|
||||||
|
* 即时指令焦点图标
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "即时指令图标")
|
||||||
|
private java.lang.String immediateFileFocus;
|
||||||
//体型标签
|
//体型标签
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String bodyTagName;
|
private String bodyTagName;
|
||||||
|
|
|
||||||
|
|
@ -77,4 +77,13 @@ public class NuConfigServiceType implements Serializable {
|
||||||
/**所属部门*/
|
/**所属部门*/
|
||||||
@ApiModelProperty(value = "所属部门")
|
@ApiModelProperty(value = "所属部门")
|
||||||
private java.lang.String sysOrgCode;
|
private java.lang.String sysOrgCode;
|
||||||
|
/**网络标记,0为用pad本地静态图片,1为用网络图*/
|
||||||
|
@ApiModelProperty(value = "网络标记")
|
||||||
|
private java.lang.String netFlag;
|
||||||
|
/**默认图片*/
|
||||||
|
@ApiModelProperty(value = "默认图片")
|
||||||
|
private java.lang.String staticPath;
|
||||||
|
/**动画图片*/
|
||||||
|
@ApiModelProperty(value = "动画图片")
|
||||||
|
private java.lang.String animationPath;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,83 @@
|
||||||
|
package com.nu.modules.nuApiServiceCategory.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import org.jeecg.common.aspect.annotation.Dict;
|
||||||
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 服务指令-分类标签
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-07-10
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("nu_config_service_instruction_tag")
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
public class NuInstructionTag implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**id*/
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
@ApiModelProperty(value = "id")
|
||||||
|
private String id;
|
||||||
|
/**分类标签名称*/
|
||||||
|
@Excel(name = "分类标签名称", width = 15)
|
||||||
|
@ApiModelProperty(value = "分类标签名称")
|
||||||
|
private String instructionName;
|
||||||
|
@Excel(name = "分类标签类型", width = 15)
|
||||||
|
@ApiModelProperty(value = "分类标签类型")
|
||||||
|
private String instructionType;
|
||||||
|
/**排序*/
|
||||||
|
@Excel(name = "排序", width = 15)
|
||||||
|
@ApiModelProperty(value = "排序")
|
||||||
|
private Integer sort;
|
||||||
|
/**状态 0已授权 1未授权*/
|
||||||
|
@Excel(name = "状态 0已授权 1未授权", width = 15)
|
||||||
|
@ApiModelProperty(value = "状态 0已授权 1未授权")
|
||||||
|
@Dict(dicCode = "status")
|
||||||
|
private String status;
|
||||||
|
/**是否启用 0启用 1未启用*/
|
||||||
|
@Excel(name = "是否启用", width = 15)
|
||||||
|
@ApiModelProperty(value = "是否启用")
|
||||||
|
@Dict(dicCode = "iz_enabled")
|
||||||
|
private String izEnabled;
|
||||||
|
/**是否删除 0未删除 1删除*/
|
||||||
|
@Excel(name = "是否删除", width = 15)
|
||||||
|
@ApiModelProperty(value = "是否删除")
|
||||||
|
@TableLogic
|
||||||
|
private String delFlag;
|
||||||
|
/**创建人*/
|
||||||
|
@ApiModelProperty(value = "创建人")
|
||||||
|
private String createBy;
|
||||||
|
/**创建日期*/
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
@ApiModelProperty(value = "创建日期")
|
||||||
|
private Date createTime;
|
||||||
|
/**更新人*/
|
||||||
|
@ApiModelProperty(value = "更新人")
|
||||||
|
private String updateBy;
|
||||||
|
/**更新日期*/
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
@ApiModelProperty(value = "更新日期")
|
||||||
|
private Date updateTime;
|
||||||
|
/**所属部门*/
|
||||||
|
@ApiModelProperty(value = "所属部门")
|
||||||
|
private String sysOrgCode;
|
||||||
|
private String icon;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
package com.nu.modules.nuApiServiceCategory.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.nu.modules.nuApiServiceCategory.entity.NuConfigServiceType;
|
||||||
|
import com.nu.modules.nuApiServiceCategory.entity.NuInstructionTag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 分类标签
|
||||||
|
* @Author: caolei
|
||||||
|
* @Date: 2025-10-11
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface NuInstructionTagMapper extends BaseMapper<NuInstructionTag> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -26,6 +26,8 @@
|
||||||
csd.sys_org_code,
|
csd.sys_org_code,
|
||||||
csd.mp3_file,
|
csd.mp3_file,
|
||||||
csd.mp4_file,
|
csd.mp4_file,
|
||||||
|
csd.immediate_file as immediateFile,
|
||||||
|
csd.immediate_file_focus as immediateFileFocus,
|
||||||
cdt.tag_name as bodyTagName,
|
cdt.tag_name as bodyTagName,
|
||||||
cet.tag_name AS emotionTagName
|
cet.tag_name AS emotionTagName
|
||||||
FROM nu_config_service_directive csd
|
FROM nu_config_service_directive csd
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.nu.modules.nuApiServiceCategory.mapper.NuInstructionTagMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
package com.nu.modules.nuApiServiceCategory.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.nu.modules.nuApiServiceCategory.entity.NuInstructionTag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 分类标签
|
||||||
|
* @Author: caolei
|
||||||
|
* @Date: 2025-10-11
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface INuInstructionTagService extends IService<NuInstructionTag> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,14 +1,18 @@
|
||||||
package com.nu.modules.nuApiServiceCategory.service.impl;
|
package com.nu.modules.nuApiServiceCategory.service.impl;
|
||||||
|
|
||||||
|
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.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.nu.modules.nuApiServiceCategory.entity.NuConfigServiceCategory;
|
import com.nu.modules.nuApiServiceCategory.entity.NuConfigServiceCategory;
|
||||||
import com.nu.modules.nuApiServiceCategory.entity.NuConfigServiceDirective;
|
import com.nu.modules.nuApiServiceCategory.entity.NuConfigServiceDirective;
|
||||||
import com.nu.modules.nuApiServiceCategory.entity.NuConfigServiceType;
|
import com.nu.modules.nuApiServiceCategory.entity.NuConfigServiceType;
|
||||||
|
import com.nu.modules.nuApiServiceCategory.entity.NuInstructionTag;
|
||||||
import com.nu.modules.nuApiServiceCategory.mapper.NuConfigServiceCategoryMapper;
|
import com.nu.modules.nuApiServiceCategory.mapper.NuConfigServiceCategoryMapper;
|
||||||
import com.nu.modules.nuApiServiceCategory.service.INuConfigServiceCategoryService;
|
import com.nu.modules.nuApiServiceCategory.service.INuConfigServiceCategoryService;
|
||||||
import com.nu.modules.nuApiServiceCategory.service.INuConfigServiceDirectiveService;
|
import com.nu.modules.nuApiServiceCategory.service.INuConfigServiceDirectiveService;
|
||||||
import com.nu.modules.nuApiServiceCategory.service.INuConfigServiceTypeService;
|
import com.nu.modules.nuApiServiceCategory.service.INuConfigServiceTypeService;
|
||||||
|
import com.nu.modules.nuApiServiceCategory.service.INuInstructionTagService;
|
||||||
|
import com.nu.modules.sysconfig.ISysConfigApi;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
@ -27,12 +31,27 @@ import java.util.Map;
|
||||||
@Service
|
@Service
|
||||||
public class NuConfigServiceCategoryServiceImpl extends ServiceImpl<NuConfigServiceCategoryMapper, NuConfigServiceCategory> implements INuConfigServiceCategoryService {
|
public class NuConfigServiceCategoryServiceImpl extends ServiceImpl<NuConfigServiceCategoryMapper, NuConfigServiceCategory> implements INuConfigServiceCategoryService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private INuInstructionTagService nuInstructionTagService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private INuConfigServiceTypeService nuConfigServiceTypeService;
|
private INuConfigServiceTypeService nuConfigServiceTypeService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private INuConfigServiceDirectiveService nuConfigServiceDirectiveService;
|
private INuConfigServiceDirectiveService nuConfigServiceDirectiveService;
|
||||||
|
@Autowired
|
||||||
|
private ISysConfigApi sysConfigApi;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Map<String, Object>> getServiceTree(NuConfigServiceCategory nuConfigServiceCategory) {
|
public List<Map<String, Object>> getServiceTree(NuConfigServiceCategory nuConfigServiceCategory) {
|
||||||
|
//查询护理类服务
|
||||||
|
QueryWrapper<NuInstructionTag> instructionTagQueryWrapper = new QueryWrapper<>();
|
||||||
|
instructionTagQueryWrapper.eq("iz_enabled","0");
|
||||||
|
instructionTagQueryWrapper.eq("del_flag","0");
|
||||||
|
instructionTagQueryWrapper.eq("instruction_type","1");
|
||||||
|
List<NuInstructionTag> instructionTagList = nuInstructionTagService.list(instructionTagQueryWrapper);
|
||||||
|
Map<String,Object> tagMap = new HashMap<String,Object>();
|
||||||
|
for(NuInstructionTag par : instructionTagList){
|
||||||
|
tagMap.put(par.getId(),par.getInstructionName());
|
||||||
|
}
|
||||||
|
|
||||||
//查询服务类别数据
|
//查询服务类别数据
|
||||||
QueryWrapper<NuConfigServiceCategory> categoryQueryWrapper = new QueryWrapper<>();
|
QueryWrapper<NuConfigServiceCategory> categoryQueryWrapper = new QueryWrapper<>();
|
||||||
|
|
@ -59,19 +78,39 @@ public class NuConfigServiceCategoryServiceImpl extends ServiceImpl<NuConfigServ
|
||||||
if(StringUtils.equals(directicePar.getTypeId(),par.getId())){
|
if(StringUtils.equals(directicePar.getTypeId(),par.getId())){
|
||||||
Map<String,Object> directiceMap = new HashMap<String,Object>();
|
Map<String,Object> directiceMap = new HashMap<String,Object>();
|
||||||
directiceMap.put("id",directicePar.getId());
|
directiceMap.put("id",directicePar.getId());
|
||||||
directiceMap.put("levle","3");
|
|
||||||
directiceMap.put("title",directicePar.getDirectiveName());
|
directiceMap.put("title",directicePar.getDirectiveName());
|
||||||
directiceMap.put("serviceDuration",directicePar.getServiceDuration());
|
directiceMap.put("serviceDuration",directicePar.getServiceDuration());
|
||||||
directiceMap.put("tagName",directicePar.getBodyTagName());
|
directiceMap.put("tagName",directicePar.getBodyTagName());
|
||||||
directiceMap.put("bodyTagName",directicePar.getBodyTagName());
|
|
||||||
directiceMap.put("emotionTagName",directicePar.getEmotionTagName());
|
|
||||||
directiceMap.put("cycleType",directicePar.getCycleType());
|
directiceMap.put("cycleType",directicePar.getCycleType());
|
||||||
|
if(directicePar.getImmediateFile()!=null){
|
||||||
|
String immediateFile = getImageNetUrl(directicePar.getImmediateFile());
|
||||||
|
directiceMap.put("immediateFile",immediateFile);
|
||||||
|
}else{
|
||||||
|
directiceMap.put("immediateFile","");
|
||||||
|
}
|
||||||
|
if(directicePar.getImmediateFileFocus()!=null){
|
||||||
|
String immediateFileFocus = getImageNetUrl(directicePar.getImmediateFileFocus());
|
||||||
|
directiceMap.put("immediateFileFocus",immediateFileFocus);
|
||||||
|
}else{
|
||||||
|
directiceMap.put("immediateFileFocus","");
|
||||||
|
}
|
||||||
|
directiceMap.put("levle","3");
|
||||||
directiceMapList.add(directiceMap);
|
directiceMapList.add(directiceMap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
wllxMap.put("key",par.getId());
|
wllxMap.put("key",par.getId());
|
||||||
wllxMap.put("parentId",par.getCategoryId());
|
wllxMap.put("parentId",par.getCategoryId());
|
||||||
wllxMap.put("title",par.getTypeName());
|
wllxMap.put("title",par.getTypeName());
|
||||||
|
wllxMap.put("netFlag",par.getNetFlag());
|
||||||
|
List<String> imagePaths = new ArrayList<>();
|
||||||
|
if(par.getStaticPath()!=null){
|
||||||
|
String staticPath = getImageNetUrl(par.getStaticPath());
|
||||||
|
imagePaths.add(staticPath);
|
||||||
|
}
|
||||||
|
if(par.getAnimationPath()!=null){
|
||||||
|
getImageNetUrls(imagePaths,par.getAnimationPath());
|
||||||
|
}
|
||||||
|
wllxMap.put("animationPath",imagePaths);
|
||||||
wllxMap.put("levle","2");
|
wllxMap.put("levle","2");
|
||||||
wllxMap.put("children",directiceMapList);
|
wllxMap.put("children",directiceMapList);
|
||||||
typeMapList.add(wllxMap);
|
typeMapList.add(wllxMap);
|
||||||
|
|
@ -89,14 +128,65 @@ public class NuConfigServiceCategoryServiceImpl extends ServiceImpl<NuConfigServ
|
||||||
wllxMap2List.add(wllxPar);
|
wllxMap2List.add(wllxPar);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
infoMap.put("key",par.getId());
|
if(tagMap.get(par.getInstructionId())!=null){
|
||||||
infoMap.put("title",par.getCategoryName().substring(0,2));
|
|
||||||
infoMap.put("levle","1");
|
infoMap.put("key",par.getId());
|
||||||
infoMap.put("children",wllxMap2List);
|
infoMap.put("title",par.getCategoryName().substring(0,2));
|
||||||
treeList.add(infoMap);
|
infoMap.put("netFlag",par.getNetFlag());
|
||||||
|
List<String> imagePaths = new ArrayList<>();
|
||||||
|
if(par.getStaticPath()!=null){
|
||||||
|
String staticPath = getImageNetUrl(par.getStaticPath());
|
||||||
|
imagePaths.add(staticPath);
|
||||||
|
}
|
||||||
|
if(par.getAnimationPath()!=null){
|
||||||
|
getImageNetUrls(imagePaths,par.getAnimationPath());
|
||||||
|
}
|
||||||
|
infoMap.put("animationPath",imagePaths);
|
||||||
|
infoMap.put("levle","1");
|
||||||
|
infoMap.put("children",wllxMap2List);
|
||||||
|
treeList.add(infoMap);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return treeList;
|
return treeList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取管理平台静态资源路径
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private String getOpeMediaAddress(){
|
||||||
|
JSONObject json = sysConfigApi.getByKey("ope_media_address");
|
||||||
|
if(json!=null){
|
||||||
|
String configValue = json.getString("configValue");
|
||||||
|
if(!configValue.endsWith("/")){
|
||||||
|
configValue += "/";
|
||||||
|
}
|
||||||
|
return configValue;
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getImageNetUrl(String imageUrl){
|
||||||
|
String netUrl = "";
|
||||||
|
String configValue = getOpeMediaAddress();
|
||||||
|
if(!configValue.equals("")){
|
||||||
|
netUrl = configValue + imageUrl;
|
||||||
|
}
|
||||||
|
return netUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<String> getImageNetUrls(List<String> imagePaths,String imageUrl){
|
||||||
|
String configValue = getOpeMediaAddress();
|
||||||
|
if(!configValue.equals("")){
|
||||||
|
String[] urls = imageUrl.split(",");
|
||||||
|
for (String url : urls) {
|
||||||
|
if (!url.isEmpty()) {
|
||||||
|
String netUrl = configValue + url;
|
||||||
|
imagePaths.add(netUrl);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return imagePaths;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
package com.nu.modules.nuApiServiceCategory.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.nu.modules.nuApiServiceCategory.entity.NuInstructionTag;
|
||||||
|
import com.nu.modules.nuApiServiceCategory.mapper.NuInstructionTagMapper;
|
||||||
|
import com.nu.modules.nuApiServiceCategory.service.INuInstructionTagService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 分类标签
|
||||||
|
* @Author: caolei
|
||||||
|
* @Date: 2025-10-11
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class NuInstructionTagServiceImpl extends ServiceImpl<NuInstructionTagMapper, NuInstructionTag> implements INuInstructionTagService {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -42,4 +42,9 @@ public class CategoryMQDto implements Serializable {
|
||||||
* 是否删除 0未删除 1删除
|
* 是否删除 0未删除 1删除
|
||||||
*/
|
*/
|
||||||
private String delFlag;
|
private String delFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 动画图片
|
||||||
|
*/
|
||||||
|
private String animationPath;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,10 @@ public class InstructionTagMQDto implements Serializable {
|
||||||
* 分类标签名称
|
* 分类标签名称
|
||||||
*/
|
*/
|
||||||
private String instructionName;
|
private String instructionName;
|
||||||
|
/**
|
||||||
|
* 分类标签类型
|
||||||
|
*/
|
||||||
|
private String instructionType;
|
||||||
/**
|
/**
|
||||||
* 排序
|
* 排序
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,10 @@ public class InstructionTag implements Serializable {
|
||||||
@Excel(name = "分类标签名称", width = 15)
|
@Excel(name = "分类标签名称", width = 15)
|
||||||
@ApiModelProperty(value = "分类标签名称")
|
@ApiModelProperty(value = "分类标签名称")
|
||||||
private java.lang.String instructionName;
|
private java.lang.String instructionName;
|
||||||
|
@Excel(name = "分类标签类型", width = 15)
|
||||||
|
@ApiModelProperty(value = "分类标签类型")
|
||||||
|
@Dict(dicCode = "service_instruction_tag")
|
||||||
|
private java.lang.String instructionType;
|
||||||
/**排序*/
|
/**排序*/
|
||||||
@Excel(name = "排序", width = 15)
|
@Excel(name = "排序", width = 15)
|
||||||
@ApiModelProperty(value = "排序")
|
@ApiModelProperty(value = "排序")
|
||||||
|
|
|
||||||
|
|
@ -68,6 +68,22 @@ public class ConfigServiceCategoryController extends JeecgController<ConfigServi
|
||||||
return Result.OK(pageList);
|
return Result.OK(pageList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实体查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@AutoLog(value = "服务类别-分页列表查询")
|
||||||
|
@ApiOperation(value="服务类别-实体查询", notes="服务类别-实体查询")
|
||||||
|
@GetMapping(value = "/getInfo")
|
||||||
|
public Result<ConfigServiceCategory> getInfo(@RequestParam(name="id",required=true) String id) {
|
||||||
|
QueryWrapper<ConfigServiceCategory> queryWrapper = new QueryWrapper();
|
||||||
|
queryWrapper.eq("id",id);
|
||||||
|
ConfigServiceCategory entity = configServiceCategoryService.getOne(queryWrapper);
|
||||||
|
return Result.OK(entity);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加
|
* 添加
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -81,4 +81,13 @@ public class ConfigServiceCategory implements Serializable {
|
||||||
/**所属部门*/
|
/**所属部门*/
|
||||||
@ApiModelProperty(value = "所属部门")
|
@ApiModelProperty(value = "所属部门")
|
||||||
private java.lang.String sysOrgCode;
|
private java.lang.String sysOrgCode;
|
||||||
|
/**网络标记,0为用pad本地静态图片,1为用网络图*/
|
||||||
|
@ApiModelProperty(value = "网络标记")
|
||||||
|
private java.lang.String netFlag;
|
||||||
|
/**默认图片*/
|
||||||
|
@ApiModelProperty(value = "默认图片")
|
||||||
|
private java.lang.String staticPath;
|
||||||
|
/**动画图片*/
|
||||||
|
@ApiModelProperty(value = "动画图片")
|
||||||
|
private java.lang.String animationPath;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,4 +26,5 @@ public interface IConfigServiceCategoryService extends IService<ConfigServiceCat
|
||||||
List<ConfigServiceCategory> selectAll(String dataSourceCode, List<String> ids, List<String> excludeSubIds);
|
List<ConfigServiceCategory> selectAll(String dataSourceCode, List<String> ids, List<String> excludeSubIds);
|
||||||
|
|
||||||
void insertAll(List<ConfigServiceCategory> categoryList);
|
void insertAll(List<ConfigServiceCategory> categoryList);
|
||||||
|
void updateAll(List<ConfigServiceCategory> categoryList);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -76,4 +76,14 @@ public class ConfigServiceCategoryServiceImpl extends ServiceImpl<ConfigServiceC
|
||||||
baseMapper.insert(c);
|
baseMapper.insert(c);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateAll(List<ConfigServiceCategory> categoryList) {
|
||||||
|
categoryList.forEach(c -> {
|
||||||
|
ConfigServiceCategory entity = new ConfigServiceCategory();
|
||||||
|
entity.setId(c.getId());
|
||||||
|
entity.setAnimationPath(c.getAnimationPath());
|
||||||
|
baseMapper.updateById(entity);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -70,6 +70,22 @@ public class ConfigServiceTypeController extends JeecgController<ConfigServiceTy
|
||||||
return Result.OK(pageList);
|
return Result.OK(pageList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实体查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@AutoLog(value = "服务类型-分页列表查询")
|
||||||
|
@ApiOperation(value="服务类别-实体查询", notes="服务类别-实体查询")
|
||||||
|
@GetMapping(value = "/getInfo")
|
||||||
|
public Result<ConfigServiceType> getInfo(@RequestParam(name="id",required=true) String id) {
|
||||||
|
QueryWrapper<ConfigServiceType> queryWrapper = new QueryWrapper();
|
||||||
|
queryWrapper.eq("id",id);
|
||||||
|
ConfigServiceType entity = configServiceTypeService.getOne(queryWrapper);
|
||||||
|
return Result.OK(entity);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加
|
* 添加
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -86,4 +86,13 @@ public class ConfigServiceType implements Serializable {
|
||||||
/**所属部门*/
|
/**所属部门*/
|
||||||
@ApiModelProperty(value = "所属部门")
|
@ApiModelProperty(value = "所属部门")
|
||||||
private java.lang.String sysOrgCode;
|
private java.lang.String sysOrgCode;
|
||||||
|
/**网络标记,0为用pad本地静态图片,1为用网络图*/
|
||||||
|
@ApiModelProperty(value = "网络标记")
|
||||||
|
private java.lang.String netFlag;
|
||||||
|
/**默认图片*/
|
||||||
|
@ApiModelProperty(value = "默认图片")
|
||||||
|
private java.lang.String staticPath;
|
||||||
|
/**动画图片*/
|
||||||
|
@ApiModelProperty(value = "动画图片")
|
||||||
|
private java.lang.String animationPath;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -734,14 +734,20 @@ public class DirectiveMQListener {
|
||||||
|
|
||||||
//需要新增的数据
|
//需要新增的数据
|
||||||
List<ConfigServiceCategory> needAddData = Lists.newArrayList();
|
List<ConfigServiceCategory> needAddData = Lists.newArrayList();
|
||||||
|
List<ConfigServiceCategory> needUpdateData = Lists.newArrayList();
|
||||||
for (ConfigServiceCategory category : allData) {
|
for (ConfigServiceCategory category : allData) {
|
||||||
if (!existedIds.contains(category.getId())) {
|
if (!existedIds.contains(category.getId())) {
|
||||||
needAddData.add(category);
|
needAddData.add(category);
|
||||||
|
}else{
|
||||||
|
needUpdateData.add(category);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (needAddData != null && !needAddData.isEmpty()) {
|
if (needAddData != null && !needAddData.isEmpty()) {
|
||||||
serviceCategoryService.insertAll(needAddData);
|
serviceCategoryService.insertAll(needAddData);
|
||||||
}
|
}
|
||||||
|
if (needUpdateData != null && !needUpdateData.isEmpty()) {
|
||||||
|
serviceCategoryService.updateAll(needUpdateData);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//服务类型
|
//服务类型
|
||||||
if (dto.getTypeList() != null) {
|
if (dto.getTypeList() != null) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue