员工-服务指令 分配代码还原
This commit is contained in:
parent
35fa793efd
commit
ec6c5c6bf9
|
|
@ -0,0 +1,212 @@
|
|||
package com.nu.modules.employeesInfo.controller;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.ZoneId;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.apache.commons.compress.utils.Lists;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.api.ISysBaseAPI;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import com.nu.modules.employeesInfo.entity.NuBizEmployeesServcieTags;
|
||||
import com.nu.modules.employeesInfo.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.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
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;
|
||||
@Autowired
|
||||
private ISysBaseAPI sysBaseAPI;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @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 = "员工配置的服务标签-添加")
|
||||
// @RequiresPermissions("bizEmployeesInfo:nu_biz_employees_servcie_tags:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody NuBizEmployeesServcieTags nuBizEmployeesServcieTags) {
|
||||
nuBizEmployeesServcieTagsService.save(nuBizEmployeesServcieTags);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param saveDataList
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "服务标签-保存")
|
||||
@ApiOperation(value = "服务标签-保存", notes = "服务标签-保存")
|
||||
@PostMapping(value = "/addBatch")
|
||||
public Result<String> addBatch(@RequestBody List<NuBizEmployeesServcieTags> saveDataList) {
|
||||
String empId = saveDataList.get(0).getEmployeesId();
|
||||
JSONObject deptInfo = sysBaseAPI.getDeptInfo();
|
||||
String orgCode = deptInfo.getString("code");
|
||||
//先删再存
|
||||
nuBizEmployeesServcieTagsService.physicsDeleteByEmpId(empId);
|
||||
|
||||
if ("save".equals(saveDataList.get(0).getOptType())) {
|
||||
List<NuBizEmployeesServcieTags> saveData = Lists.newArrayList();
|
||||
|
||||
//解决排序问题
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
int secondsOffset = 0;
|
||||
for (NuBizEmployeesServcieTags item : saveDataList) {
|
||||
NuBizEmployeesServcieTags data = new NuBizEmployeesServcieTags();
|
||||
data.setEmployeesId(empId);
|
||||
data.setType(item.getType());
|
||||
data.setTagsId(item.getEmployeesTagsId());
|
||||
data.setSysOrgCode(orgCode);
|
||||
|
||||
data.setCreateTime(Date.from(now.plusSeconds(secondsOffset).atZone(ZoneId.systemDefault()).toInstant()));
|
||||
secondsOffset++;
|
||||
saveData.add(data);
|
||||
}
|
||||
|
||||
nuBizEmployeesServcieTagsService.saveBatch(saveData);
|
||||
}
|
||||
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删除")
|
||||
// @RequiresPermissions("bizEmployeesInfo:nu_biz_employees_servcie_tags:delete")
|
||||
@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,74 @@
|
|||
package com.nu.modules.employeesInfo.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
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_service_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;
|
||||
/**类型 bq:标签 zl:指令*/
|
||||
@Excel(name = "类型", width = 15)
|
||||
@ApiModelProperty(value = "类型")
|
||||
@Dict(dicCode = "emp_service_tag_type")
|
||||
private java.lang.String type;
|
||||
/**标签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;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String employeesTagsId;
|
||||
@TableField(exist = false)
|
||||
private String optType;
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package com.nu.modules.employeesInfo.mapper;
|
||||
|
||||
import com.nu.modules.employeesInfo.entity.NuBizEmployeesServcieTags;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* @Description: 员工配置的服务标签
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-04-01
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface NuBizEmployeesServcieTagsMapper extends BaseMapper<NuBizEmployeesServcieTags> {
|
||||
|
||||
int physicsDeleteByEmpId(@Param("empId") String employeesId);
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?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.employeesInfo.mapper.NuBizEmployeesServcieTagsMapper">
|
||||
|
||||
<delete id="physicsDeleteByEmpId">
|
||||
delete from nu_biz_employees_service_tags where employees_id = #{empId}
|
||||
</delete>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
package com.nu.modules.employeesInfo.service;
|
||||
|
||||
import com.nu.modules.employeesInfo.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> {
|
||||
|
||||
int physicsDeleteByEmpId(String employeesId);
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
package com.nu.modules.employeesInfo.service.impl;
|
||||
|
||||
import com.nu.modules.employeesInfo.entity.NuBizEmployeesServcieTags;
|
||||
import com.nu.modules.employeesInfo.mapper.NuBizEmployeesServcieTagsMapper;
|
||||
import com.nu.modules.employeesInfo.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 {
|
||||
|
||||
@Override
|
||||
public int physicsDeleteByEmpId(String employeesId) {
|
||||
return baseMapper.physicsDeleteByEmpId(employeesId);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
package com.nu.modules.config.servicetag.controller;
|
||||
|
||||
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.modules.config.servicetag.entity.ServiceTag;
|
||||
import com.nu.modules.config.servicetag.service.IServiceTagService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.system.query.QueryRuleEnum;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: 服务标签
|
||||
* @Author: 张明远
|
||||
* @Date: 2025-03-31
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags = "服务标签")
|
||||
@RestController
|
||||
@RequestMapping("/services/serviceTag/serviceTag")
|
||||
@Slf4j
|
||||
public class ServiceTagController extends JeecgController<ServiceTag, IServiceTagService> {
|
||||
@Autowired
|
||||
private IServiceTagService serviceTagService;
|
||||
|
||||
|
||||
|
||||
@GetMapping(value = "/getEmployeesServiceTags")
|
||||
public Result<List<ServiceTag>> getEmployeesServiceTags(ServiceTag serviceTag) {
|
||||
if (StringUtils.isEmpty(serviceTag.getEmployeesId())) {
|
||||
return Result.error("员工id不能为空");
|
||||
}
|
||||
List<ServiceTag> pageList = serviceTagService.getEmployeesServiceTags(serviceTag);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,86 @@
|
|||
package com.nu.modules.config.servicetag.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.nu.modules.config.servicedirective.entity.ConfigServiceDirective;
|
||||
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.List;
|
||||
|
||||
/**
|
||||
* @Description: 服务标签
|
||||
* @Author: 张明远
|
||||
* @Date: 2025-03-31
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("nu_service_tag_main")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="nu_service_tag对象", description="服务标签")
|
||||
public class ServiceTag 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 tagName;
|
||||
/**备注*/
|
||||
@Excel(name = "备注", width = 15)
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String description;
|
||||
/**排序*/
|
||||
@Excel(name = "排序", width = 15)
|
||||
@ApiModelProperty(value = "排序")
|
||||
private Integer sort;
|
||||
/**是否启用 Y启用 N未启用*/
|
||||
@Excel(name = "是否启用", width = 15, dicCode = "iz_enabled")
|
||||
@Dict(dicCode = "iz_enabled")
|
||||
@ApiModelProperty(value = "是否启用")
|
||||
private String izEnabled;
|
||||
/**是否删除 0未删除 1删除*/
|
||||
@Excel(name = "是否删除", width = 15)
|
||||
@ApiModelProperty(value = "是否删除")
|
||||
@TableLogic
|
||||
private String delFlag;
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
@Dict(dictTable = "sys_user",dicCode = "username",dicText = "realname")
|
||||
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 java.util.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 java.util.Date updateTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<ConfigServiceDirective> directives;
|
||||
@TableField(exist = false)
|
||||
@Dict(dicCode = "emp_service_tag_type")
|
||||
private String type;
|
||||
@TableField(exist = false)
|
||||
private String employeesTagsId;
|
||||
@TableField(exist = false)
|
||||
private String employeesId;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
package com.nu.modules.config.servicetag.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.nu.modules.config.servicetag.entity.ServiceTag;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 服务标签
|
||||
* @Author: 张明远
|
||||
* @Date: 2025-03-31
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ServiceTagMapper extends BaseMapper<ServiceTag> {
|
||||
|
||||
List<ServiceTag> getEmployeesServiceTags(ServiceTag serviceTag);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
<?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.config.servicetag.mapper.ServiceTagMapper">
|
||||
|
||||
<select id="getEmployeesServiceTags" resultType="com.nu.modules.config.servicetag.entity.ServiceTag">
|
||||
select a.id,
|
||||
a.type,
|
||||
a.create_time,
|
||||
case a.type when 'bq' then bq.instruction_name when 'zl' then zl.directive_name else null end AS tag_name,
|
||||
case a.type when 'bq' then bq.instruction_name when 'zl' then zl.service_content else null end AS description,
|
||||
case a.type when 'bq' then bq.id when 'zl' then zl.id else null end AS employeesTagsId
|
||||
from nu_biz_employees_service_tags a
|
||||
LEFT JOIN nu_config_service_directive zl on a.tags_id = zl.id
|
||||
LEFT JOIN nu_config_service_instruction_tag bq on a.tags_id = bq.id
|
||||
where a.employees_id = #{employeesId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
package com.nu.modules.config.servicetag.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.nu.modules.config.servicetag.entity.ServiceTag;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 服务标签
|
||||
* @Author: 张明远
|
||||
* @Date: 2025-03-31
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IServiceTagService extends IService<ServiceTag> {
|
||||
|
||||
|
||||
List<ServiceTag> getEmployeesServiceTags(ServiceTag serviceTag);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package com.nu.modules.config.servicetag.service.impl;
|
||||
|
||||
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.google.common.collect.Lists;
|
||||
import com.nu.modules.config.servicetag.entity.ServiceTag;
|
||||
import com.nu.modules.config.servicetag.mapper.ServiceTagMapper;
|
||||
import com.nu.modules.config.servicetag.service.IServiceTagService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 服务标签
|
||||
* @Author: 张明远
|
||||
* @Date: 2025-03-31
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class ServiceTagServiceImpl extends ServiceImpl<ServiceTagMapper, ServiceTag> implements IServiceTagService {
|
||||
|
||||
|
||||
@Override
|
||||
public List<ServiceTag> getEmployeesServiceTags(ServiceTag serviceTag) {
|
||||
return baseMapper.getEmployeesServiceTags(serviceTag);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue