添加按照员工查询标签
This commit is contained in:
parent
175a1fa99c
commit
f11bb84856
|
@ -0,0 +1,178 @@
|
||||||
|
package com.nu.modules.bizEmployeesInfo.controller;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
import java.net.URLDecoder;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import org.jeecg.common.api.vo.Result;
|
||||||
|
import org.jeecg.common.system.query.QueryGenerator;
|
||||||
|
import org.jeecg.common.system.query.QueryRuleEnum;
|
||||||
|
import org.jeecg.common.util.oConvertUtils;
|
||||||
|
import com.nu.modules.bizEmployeesInfo.entity.NuBizEmployeesServcieTags;
|
||||||
|
import com.nu.modules.bizEmployeesInfo.service.INuBizEmployeesServcieTagsService;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||||
|
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||||
|
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||||
|
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||||
|
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||||
|
import org.jeecg.common.system.base.controller.JeecgController;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||||
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 员工配置的服务标签
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-04-01
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Api(tags="员工配置的服务标签")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/bizEmployeesInfo/nuBizEmployeesServcieTags")
|
||||||
|
@Slf4j
|
||||||
|
public class NuBizEmployeesServcieTagsController extends JeecgController<NuBizEmployeesServcieTags, INuBizEmployeesServcieTagsService> {
|
||||||
|
@Autowired
|
||||||
|
private INuBizEmployeesServcieTagsService nuBizEmployeesServcieTagsService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页列表查询
|
||||||
|
*
|
||||||
|
* @param nuBizEmployeesServcieTags
|
||||||
|
* @param pageNo
|
||||||
|
* @param pageSize
|
||||||
|
* @param req
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@AutoLog(value = "员工配置的服务标签-分页列表查询")
|
||||||
|
@ApiOperation(value="员工配置的服务标签-分页列表查询", notes="员工配置的服务标签-分页列表查询")
|
||||||
|
@GetMapping(value = "/list")
|
||||||
|
public Result<IPage<NuBizEmployeesServcieTags>> queryPageList(NuBizEmployeesServcieTags nuBizEmployeesServcieTags,
|
||||||
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||||
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
QueryWrapper<NuBizEmployeesServcieTags> queryWrapper = QueryGenerator.initQueryWrapper(nuBizEmployeesServcieTags, req.getParameterMap());
|
||||||
|
Page<NuBizEmployeesServcieTags> page = new Page<NuBizEmployeesServcieTags>(pageNo, pageSize);
|
||||||
|
IPage<NuBizEmployeesServcieTags> pageList = nuBizEmployeesServcieTagsService.page(page, queryWrapper);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加
|
||||||
|
*
|
||||||
|
* @param nuBizEmployeesServcieTags
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "员工配置的服务标签-添加")
|
||||||
|
@ApiOperation(value="员工配置的服务标签-添加", notes="员工配置的服务标签-添加")
|
||||||
|
@PostMapping(value = "/add")
|
||||||
|
public Result<String> add(@RequestBody NuBizEmployeesServcieTags nuBizEmployeesServcieTags) {
|
||||||
|
nuBizEmployeesServcieTagsService.save(nuBizEmployeesServcieTags);
|
||||||
|
return Result.OK("添加成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*
|
||||||
|
* @param nuBizEmployeesServcieTags
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "员工配置的服务标签-编辑")
|
||||||
|
@ApiOperation(value="员工配置的服务标签-编辑", notes="员工配置的服务标签-编辑")
|
||||||
|
@RequiresPermissions("bizEmployeesInfo:nu_biz_employees_servcie_tags:edit")
|
||||||
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||||
|
public Result<String> edit(@RequestBody NuBizEmployeesServcieTags nuBizEmployeesServcieTags) {
|
||||||
|
nuBizEmployeesServcieTagsService.updateById(nuBizEmployeesServcieTags);
|
||||||
|
return Result.OK("编辑成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "员工配置的服务标签-通过id删除")
|
||||||
|
@ApiOperation(value="员工配置的服务标签-通过id删除", notes="员工配置的服务标签-通过id删除")
|
||||||
|
@DeleteMapping(value = "/delete")
|
||||||
|
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||||
|
nuBizEmployeesServcieTagsService.removeById(id);
|
||||||
|
return Result.OK("删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "员工配置的服务标签-批量删除")
|
||||||
|
@ApiOperation(value="员工配置的服务标签-批量删除", notes="员工配置的服务标签-批量删除")
|
||||||
|
@RequiresPermissions("bizEmployeesInfo:nu_biz_employees_servcie_tags:deleteBatch")
|
||||||
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
|
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||||
|
this.nuBizEmployeesServcieTagsService.removeByIds(Arrays.asList(ids.split(",")));
|
||||||
|
return Result.OK("批量删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@AutoLog(value = "员工配置的服务标签-通过id查询")
|
||||||
|
@ApiOperation(value="员工配置的服务标签-通过id查询", notes="员工配置的服务标签-通过id查询")
|
||||||
|
@GetMapping(value = "/queryById")
|
||||||
|
public Result<NuBizEmployeesServcieTags> queryById(@RequestParam(name="id",required=true) String id) {
|
||||||
|
NuBizEmployeesServcieTags nuBizEmployeesServcieTags = nuBizEmployeesServcieTagsService.getById(id);
|
||||||
|
if(nuBizEmployeesServcieTags==null) {
|
||||||
|
return Result.error("未找到对应数据");
|
||||||
|
}
|
||||||
|
return Result.OK(nuBizEmployeesServcieTags);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出excel
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param nuBizEmployeesServcieTags
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("bizEmployeesInfo:nu_biz_employees_servcie_tags:exportXls")
|
||||||
|
@RequestMapping(value = "/exportXls")
|
||||||
|
public ModelAndView exportXls(HttpServletRequest request, NuBizEmployeesServcieTags nuBizEmployeesServcieTags) {
|
||||||
|
return super.exportXls(request, nuBizEmployeesServcieTags, NuBizEmployeesServcieTags.class, "员工配置的服务标签");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过excel导入数据
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param response
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("bizEmployeesInfo:nu_biz_employees_servcie_tags:importExcel")
|
||||||
|
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||||
|
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||||
|
return super.importExcel(request, response, NuBizEmployeesServcieTags.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,68 @@
|
||||||
|
package com.nu.modules.bizEmployeesInfo.entity;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||||
|
import org.jeecg.common.constant.ProvinceCityArea;
|
||||||
|
import org.jeecg.common.util.SpringContextUtils;
|
||||||
|
import lombok.Data;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
|
import org.jeecg.common.aspect.annotation.Dict;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 员工配置的服务标签
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-04-01
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("nu_biz_employees_servcie_tags")
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@ApiModel(value="nu_biz_employees_servcie_tags对象", description="员工配置的服务标签")
|
||||||
|
public class NuBizEmployeesServcieTags implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**id*/
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
@ApiModelProperty(value = "id")
|
||||||
|
private java.lang.String id;
|
||||||
|
/**员工id*/
|
||||||
|
@Excel(name = "员工id", width = 15)
|
||||||
|
@ApiModelProperty(value = "员工id")
|
||||||
|
private java.lang.String employeesId;
|
||||||
|
/**标签id*/
|
||||||
|
@Excel(name = "标签id", width = 15)
|
||||||
|
@ApiModelProperty(value = "标签id")
|
||||||
|
private java.lang.String tagsId;
|
||||||
|
/**创建人*/
|
||||||
|
@ApiModelProperty(value = "创建人")
|
||||||
|
private java.lang.String createBy;
|
||||||
|
/**创建日期*/
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
@ApiModelProperty(value = "创建日期")
|
||||||
|
private java.util.Date createTime;
|
||||||
|
/**更新人*/
|
||||||
|
@ApiModelProperty(value = "更新人")
|
||||||
|
private java.lang.String updateBy;
|
||||||
|
/**更新日期*/
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
@ApiModelProperty(value = "更新日期")
|
||||||
|
private java.util.Date updateTime;
|
||||||
|
/**所属部门*/
|
||||||
|
@ApiModelProperty(value = "所属部门")
|
||||||
|
private java.lang.String sysOrgCode;
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
package com.nu.modules.bizEmployeesInfo.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import com.nu.modules.bizEmployeesInfo.entity.NuBizEmployeesServcieTags;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 员工配置的服务标签
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-04-01
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface NuBizEmployeesServcieTagsMapper extends BaseMapper<NuBizEmployeesServcieTags> {
|
||||||
|
|
||||||
|
}
|
|
@ -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.bizEmployeesInfo.mapper.NuBizEmployeesServcieTagsMapper">
|
||||||
|
|
||||||
|
</mapper>
|
|
@ -0,0 +1,14 @@
|
||||||
|
package com.nu.modules.bizEmployeesInfo.service;
|
||||||
|
|
||||||
|
import com.nu.modules.bizEmployeesInfo.entity.NuBizEmployeesServcieTags;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 员工配置的服务标签
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-04-01
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface INuBizEmployeesServcieTagsService extends IService<NuBizEmployeesServcieTags> {
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
package com.nu.modules.bizEmployeesInfo.service.impl;
|
||||||
|
|
||||||
|
import com.nu.modules.bizEmployeesInfo.entity.NuBizEmployeesServcieTags;
|
||||||
|
import com.nu.modules.bizEmployeesInfo.mapper.NuBizEmployeesServcieTagsMapper;
|
||||||
|
import com.nu.modules.bizEmployeesInfo.service.INuBizEmployeesServcieTagsService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 员工配置的服务标签
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-04-01
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class NuBizEmployeesServcieTagsServiceImpl extends ServiceImpl<NuBizEmployeesServcieTagsMapper, NuBizEmployeesServcieTags> implements INuBizEmployeesServcieTagsService {
|
||||||
|
|
||||||
|
}
|
|
@ -152,6 +152,9 @@ public class ConfigServiceDirective implements Serializable {
|
||||||
//服务类型名称
|
//服务类型名称
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String typeName;
|
private String typeName;
|
||||||
|
//服务类型名称
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String tagsName;
|
||||||
|
|
||||||
//服务指令标签
|
//服务指令标签
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
|
|
|
@ -175,4 +175,27 @@ public class ServiceTagController extends JeecgController<ServiceTag, IServiceTa
|
||||||
return super.importExcel(request, response, ServiceTag.class);
|
return super.importExcel(request, response, ServiceTag.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取服务标签列表根据员工id
|
||||||
|
*
|
||||||
|
* @param serviceTag
|
||||||
|
* @param pageNo
|
||||||
|
* @param pageSize
|
||||||
|
* @param req
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/getEmployeesList")
|
||||||
|
public Result<IPage<ServiceTag>> getEmployeesList(ServiceTag serviceTag,
|
||||||
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
Map<String, QueryRuleEnum> customeRuleMap = new HashMap<>();
|
||||||
|
QueryWrapper<ServiceTag> queryWrapper = QueryGenerator.initQueryWrapper(serviceTag, req.getParameterMap(),customeRuleMap);
|
||||||
|
Page<ServiceTag> page = new Page<ServiceTag>(pageNo, pageSize);
|
||||||
|
IPage<ServiceTag> pageList = serviceTagService.getEmployeesList(page, queryWrapper);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,4 +74,10 @@ public class ServiceTag implements Serializable {
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private List<ConfigServiceDirective> directives;
|
private List<ConfigServiceDirective> directives;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String employeesTagsId;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String employeesId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
package com.nu.modules.servicetag.mapper;
|
package com.nu.modules.servicetag.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.nu.modules.servicetag.entity.ServiceTag;
|
import com.nu.modules.servicetag.entity.ServiceTag;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
@ -21,4 +25,6 @@ public interface ServiceTagMapper extends BaseMapper<ServiceTag> {
|
||||||
List<ServiceTag> queryList( @Param("serviceTag") ServiceTag serviceTag,@Param("ids") List<ServiceTag> ids);
|
List<ServiceTag> queryList( @Param("serviceTag") ServiceTag serviceTag,@Param("ids") List<ServiceTag> ids);
|
||||||
|
|
||||||
Long queryTotal(@Param("serviceTag") ServiceTag serviceTag);
|
Long queryTotal(@Param("serviceTag") ServiceTag serviceTag);
|
||||||
|
|
||||||
|
IPage<ServiceTag> getEmployeesList(Page<ServiceTag> page, @Param(Constants.WRAPPER) QueryWrapper<ServiceTag> queryWrapper);
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
<result property="sysOrgCode" column="directive_sys_org_code" />
|
<result property="sysOrgCode" column="directive_sys_org_code" />
|
||||||
<result property="mp3File" column="mp3_file" />
|
<result property="mp3File" column="mp3_file" />
|
||||||
<result property="mp4File" column="mp4_file" />
|
<result property="mp4File" column="mp4_file" />
|
||||||
|
<result property="tagsName" column="tags_name" />
|
||||||
<result property="categoryName" column="csc_category_name" />
|
<result property="categoryName" column="csc_category_name" />
|
||||||
<result property="typeName" column="cst_type_name" />
|
<result property="typeName" column="cst_type_name" />
|
||||||
<result property="previewFile" column="preview_file"/>
|
<result property="previewFile" column="preview_file"/>
|
||||||
|
@ -95,16 +96,7 @@
|
||||||
csd.mp4_file,
|
csd.mp4_file,
|
||||||
csd.preview_file,
|
csd.preview_file,
|
||||||
csd.immediate_file,
|
csd.immediate_file,
|
||||||
cdt.id AS tag_id,
|
cdt.tag_name as tags_name,
|
||||||
cdt.tag_name,
|
|
||||||
cdt.sort AS tag_sort,
|
|
||||||
cdt.iz_enabled AS tag_iz_enabled,
|
|
||||||
cdt.del_flag AS tag_del_flag,
|
|
||||||
cdt.create_by AS tag_create_by,
|
|
||||||
cdt.create_time AS tag_create_time,
|
|
||||||
cdt.update_by AS tag_update_by,
|
|
||||||
cdt.update_time AS tag_update_time,
|
|
||||||
cdt.sys_org_code AS tag_sys_org_code,
|
|
||||||
csc.category_name AS csc_category_name,
|
csc.category_name AS csc_category_name,
|
||||||
cst.type_name AS cst_type_name
|
cst.type_name AS cst_type_name
|
||||||
FROM
|
FROM
|
||||||
|
@ -117,8 +109,11 @@
|
||||||
</where>) dp
|
</where>) dp
|
||||||
LEFT JOIN nu_servtag_directive sd ON dp.id = sd.tag_id
|
LEFT JOIN nu_servtag_directive sd ON dp.id = sd.tag_id
|
||||||
LEFT JOIN nu_config_service_directive csd ON sd.directive_id = csd.id
|
LEFT JOIN nu_config_service_directive csd ON sd.directive_id = csd.id
|
||||||
LEFT JOIN nu_directive_tag dt ON csd.id = dt.directive_id
|
LEFT JOIN (
|
||||||
LEFT JOIN nu_config_directive_tag cdt ON dt.tag_id = cdt.id
|
select GROUP_CONCAT(c.tag_name) tag_name,b.directive_id from nu_directive_tag b
|
||||||
|
LEFT JOIN nu_config_directive_tag c on b.tag_id = c.id
|
||||||
|
GROUP BY b.directive_id
|
||||||
|
) cdt on csd.id = cdt.directive_id
|
||||||
LEFT JOIN nu_config_service_category csc ON csd.category_id = csc.id
|
LEFT JOIN nu_config_service_category csc ON csd.category_id = csc.id
|
||||||
LEFT JOIN nu_config_service_type cst ON csd.type_id = cst.id
|
LEFT JOIN nu_config_service_type cst ON csd.type_id = cst.id
|
||||||
order by dp.create_time desc
|
order by dp.create_time desc
|
||||||
|
@ -150,4 +145,16 @@
|
||||||
(#{tag.id}, #{directive.id}, #{directive.sort})
|
(#{tag.id}, #{directive.id}, #{directive.sort})
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<select id="getEmployeesList" resultType="com.nu.modules.servicetag.entity.ServiceTag">
|
||||||
|
select * from (
|
||||||
|
select nst.id ,nst.tag_name ,nst.description ,nst.sort,ifnull(est.id,'0') as employeesTagsId,nst.iz_enabled,nst.del_flag,nst.create_time,est.employees_id from nu_service_tag nst
|
||||||
|
LEFT JOIN nu_biz_employees_servcie_tags est on nst.id = est.tags_id
|
||||||
|
) a
|
||||||
|
${ew.customSqlSegment}
|
||||||
|
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
package com.nu.modules.servicetag.service;
|
package com.nu.modules.servicetag.service;
|
||||||
|
|
||||||
|
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.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.nu.modules.servicetag.entity.ServiceTag;
|
import com.nu.modules.servicetag.entity.ServiceTag;
|
||||||
|
|
||||||
|
@ -21,4 +23,6 @@ public interface IServiceTagService extends IService<ServiceTag> {
|
||||||
void queryList(ServiceTag serviceTag, IPage<ServiceTag> pageList);
|
void queryList(ServiceTag serviceTag, IPage<ServiceTag> pageList);
|
||||||
|
|
||||||
ServiceTag queryById(String id);
|
ServiceTag queryById(String id);
|
||||||
|
|
||||||
|
IPage<ServiceTag> getEmployeesList(Page<ServiceTag> page, QueryWrapper<ServiceTag> queryWrapper);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
package com.nu.modules.servicetag.service.impl;
|
package com.nu.modules.servicetag.service.impl;
|
||||||
|
|
||||||
|
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.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.nu.modules.servicetag.entity.ServiceTag;
|
import com.nu.modules.servicetag.entity.ServiceTag;
|
||||||
|
@ -40,4 +42,10 @@ public class ServiceTagServiceImpl extends ServiceImpl<ServiceTagMapper, Service
|
||||||
return serviceTags.stream().findFirst().orElse(null);
|
return serviceTags.stream().findFirst().orElse(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IPage<ServiceTag> getEmployeesList(Page<ServiceTag> page, QueryWrapper<ServiceTag> queryWrapper) {
|
||||||
|
queryWrapper.eq("iz_enabled","0");
|
||||||
|
return baseMapper.getEmployeesList(page,queryWrapper);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue