Merge branch 'master' of http://47.115.223.229:8888/yangjun/nursing_unit_java
This commit is contained in:
commit
0a5d1cef2b
|
@ -0,0 +1,180 @@
|
|||
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="员工配置的服务标签-添加")
|
||||
@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 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,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 {
|
||||
|
||||
}
|
|
@ -131,4 +131,14 @@ public class NuBizNuCustomerServerController extends JeecgController<NuBizNuCust
|
|||
}
|
||||
|
||||
|
||||
@AutoLog(value = "护理单元客户配置服务指令-添加")
|
||||
@ApiOperation(value="护理单元客户配置服务指令-添加", notes="护理单元客户配置服务指令-添加")
|
||||
// @RequiresPermissions("NuBizNuCustomerServer:nu_biz_nu_customer_server:add")
|
||||
@PostMapping(value = "/addBatch")
|
||||
public Result<NuBizNuCustomerServer> addBatch(@RequestBody List<NuBizNuCustomerServer> serverList) {
|
||||
nuBizNuCustomerServerService.addBatch(serverList);
|
||||
return Result.OK("操作成功");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -19,4 +19,6 @@ public interface INuBizNuCustomerServerService extends IService<NuBizNuCustomerS
|
|||
NuBizNuCustomerServer addNuCustomerServer(NuBizNuCustomerServer nuBizNuCustomerServer);
|
||||
|
||||
NuBizNuCustomerServer editNuCustomerServer(NuBizNuCustomerServer nuBizNuCustomerServer);
|
||||
|
||||
void addBatch(List<NuBizNuCustomerServer> serverList);
|
||||
}
|
||||
|
|
|
@ -94,4 +94,22 @@ public class NuBizNuCustomerServerServiceImpl extends ServiceImpl<NuBizNuCustome
|
|||
baseMapper.updateById(nuBizNuCustomerServer);
|
||||
return nuBizNuCustomerServer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addBatch(List<NuBizNuCustomerServer> serverList) {
|
||||
if(serverList.size()>0){
|
||||
NuBizNuCustomerServer nuBizNuCustomerServer = serverList.get(0);
|
||||
String nuId = nuBizNuCustomerServer.getNuId();
|
||||
String customerId = nuBizNuCustomerServer.getCustomerId();
|
||||
|
||||
QueryWrapper<NuBizNuCustomerServer> nuBizNuCustomerServerQueryWrapper = new QueryWrapper<>();
|
||||
nuBizNuCustomerServerQueryWrapper.eq("nu_id",nuId);
|
||||
nuBizNuCustomerServerQueryWrapper.eq("customer_id",customerId);
|
||||
baseMapper.delete(nuBizNuCustomerServerQueryWrapper);
|
||||
|
||||
for(NuBizNuCustomerServer par : serverList){
|
||||
baseMapper.insert(par);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -57,6 +57,7 @@ public class DirectivePackage implements Serializable {
|
|||
private java.lang.String delFlag;
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
@Dict(dictTable = "sys_user",dicCode = "username",dicText = "realname")
|
||||
private java.lang.String createBy;
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
|
|
|
@ -152,6 +152,9 @@ public class ConfigServiceDirective implements Serializable {
|
|||
//服务类型名称
|
||||
@TableField(exist = false)
|
||||
private String typeName;
|
||||
//服务类型名称
|
||||
@TableField(exist = false)
|
||||
private String tagsName;
|
||||
|
||||
//服务指令标签
|
||||
@TableField(exist = false)
|
||||
|
|
|
@ -8,6 +8,7 @@ import com.nu.modules.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;
|
||||
|
@ -22,6 +23,7 @@ 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;
|
||||
|
||||
/**
|
||||
|
@ -175,4 +177,38 @@ public class ServiceTagController extends JeecgController<ServiceTag, IServiceTa
|
|||
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) {
|
||||
if(StringUtils.isEmpty(serviceTag.getEmployeesId())){
|
||||
return Result.error("员工id不能为空");
|
||||
}
|
||||
Page<ServiceTag> page = new Page<ServiceTag>(pageNo, pageSize);
|
||||
IPage<ServiceTag> pageList = serviceTagService.getEmployeesList(page, serviceTag);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
||||
@GetMapping(value = "/getEmployessServiceTags")
|
||||
public Result<List<ServiceTag>> getEmployessServiceTags(ServiceTag serviceTag) {
|
||||
if(StringUtils.isEmpty(serviceTag.getEmployeesId())){
|
||||
return Result.error("员工id不能为空");
|
||||
}
|
||||
List<ServiceTag> pageList = serviceTagService.getEmployessServiceTags(serviceTag);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -57,6 +57,7 @@ public class ServiceTag implements Serializable {
|
|||
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")
|
||||
|
@ -74,4 +75,10 @@ public class ServiceTag implements Serializable {
|
|||
|
||||
@TableField(exist = false)
|
||||
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;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
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 org.apache.ibatis.annotations.Param;
|
||||
|
||||
|
@ -21,4 +25,8 @@ public interface ServiceTagMapper extends BaseMapper<ServiceTag> {
|
|||
List<ServiceTag> queryList( @Param("serviceTag") ServiceTag serviceTag,@Param("ids") List<ServiceTag> ids);
|
||||
|
||||
Long queryTotal(@Param("serviceTag") ServiceTag serviceTag);
|
||||
|
||||
IPage<ServiceTag> getEmployeesList(Page<ServiceTag> page, ServiceTag serviceTag);
|
||||
|
||||
List<ServiceTag> getEmployessServiceTags(ServiceTag serviceTag);
|
||||
}
|
||||
|
|
|
@ -4,56 +4,56 @@
|
|||
|
||||
<!-- 定义 resultMap -->
|
||||
<resultMap id="ServiceTagResultMap" type="com.nu.modules.servicetag.entity.ServiceTag">
|
||||
<id property="id" column="id" />
|
||||
<result property="tagName" column="tag_name" />
|
||||
<result property="description" column="description" />
|
||||
<result property="sort" column="sort" />
|
||||
<result property="izEnabled" column="iz_enabled" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<id property="id" column="id"/>
|
||||
<result property="tagName" column="tag_name"/>
|
||||
<result property="description" column="description"/>
|
||||
<result property="sort" column="sort"/>
|
||||
<result property="izEnabled" column="iz_enabled"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<!-- 关联的指令列表 -->
|
||||
<collection property="directives" ofType="com.nu.modules.servicedirective.entity.ConfigServiceDirective">
|
||||
<id property="id" column="directive_id" />
|
||||
<result property="directiveName" column="directive_name" />
|
||||
<result property="categoryId" column="category_id" />
|
||||
<result property="typeId" column="type_id" />
|
||||
<result property="instructionTagId" column="instruction_tag_id" />
|
||||
<result property="tollPrice" column="toll_price" />
|
||||
<result property="comPrice" column="com_price" />
|
||||
<result property="izReimbursement" column="iz_reimbursement" />
|
||||
<result property="izPreferential" column="iz_preferential" />
|
||||
<result property="chargingFrequency" column="charging_frequency" />
|
||||
<result property="cycleType" column="cycle_type" />
|
||||
<result property="serviceContent" column="service_content" />
|
||||
<result property="serviceDuration" column="service_duration" />
|
||||
<result property="izEnabled" column="directive_iz_enabled" />
|
||||
<result property="delFlag" column="directive_del_flag" />
|
||||
<result property="createBy" column="directive_create_by" />
|
||||
<result property="createTime" column="directive_create_time" />
|
||||
<result property="updateBy" column="directive_update_by" />
|
||||
<result property="updateTime" column="directive_update_time" />
|
||||
<result property="sysOrgCode" column="directive_sys_org_code" />
|
||||
<result property="mp3File" column="mp3_file" />
|
||||
<result property="mp4File" column="mp4_file" />
|
||||
<result property="categoryName" column="csc_category_name" />
|
||||
<result property="typeName" column="cst_type_name" />
|
||||
<id property="id" column="directive_id"/>
|
||||
<result property="directiveName" column="directive_name"/>
|
||||
<result property="categoryId" column="category_id"/>
|
||||
<result property="typeId" column="type_id"/>
|
||||
<result property="instructionTagId" column="instruction_tag_id"/>
|
||||
<result property="tollPrice" column="toll_price"/>
|
||||
<result property="comPrice" column="com_price"/>
|
||||
<result property="izReimbursement" column="iz_reimbursement"/>
|
||||
<result property="izPreferential" column="iz_preferential"/>
|
||||
<result property="chargingFrequency" column="charging_frequency"/>
|
||||
<result property="cycleType" column="cycle_type"/>
|
||||
<result property="serviceContent" column="service_content"/>
|
||||
<result property="serviceDuration" column="service_duration"/>
|
||||
<result property="izEnabled" column="directive_iz_enabled"/>
|
||||
<result property="delFlag" column="directive_del_flag"/>
|
||||
<result property="createBy" column="directive_create_by"/>
|
||||
<result property="createTime" column="directive_create_time"/>
|
||||
<result property="updateBy" column="directive_update_by"/>
|
||||
<result property="updateTime" column="directive_update_time"/>
|
||||
<result property="sysOrgCode" column="directive_sys_org_code"/>
|
||||
<result property="mp3File" column="mp3_file"/>
|
||||
<result property="mp4File" column="mp4_file"/>
|
||||
<result property="categoryName" column="csc_category_name"/>
|
||||
<result property="typeName" column="cst_type_name"/>
|
||||
<result property="previewFile" column="preview_file"/>
|
||||
<result property="immediateFile" column="immediate_file"/>
|
||||
<!-- 关联的标签列表 -->
|
||||
<collection property="tagList" ofType="com.nu.modules.directivetag.entity.DirectiveTag">
|
||||
<id property="id" column="tag_id" />
|
||||
<result property="tagName" column="tag_name" />
|
||||
<result property="sort" column="tag_sort" />
|
||||
<result property="izEnabled" column="tag_iz_enabled" />
|
||||
<result property="delFlag" column="tag_del_flag" />
|
||||
<result property="createBy" column="tag_create_by" />
|
||||
<result property="createTime" column="tag_create_time" />
|
||||
<result property="updateBy" column="tag_update_by" />
|
||||
<result property="updateTime" column="tag_update_time" />
|
||||
<result property="sysOrgCode" column="tag_sys_org_code" />
|
||||
<id property="id" column="tag_id"/>
|
||||
<result property="tagName" column="cdt_tag_name"/>
|
||||
<result property="sort" column="tag_sort"/>
|
||||
<result property="izEnabled" column="tag_iz_enabled"/>
|
||||
<result property="delFlag" column="tag_del_flag"/>
|
||||
<result property="createBy" column="tag_create_by"/>
|
||||
<result property="createTime" column="tag_create_time"/>
|
||||
<result property="updateBy" column="tag_update_by"/>
|
||||
<result property="updateTime" column="tag_update_time"/>
|
||||
<result property="sysOrgCode" column="tag_sys_org_code"/>
|
||||
</collection>
|
||||
</collection>
|
||||
</resultMap>
|
||||
|
@ -96,7 +96,7 @@
|
|||
csd.preview_file,
|
||||
csd.immediate_file,
|
||||
cdt.id AS tag_id,
|
||||
cdt.tag_name,
|
||||
cdt.tag_name as cdt_tag_name,
|
||||
cdt.sort AS tag_sort,
|
||||
cdt.iz_enabled AS tag_iz_enabled,
|
||||
cdt.del_flag AS tag_del_flag,
|
||||
|
@ -114,7 +114,8 @@
|
|||
<foreach collection="ids" item="item" open="(" separator="," close=")">
|
||||
#{item.id}
|
||||
</foreach>
|
||||
</where>) dp
|
||||
</where>
|
||||
) dp
|
||||
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_directive_tag dt ON csd.id = dt.directive_id
|
||||
|
@ -140,7 +141,9 @@
|
|||
</select>
|
||||
|
||||
<delete id="deleteDirectives">
|
||||
delete from nu_servtag_directive where tag_id = #{tag.id}
|
||||
delete
|
||||
from nu_servtag_directive
|
||||
where tag_id = #{tag.id}
|
||||
</delete>
|
||||
|
||||
<insert id="saveDirectives">
|
||||
|
@ -150,4 +153,31 @@
|
|||
(#{tag.id}, #{directive.id}, #{directive.sort})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<select id="getEmployeesList" resultType="com.nu.modules.servicetag.entity.ServiceTag">
|
||||
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 and est.employees_id = #{serviceTag.employeesId}
|
||||
where nst.del_flag = '0'
|
||||
and nst.iz_enabled = '0'
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getEmployessServiceTags" resultType="com.nu.modules.servicetag.entity.ServiceTag">
|
||||
select a.id, b.tag_name, b.description, a.create_time, b.id as employeesTagsId
|
||||
from nu_biz_employees_servcie_tags a
|
||||
LEFT JOIN nu_service_tag b on a.tags_id = b.id
|
||||
where a.employees_id = #{employeesId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
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.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.nu.modules.servicetag.entity.ServiceTag;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 服务标签
|
||||
* @Author: 张明远
|
||||
|
@ -21,4 +25,8 @@ public interface IServiceTagService extends IService<ServiceTag> {
|
|||
void queryList(ServiceTag serviceTag, IPage<ServiceTag> pageList);
|
||||
|
||||
ServiceTag queryById(String id);
|
||||
|
||||
IPage<ServiceTag> getEmployeesList(Page<ServiceTag> page, ServiceTag queryWrapper);
|
||||
|
||||
List<ServiceTag> getEmployessServiceTags(ServiceTag serviceTag);
|
||||
}
|
||||
|
|
|
@ -1,14 +1,20 @@
|
|||
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.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.nu.modules.directivetag.entity.DirectiveTag;
|
||||
import com.nu.modules.servicedirective.entity.ConfigServiceDirective;
|
||||
import com.nu.modules.servicetag.entity.ServiceTag;
|
||||
import com.nu.modules.servicetag.mapper.ServiceTagMapper;
|
||||
import com.nu.modules.servicetag.service.IServiceTagService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Description: 服务标签
|
||||
|
@ -28,6 +34,19 @@ public class ServiceTagServiceImpl extends ServiceImpl<ServiceTagMapper, Service
|
|||
@Override
|
||||
public void queryList(ServiceTag serviceTag, IPage<ServiceTag> pageList) {
|
||||
List<ServiceTag> record = baseMapper.queryList(serviceTag,pageList.getRecords());
|
||||
//将指令标签名使用逗号拼接成字符串设置到指令对象的tagsName变量中
|
||||
if(record != null && !record.isEmpty()){
|
||||
record.stream().forEach(l -> {
|
||||
if(l.getDirectives()!=null && !l.getDirectives().isEmpty()){
|
||||
List<ConfigServiceDirective> sd = l.getDirectives();
|
||||
for (int i = 0; i < sd.size(); i++) {
|
||||
List<DirectiveTag> tagList = sd.get(i).getTagList();
|
||||
List<String> tags = tagList.stream().map(t -> t.getTagName()).collect(Collectors.toList());
|
||||
sd.get(i).setTagsName(String.join(",",tags));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
pageList.setRecords(record);
|
||||
}
|
||||
|
||||
|
@ -40,4 +59,14 @@ public class ServiceTagServiceImpl extends ServiceImpl<ServiceTagMapper, Service
|
|||
return serviceTags.stream().findFirst().orElse(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<ServiceTag> getEmployeesList(Page<ServiceTag> page, ServiceTag queryWrapper) {
|
||||
return baseMapper.getEmployeesList(page,queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ServiceTag> getEmployessServiceTags(ServiceTag serviceTag) {
|
||||
return baseMapper.getEmployessServiceTags(serviceTag);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue