New file |
| | |
| | | package com.ycl.controller; |
| | | |
| | | import com.ycl.common.group.Update; |
| | | import com.ycl.common.group.Add; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import lombok.RequiredArgsConstructor; |
| | | import java.util.List; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import javax.validation.constraints.NotEmpty; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import com.ycl.service.CodingRulerService; |
| | | import com.ycl.common.base.Result; |
| | | import com.ycl.domain.form.CodingRulerForm; |
| | | import com.ycl.domain.query.CodingRulerQuery; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | | * 前端控制器 |
| | | * |
| | | * @author zxl |
| | | * @since 2025-03-18 |
| | | */ |
| | | @Validated |
| | | @RequiredArgsConstructor |
| | | @Api(value = "项目编码类型管理", tags = "管理") |
| | | @RestController |
| | | @RequestMapping("/coding-ruler") |
| | | public class CodingRulerController { |
| | | |
| | | private final CodingRulerService codingRulerService; |
| | | |
| | | @PostMapping |
| | | @ApiOperation(value = "添加", notes = "添加") |
| | | @PreAuthorize("@ss.hasPermi('codingRuler:add')") |
| | | public Result add(@RequestBody @Validated(Add.class) CodingRulerForm form) { |
| | | return codingRulerService.add(form); |
| | | } |
| | | |
| | | @PutMapping |
| | | @ApiOperation(value = "修改", notes = "修改") |
| | | @PreAuthorize("@ss.hasPermi('codingRuler:edit')") |
| | | public Result update(@RequestBody @Validated(Update.class) CodingRulerForm form) { |
| | | return codingRulerService.update(form); |
| | | } |
| | | |
| | | @DeleteMapping("/{id}") |
| | | @ApiOperation(value = "ID删除", notes = "ID删除") |
| | | @PreAuthorize("@ss.hasPermi('codingRuler:del')") |
| | | public Result removeById(@PathVariable("id") String id) { |
| | | return codingRulerService.removeById(id); |
| | | } |
| | | |
| | | @DeleteMapping("/batch") |
| | | @ApiOperation(value = "批量删除", notes = "批量删除") |
| | | @PreAuthorize("@ss.hasPermi('codingRuler:del:batch')") |
| | | public Result remove(@RequestBody @NotEmpty(message = "请选择数据") List<String> ids) { |
| | | return codingRulerService.remove(ids); |
| | | } |
| | | |
| | | @GetMapping("/page") |
| | | @ApiOperation(value = "分页", notes = "分页") |
| | | @PreAuthorize("@ss.hasPermi('codingRuler:page')") |
| | | public Result page(CodingRulerQuery query) { |
| | | System.out.println(query); |
| | | return codingRulerService.page(query); |
| | | } |
| | | |
| | | @GetMapping("/{id}") |
| | | @ApiOperation(value = "详情", notes = "详情") |
| | | @PreAuthorize("@ss.hasPermi('codingRuler:detail')") |
| | | public Result detail(@PathVariable("id") Integer id) { |
| | | return codingRulerService.detail(id); |
| | | } |
| | | |
| | | @GetMapping("/list") |
| | | @PreAuthorize("@ss.hasPermi('codingRuler:list')") |
| | | @ApiOperation(value = "列表", notes = "列表") |
| | | public Result list() { |
| | | return codingRulerService.all(); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/change/{id}") |
| | | @ApiOperation(value = "状态切换", notes = "状态切换") |
| | | @PreAuthorize("@ss.hasPermi('codingRuler:edit')") |
| | | public Result changeCodingRulerStatus(@PathVariable("id") Integer id){ |
| | | return codingRulerService.changeCodingRulerStatus(id); |
| | | } |
| | | } |
| | |
| | | */ |
| | | @Validated |
| | | @RequiredArgsConstructor |
| | | @Api(value = "", tags = "管理") |
| | | @Api(value = "显隐列管理", tags = "管理") |
| | | @RestController |
| | | @RequestMapping("/hidden-admin") |
| | | public class HiddenAdminController { |
New file |
| | |
| | | package com.ycl.domain.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldStrategy; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | |
| | | import com.ycl.system.domain.base.AbsEntity; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * |
| | | * |
| | | * @author zxl |
| | | * @since 2025-03-18 |
| | | */ |
| | | @Data |
| | | @TableName("t_coding_ruler") |
| | | public class CodingRuler extends AbsEntity implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableField("project_code_type") |
| | | /** 项目码类型 */ |
| | | private String projectCodeType; |
| | | |
| | | @TableField("interval_type") |
| | | /** 区间类型 */ |
| | | private String intervalType; |
| | | |
| | | @TableField("left_symbol") |
| | | /** 左符号 */ |
| | | private String leftSymbol; |
| | | |
| | | @TableField("left_value") |
| | | /** 左值 */ |
| | | private Long leftValue; |
| | | |
| | | @TableField(value = "right_symbol",updateStrategy = FieldStrategy.IGNORED) |
| | | /** 右符号 */ |
| | | private String rightSymbol; |
| | | |
| | | @TableField(value = "right_value",updateStrategy = FieldStrategy.IGNORED) |
| | | /** 右值 */ |
| | | private Long rightValue; |
| | | |
| | | /** 启动状态 0 未启动 1 启动*/ |
| | | @TableField("status") |
| | | private Integer status; |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ycl.domain.form; |
| | | |
| | | import com.ycl.common.group.Update; |
| | | import com.ycl.common.group.Add; |
| | | import com.ycl.system.domain.base.AbsForm; |
| | | import com.ycl.domain.entity.CodingRuler; |
| | | import org.springframework.beans.BeanUtils; |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | import org.springframework.lang.NonNull; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 表单 |
| | | * |
| | | * @author zxl |
| | | * @since 2025-03-18 |
| | | */ |
| | | @Data |
| | | @ApiModel(value = "CodingRuler表单", description = "表单") |
| | | public class CodingRulerForm extends AbsForm { |
| | | |
| | | @NotBlank(message = "项目码类型不能为空", groups = {Add.class, Update.class}) |
| | | @ApiModelProperty("项目码类型") |
| | | private String projectCodeType; |
| | | |
| | | @NotBlank(message = "区间类型不能为空", groups = {Add.class, Update.class}) |
| | | @ApiModelProperty("区间类型") |
| | | private String intervalType; |
| | | |
| | | @NotBlank(message = "左符号不能为空", groups = {Add.class, Update.class}) |
| | | @ApiModelProperty("左符号") |
| | | private String leftSymbol; |
| | | |
| | | @NotNull(message = "左值不能为空", groups = {Add.class, Update.class}) |
| | | @ApiModelProperty("左值") |
| | | private Long leftValue; |
| | | |
| | | @ApiModelProperty("右符号") |
| | | private String rightSymbol; |
| | | |
| | | @ApiModelProperty("右值") |
| | | private Long rightValue; |
| | | |
| | | public static CodingRuler getEntityByForm(@NonNull CodingRulerForm form, CodingRuler entity) { |
| | | if(entity == null) { |
| | | entity = new CodingRuler(); |
| | | } |
| | | BeanUtils.copyProperties(form, entity); |
| | | return entity; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.ycl.domain.query; |
| | | |
| | | import com.ycl.system.domain.base.AbsQuery; |
| | | import java.util.List; |
| | | import org.springframework.lang.NonNull; |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 查询 |
| | | * |
| | | * @author zxl |
| | | * @since 2025-03-18 |
| | | */ |
| | | @Data |
| | | @ApiModel(value = "CodingRuler查询参数", description = "查询参数") |
| | | public class CodingRulerQuery extends AbsQuery { |
| | | private String projectCodeType; |
| | | private String intervalType; |
| | | } |
| | | |
New file |
| | |
| | | package com.ycl.domain.vo; |
| | | |
| | | import com.ycl.system.domain.base.AbsVo; |
| | | import com.ycl.domain.entity.CodingRuler; |
| | | import java.util.List; |
| | | import org.springframework.lang.NonNull; |
| | | import org.springframework.beans.BeanUtils; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 展示 |
| | | * |
| | | * @author zxl |
| | | * @since 2025-03-18 |
| | | */ |
| | | @Data |
| | | @ApiModel(value = "响应数据", description = "响应数据") |
| | | public class CodingRulerVO extends AbsVo { |
| | | |
| | | /** 项目码类型 */ |
| | | @ApiModelProperty("项目码类型") |
| | | private String projectCodeType; |
| | | |
| | | /** 区间类型 */ |
| | | @ApiModelProperty("区间类型") |
| | | private String intervalType; |
| | | |
| | | /** 左符号 */ |
| | | @ApiModelProperty("左符号") |
| | | private String leftSymbol; |
| | | |
| | | /** 左值 */ |
| | | @ApiModelProperty("左值") |
| | | private Long leftValue; |
| | | |
| | | /** 右符号 */ |
| | | @ApiModelProperty("右符号") |
| | | private String rightSymbol; |
| | | |
| | | /** 右值 */ |
| | | @ApiModelProperty("右值") |
| | | private Long rightValue; |
| | | |
| | | @ApiModelProperty("启动状态") |
| | | private Integer status; |
| | | |
| | | public static CodingRulerVO getVoByEntity(@NonNull CodingRuler entity, CodingRulerVO vo) { |
| | | if(vo == null) { |
| | | vo = new CodingRulerVO(); |
| | | } |
| | | BeanUtils.copyProperties(entity, vo); |
| | | return vo; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.ycl.mapper; |
| | | |
| | | import com.ycl.domain.entity.CodingRuler; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ycl.domain.vo.CodingRulerVO; |
| | | import com.ycl.domain.form.CodingRulerForm; |
| | | import com.ycl.domain.query.CodingRulerQuery; |
| | | import java.util.List; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * Mapper 接口 |
| | | * |
| | | * @author zxl |
| | | * @since 2025-03-18 |
| | | */ |
| | | @Mapper |
| | | public interface CodingRulerMapper extends BaseMapper<CodingRuler> { |
| | | |
| | | /** |
| | | * id查找 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | CodingRulerVO getById(Integer id); |
| | | |
| | | /** |
| | | * 分页 |
| | | */ |
| | | IPage getPage(IPage page, @Param("query") CodingRulerQuery query); |
| | | |
| | | } |
New file |
| | |
| | | package com.ycl.service; |
| | | |
| | | import com.ycl.domain.entity.CodingRuler; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ycl.common.base.Result; |
| | | import com.ycl.domain.form.CodingRulerForm; |
| | | import com.ycl.domain.query.CodingRulerQuery; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 服务类 |
| | | * |
| | | * @author zxl |
| | | * @since 2025-03-18 |
| | | */ |
| | | public interface CodingRulerService extends IService<CodingRuler> { |
| | | |
| | | /** |
| | | * 添加 |
| | | * @param form |
| | | * @return |
| | | */ |
| | | Result add(CodingRulerForm form); |
| | | |
| | | /** |
| | | * 修改 |
| | | * @param form |
| | | * @return |
| | | */ |
| | | Result update(CodingRulerForm form); |
| | | |
| | | /** |
| | | * 批量删除 |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | Result remove(List<String> ids); |
| | | |
| | | /** |
| | | * id删除 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | Result removeById(String id); |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | Result page(CodingRulerQuery query); |
| | | |
| | | /** |
| | | * 根据id查找 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | Result detail(Integer id); |
| | | |
| | | /** |
| | | * 列表 |
| | | * @return |
| | | */ |
| | | Result all(); |
| | | |
| | | /** |
| | | * 改变规则状态 |
| | | * @return |
| | | */ |
| | | Result changeCodingRulerStatus(Integer id); |
| | | } |
New file |
| | |
| | | package com.ycl.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; |
| | | import com.ycl.common.enums.business.CodingRulerCodeTypeEnum; |
| | | import com.ycl.common.enums.business.CodingRulerStatusEnum; |
| | | import com.ycl.domain.entity.CodingRuler; |
| | | import com.ycl.mapper.CodingRulerMapper; |
| | | import com.ycl.service.CodingRulerService; |
| | | import com.ycl.common.base.Result; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ycl.domain.form.CodingRulerForm; |
| | | import com.ycl.domain.vo.CodingRulerVO; |
| | | import com.ycl.domain.query.CodingRulerQuery; |
| | | import org.springframework.stereotype.Service; |
| | | import lombok.RequiredArgsConstructor; |
| | | import com.ycl.framework.utils.PageUtil; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.util.Assert; |
| | | |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 服务实现类 |
| | | * |
| | | * @author zxl |
| | | * @since 2025-03-18 |
| | | */ |
| | | @Service |
| | | @RequiredArgsConstructor |
| | | public class CodingRulerServiceImpl extends ServiceImpl<CodingRulerMapper, CodingRuler> implements CodingRulerService { |
| | | |
| | | private final CodingRulerMapper codingRulerMapper; |
| | | |
| | | /** |
| | | * 添加 |
| | | * @param form |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result add(CodingRulerForm form) { |
| | | CodingRuler entity = CodingRulerForm.getEntityByForm(form, null); |
| | | //设置默认未启动 |
| | | entity.setStatus(0); |
| | | baseMapper.insert(entity); |
| | | return Result.ok("添加成功"); |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | * @param form |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result update(CodingRulerForm form) { |
| | | CodingRuler entity = baseMapper.selectById(form.getId()); |
| | | // 为空抛IllegalArgumentException,做全局异常处理 |
| | | Assert.notNull(entity, "记录不存在"); |
| | | BeanUtils.copyProperties(form, entity); |
| | | baseMapper.updateById(entity); |
| | | return Result.ok("修改成功"); |
| | | } |
| | | |
| | | /** |
| | | * 批量删除 |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result remove(List<String> ids) { |
| | | baseMapper.deleteBatchIds(ids); |
| | | return Result.ok("删除成功"); |
| | | } |
| | | |
| | | /** |
| | | * id删除 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result removeById(String id) { |
| | | baseMapper.deleteById(id); |
| | | return Result.ok("删除成功"); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result page(CodingRulerQuery query) { |
| | | IPage<CodingRulerVO> page = PageUtil.getPage(query, CodingRulerVO.class); |
| | | |
| | | baseMapper.getPage(page, query); |
| | | return Result.ok().data(page.getRecords()).total(page.getTotal()); |
| | | } |
| | | |
| | | /** |
| | | * 根据id查找 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result detail(Integer id) { |
| | | CodingRulerVO vo = baseMapper.getById(id); |
| | | Assert.notNull(vo, "记录不存在"); |
| | | return Result.ok().data(vo); |
| | | } |
| | | |
| | | /** |
| | | * 列表 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Result all() { |
| | | List<CodingRuler> entities = baseMapper.selectList(null); |
| | | List<CodingRulerVO> vos = entities.stream() |
| | | .map(entity -> CodingRulerVO.getVoByEntity(entity, null)) |
| | | .collect(Collectors.toList()); |
| | | return Result.ok().data(vos); |
| | | } |
| | | |
| | | @Override |
| | | public Result changeCodingRulerStatus(Integer id) { |
| | | //红码 绿码 同时只能启动一个 |
| | | CodingRuler codingRuler = baseMapper.selectById(id); |
| | | String msg = ""; |
| | | //判断传入 id 当前状态 |
| | | if (CodingRulerStatusEnum.off.getValue().equals(codingRuler.getStatus())){ |
| | | // 当前状态未启动 -- 修改为启动状态 |
| | | //查询(红码'绿码)规则是否启动 |
| | | CodingRuler statusStartCodingRuler = new LambdaQueryChainWrapper<CodingRuler>(baseMapper) |
| | | .eq(CodingRuler::getStatus, CodingRulerStatusEnum.on.getValue()) |
| | | .eq(CodingRuler::getProjectCodeType, codingRuler.getProjectCodeType()) |
| | | .eq(CodingRuler::getDeleted,0) |
| | | .one(); |
| | | if (statusStartCodingRuler != null) { |
| | | throw new RuntimeException("相同项目码类型同时只能启动一种"); |
| | | } |
| | | |
| | | codingRuler.setStatus(CodingRulerStatusEnum.on.getValue()); |
| | | msg = CodingRulerStatusEnum.on.getDesc(); |
| | | }else { |
| | | // 当前状态启动 -- 修改为未启动状态 |
| | | codingRuler.setStatus(CodingRulerStatusEnum.off.getValue()); |
| | | msg = CodingRulerStatusEnum.off.getDesc(); |
| | | } |
| | | baseMapper.updateById(codingRuler); |
| | | return Result.ok(msg); |
| | | } |
| | | } |
| | |
| | | * @param result |
| | | */ |
| | | public void getTodoTaskList(String projectId, String processInsId, String taskName, int pageSize, int pageNum, Result result) { |
| | | |
| | | TaskQuery taskQuery = taskService.createTaskQuery() |
| | | .active() |
| | | .processInstanceId(processInsId) |
| | |
| | | taskVO.getHandlerUnitId().add(sysUser.getDept().getDeptId()); |
| | | taskVO.getHandlerUnitName().add(sysUser.getDept().getDeptName()); |
| | | taskVO.getPromoterName().add(this.getUserShowName(sysUser)); |
| | | taskVO.getPromoterUnitName().add(sysUser.getDept().getDeptName()); |
| | | // if (sysUser.getDept().getAncestors()) |
| | | String[] str = sysUser.getDept().getAncestors().split(","); |
| | | if (str.length >= 4){ |
| | | taskVO.getPromoterUnitName().add(sysUser.getDept().getParentName() +"-"+sysUser.getDept().getDeptName()); |
| | | }else { |
| | | taskVO.getPromoterUnitName().add(sysUser.getDept().getDeptName()); |
| | | } |
| | | |
| | | } |
| | | } |
| | | // 绑定的是角色或者部门 |
| | |
| | | taskVO.getHandlerUnitId().add(dept.getDeptId()); |
| | | taskVO.getHandlerUnitName().add(dept.getDeptName()); |
| | | taskVO.getPromoterName().add(this.getDeptLeaderShowName(dept)); |
| | | taskVO.getPromoterUnitName().add(dept.getDeptName()); |
| | | String[] str = dept.getAncestors().split(","); |
| | | if (str.length >= 4){ |
| | | taskVO.getPromoterUnitName().add(dept.getParentName() +"-"+dept.getDeptName()); |
| | | }else { |
| | | taskVO.getPromoterUnitName().add(dept.getDeptName()); |
| | | } |
| | | |
| | | } |
| | | } |
| | | } else { |
New file |
| | |
| | | <?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.ycl.mapper.CodingRulerMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ycl.domain.vo.CodingRulerVO"> |
| | | <result column="project_code_type" property="projectCodeType" /> |
| | | <result column="interval_type" property="intervalType" /> |
| | | <result column="left_symbol" property="leftSymbol" /> |
| | | <result column="left_value" property="leftValue" /> |
| | | <result column="right_symbol" property="rightSymbol" /> |
| | | <result column="right_value" property="rightValue" /> |
| | | <result column="status" property="status"/> |
| | | </resultMap> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <select id="getById" resultMap="BaseResultMap"> |
| | | SELECT |
| | | TCR.project_code_type, |
| | | TCR.interval_type, |
| | | TCR.left_symbol, |
| | | TCR.left_value, |
| | | TCR.right_symbol, |
| | | TCR.right_value, |
| | | TCR.id, |
| | | TCR.status |
| | | FROM |
| | | t_coding_ruler TCR |
| | | WHERE |
| | | TCR.id = #{id} AND TCR.deleted = 0 |
| | | </select> |
| | | |
| | | |
| | | <select id="getPage" resultMap="BaseResultMap"> |
| | | SELECT |
| | | TCR.project_code_type, |
| | | TCR.interval_type, |
| | | TCR.left_symbol, |
| | | TCR.left_value, |
| | | TCR.right_symbol, |
| | | TCR.right_value, |
| | | TCR.id, |
| | | TCR.status |
| | | FROM |
| | | t_coding_ruler TCR |
| | | WHERE 1=1 |
| | | <if test="query.projectCodeType != '' and query.projectCodeType != null "> |
| | | AND TCR.project_code_type = #{query.projectCodeType} |
| | | </if> |
| | | <if test="query.intervalType != '' and query.intervalType != null "> |
| | | AND TCR.interval_type = #{query.intervalType} |
| | | </if> |
| | | AND TCR.deleted = 0 |
| | | order by TCR.gmt_update DESC |
| | | </select> |
| | | |
| | | </mapper> |
New file |
| | |
| | | package com.ycl.common.enums.business; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.EnumValue; |
| | | import com.fasterxml.jackson.annotation.JsonValue; |
| | | import lombok.Getter; |
| | | |
| | | /** |
| | | * 项目赋码类型枚举 |
| | | */ |
| | | |
| | | @Getter |
| | | public enum CodingRulerCodeTypeEnum { |
| | | RED("red", "红码"), |
| | | GREEN("green","绿码"); |
| | | |
| | | @EnumValue |
| | | @JsonValue |
| | | private final String value; |
| | | |
| | | private final String desc; |
| | | |
| | | CodingRulerCodeTypeEnum(String value, String desc) { |
| | | this.value = value; |
| | | this.desc = desc; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.ycl.common.enums.business; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.EnumValue; |
| | | import com.fasterxml.jackson.annotation.JsonValue; |
| | | import lombok.Getter; |
| | | |
| | | /** |
| | | * 区间类型枚举 |
| | | */ |
| | | @Getter |
| | | public enum CodingRulerIntervalTypeEnum { |
| | | Interval("interval", "区间"), |
| | | Single_Interval("single_interval","单区间"); |
| | | |
| | | @EnumValue |
| | | @JsonValue |
| | | private final String value; |
| | | |
| | | private final String desc; |
| | | |
| | | CodingRulerIntervalTypeEnum(String value, String desc) { |
| | | this.value = value; |
| | | this.desc = desc; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.ycl.common.enums.business; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.EnumValue; |
| | | import com.fasterxml.jackson.annotation.JsonValue; |
| | | |
| | | import lombok.Getter; |
| | | |
| | | /** |
| | | * 流程启动状态枚举类 |
| | | */ |
| | | @Getter |
| | | public enum CodingRulerStatusEnum { |
| | | on(1, "启动赋码规则"), |
| | | off(0,"关闭赋码规则"); |
| | | |
| | | @EnumValue |
| | | @JsonValue |
| | | private final Integer value; |
| | | |
| | | private final String desc; |
| | | |
| | | CodingRulerStatusEnum(Integer value, String desc) { |
| | | this.value = value; |
| | | this.desc = desc; |
| | | } |
| | | } |
| | |
| | | public String importUser(List<SysUser> userList, Boolean isUpdateSupport, String operName); |
| | | |
| | | List<SysUser> getByDept(Long deptId); |
| | | |
| | | } |
| | |
| | | <result property="leader" column="leader" /> |
| | | <result property="phone" column="phone" /> |
| | | <result property="status" column="dept_status" /> |
| | | <result property="parentName" column="parent_name" /> |
| | | </resultMap> |
| | | |
| | | <resultMap id="RoleResult" type="SysRole"> |
| | |
| | | <sql id="selectUserVo"> |
| | | select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, |
| | | d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.status as dept_status, |
| | | (select dept_name from sys_dept where dept_id = d.parent_id) parent_name, |
| | | r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status |
| | | from sys_user u |
| | | left join sys_dept d on u.dept_id = d.dept_id |