From 5d00461c75205fb306ead59522350fa1e8a3e729 Mon Sep 17 00:00:00 2001
From: zxl <763096477@qq.com>
Date: 星期五, 21 三月 2025 10:35:27 +0800
Subject: [PATCH] Merge branch 'dev'

---
 business/src/main/java/com/ycl/controller/CodingRulerController.java                |   92 +++++++
 business/src/main/java/com/ycl/service/impl/CodingRulerServiceImpl.java             |  153 ++++++++++++
 business/src/main/java/com/ycl/domain/vo/CodingRulerVO.java                         |   58 ++++
 business/src/main/resources/mapper/CodingRulerMapper.xml                            |   62 +++++
 business/src/main/java/com/ycl/controller/HiddenAdminController.java                |    2 
 system/src/main/resources/mapper/system/SysUserMapper.xml                           |    2 
 business/src/main/java/com/ycl/mapper/CodingRulerMapper.java                        |   34 ++
 business/src/main/java/com/ycl/service/CodingRulerService.java                      |   71 +++++
 common/src/main/java/com/ycl/common/enums/business/CodingRulerCodeTypeEnum.java     |   27 ++
 business/src/main/java/com/ycl/domain/entity/CodingRuler.java                       |   54 ++++
 business/src/main/java/com/ycl/service/impl/ProjectProcessServiceImpl.java          |   18 +
 system/src/main/java/com/ycl/system/service/ISysUserService.java                    |    1 
 business/src/main/java/com/ycl/domain/query/CodingRulerQuery.java                   |   24 ++
 common/src/main/java/com/ycl/common/enums/business/CodingRulerIntervalTypeEnum.java |   26 ++
 common/src/main/java/com/ycl/common/enums/business/CodingRulerStatusEnum.java       |   26 ++
 business/src/main/java/com/ycl/domain/form/CodingRulerForm.java                     |   56 ++++
 16 files changed, 703 insertions(+), 3 deletions(-)

diff --git a/business/src/main/java/com/ycl/controller/CodingRulerController.java b/business/src/main/java/com/ycl/controller/CodingRulerController.java
new file mode 100644
index 0000000..afb6d57
--- /dev/null
+++ b/business/src/main/java/com/ycl/controller/CodingRulerController.java
@@ -0,0 +1,92 @@
+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);
+    }
+}
diff --git a/business/src/main/java/com/ycl/controller/HiddenAdminController.java b/business/src/main/java/com/ycl/controller/HiddenAdminController.java
index bf5e30a..ddebea4 100644
--- a/business/src/main/java/com/ycl/controller/HiddenAdminController.java
+++ b/business/src/main/java/com/ycl/controller/HiddenAdminController.java
@@ -25,7 +25,7 @@
  */
 @Validated
 @RequiredArgsConstructor
-@Api(value = "", tags = "绠$悊")
+@Api(value = "鏄鹃殣鍒楃鐞�", tags = "绠$悊")
 @RestController
 @RequestMapping("/hidden-admin")
 public class HiddenAdminController {
diff --git a/business/src/main/java/com/ycl/domain/entity/CodingRuler.java b/business/src/main/java/com/ycl/domain/entity/CodingRuler.java
new file mode 100644
index 0000000..f8406c5
--- /dev/null
+++ b/business/src/main/java/com/ycl/domain/entity/CodingRuler.java
@@ -0,0 +1,54 @@
+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;
+
+
+
+}
diff --git a/business/src/main/java/com/ycl/domain/form/CodingRulerForm.java b/business/src/main/java/com/ycl/domain/form/CodingRulerForm.java
new file mode 100644
index 0000000..2350fbc
--- /dev/null
+++ b/business/src/main/java/com/ycl/domain/form/CodingRulerForm.java
@@ -0,0 +1,56 @@
+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;
+    }
+
+}
diff --git a/business/src/main/java/com/ycl/domain/query/CodingRulerQuery.java b/business/src/main/java/com/ycl/domain/query/CodingRulerQuery.java
new file mode 100644
index 0000000..bb814fe
--- /dev/null
+++ b/business/src/main/java/com/ycl/domain/query/CodingRulerQuery.java
@@ -0,0 +1,24 @@
+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;
+}
+
diff --git a/business/src/main/java/com/ycl/domain/vo/CodingRulerVO.java b/business/src/main/java/com/ycl/domain/vo/CodingRulerVO.java
new file mode 100644
index 0000000..c4c4d26
--- /dev/null
+++ b/business/src/main/java/com/ycl/domain/vo/CodingRulerVO.java
@@ -0,0 +1,58 @@
+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;
+    }
+
+}
diff --git a/business/src/main/java/com/ycl/mapper/CodingRulerMapper.java b/business/src/main/java/com/ycl/mapper/CodingRulerMapper.java
new file mode 100644
index 0000000..b7cb477
--- /dev/null
+++ b/business/src/main/java/com/ycl/mapper/CodingRulerMapper.java
@@ -0,0 +1,34 @@
+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);
+
+}
diff --git a/business/src/main/java/com/ycl/service/CodingRulerService.java b/business/src/main/java/com/ycl/service/CodingRulerService.java
new file mode 100644
index 0000000..e0f5793
--- /dev/null
+++ b/business/src/main/java/com/ycl/service/CodingRulerService.java
@@ -0,0 +1,71 @@
+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);
+}
diff --git a/business/src/main/java/com/ycl/service/impl/CodingRulerServiceImpl.java b/business/src/main/java/com/ycl/service/impl/CodingRulerServiceImpl.java
new file mode 100644
index 0000000..60b119e
--- /dev/null
+++ b/business/src/main/java/com/ycl/service/impl/CodingRulerServiceImpl.java
@@ -0,0 +1,153 @@
+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());
+        // 涓虹┖鎶汭llegalArgumentException锛屽仛鍏ㄥ眬寮傚父澶勭悊
+        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);
+    }
+}
diff --git a/business/src/main/java/com/ycl/service/impl/ProjectProcessServiceImpl.java b/business/src/main/java/com/ycl/service/impl/ProjectProcessServiceImpl.java
index 439f6bc..47438f0 100644
--- a/business/src/main/java/com/ycl/service/impl/ProjectProcessServiceImpl.java
+++ b/business/src/main/java/com/ycl/service/impl/ProjectProcessServiceImpl.java
@@ -934,6 +934,7 @@
      * @param result
      */
     public void getTodoTaskList(String projectId, String processInsId, String taskName, int pageSize, int pageNum, Result result) {
+
         TaskQuery taskQuery = taskService.createTaskQuery()
                 .active()
                 .processInstanceId(processInsId)
@@ -1247,7 +1248,14 @@
                         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());
+                        }
+
                     }
                 }
                 // 缁戝畾鐨勬槸瑙掕壊鎴栬�呴儴闂�
@@ -1262,7 +1270,13 @@
                             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 {
diff --git a/business/src/main/resources/mapper/CodingRulerMapper.xml b/business/src/main/resources/mapper/CodingRulerMapper.xml
new file mode 100644
index 0000000..24e7732
--- /dev/null
+++ b/business/src/main/resources/mapper/CodingRulerMapper.xml
@@ -0,0 +1,62 @@
+<?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>
diff --git a/common/src/main/java/com/ycl/common/enums/business/CodingRulerCodeTypeEnum.java b/common/src/main/java/com/ycl/common/enums/business/CodingRulerCodeTypeEnum.java
new file mode 100644
index 0000000..a7f53d9
--- /dev/null
+++ b/common/src/main/java/com/ycl/common/enums/business/CodingRulerCodeTypeEnum.java
@@ -0,0 +1,27 @@
+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;
+    }
+
+}
diff --git a/common/src/main/java/com/ycl/common/enums/business/CodingRulerIntervalTypeEnum.java b/common/src/main/java/com/ycl/common/enums/business/CodingRulerIntervalTypeEnum.java
new file mode 100644
index 0000000..566e31d
--- /dev/null
+++ b/common/src/main/java/com/ycl/common/enums/business/CodingRulerIntervalTypeEnum.java
@@ -0,0 +1,26 @@
+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;
+    }
+
+}
diff --git a/common/src/main/java/com/ycl/common/enums/business/CodingRulerStatusEnum.java b/common/src/main/java/com/ycl/common/enums/business/CodingRulerStatusEnum.java
new file mode 100644
index 0000000..1120a43
--- /dev/null
+++ b/common/src/main/java/com/ycl/common/enums/business/CodingRulerStatusEnum.java
@@ -0,0 +1,26 @@
+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;
+    }
+}
diff --git a/system/src/main/java/com/ycl/system/service/ISysUserService.java b/system/src/main/java/com/ycl/system/service/ISysUserService.java
index 1468979..d979aef 100644
--- a/system/src/main/java/com/ycl/system/service/ISysUserService.java
+++ b/system/src/main/java/com/ycl/system/service/ISysUserService.java
@@ -215,4 +215,5 @@
     public String importUser(List<SysUser> userList, Boolean isUpdateSupport, String operName);
 
     List<SysUser> getByDept(Long deptId);
+
 }
diff --git a/system/src/main/resources/mapper/system/SysUserMapper.xml b/system/src/main/resources/mapper/system/SysUserMapper.xml
index 1eb7d74..abf1553 100644
--- a/system/src/main/resources/mapper/system/SysUserMapper.xml
+++ b/system/src/main/resources/mapper/system/SysUserMapper.xml
@@ -36,6 +36,7 @@
         <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">
@@ -50,6 +51,7 @@
 	<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

--
Gitblit v1.8.0