Browse Source

代码提交

wangchangsheng 2 years ago
parent
commit
5c4afab722

+ 5 - 5
ims-service/ims-eval/src/main/java/com/ims/eval/controller/DataDictionaryController.java

@@ -1,8 +1,8 @@
 package com.ims.eval.controller;
 
 
+import com.ims.eval.dao.result.R;
 import com.ims.eval.entity.DataDictionary;
-import com.ims.eval.entity.dto.result.R;
 import com.ims.eval.service.IDataDictionaryService;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -29,9 +29,9 @@ public class DataDictionaryController {
 	//@ImsPreAuth("eval:dataDictionary:view")
 	@GetMapping(value = "list")
 	public R list(@RequestParam(value = "id", required = false) String id,
-									 @RequestParam(value = "dataKey", required = false) String dataKey,
-									 @RequestParam(value = "keyName", required = false) String keyName,
-									 @RequestParam(value = "superKey", required = false) String superKey ) {
+				  @RequestParam(value = "dataKey", required = false) String dataKey,
+				  @RequestParam(value = "keyName", required = false) String keyName,
+				  @RequestParam(value = "superKey", required = false) String superKey ) {
 		List<DataDictionary> list = dataDictionaryService.list(id,dataKey,keyName,superKey);
 		return R.ok().data(list);
 	}
@@ -44,7 +44,7 @@ public class DataDictionaryController {
 	 */
 
 	//@ImsPreAuth("eval:dataDictionary:edit")
-	@PostMapping(value = "/add-dictionary")
+	@PostMapping(value = "/save")
 	@ApiOperation(value = "新增(修改)", notes = "新增(修改)")
 	public R addAll(@RequestBody DataDictionary dictionary) {
 

+ 59 - 3
ims-service/ims-eval/src/main/java/com/ims/eval/controller/IndicatorController.java

@@ -1,12 +1,19 @@
 package com.ims.eval.controller;
 
 
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import com.ims.eval.dao.result.R;
+import com.ims.eval.entity.DataDictionary;
+import com.ims.eval.entity.Indicator;
+import com.ims.eval.service.IIndicatorService;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
 
 /**
  * <p>
- *  前端控制器
+ * 前端控制器
  * </p>
  *
  * @author wang
@@ -16,4 +23,53 @@ import org.springframework.web.bind.annotation.RestController;
 @RequestMapping("//indicator")
 public class IndicatorController {
 
+
+	@Autowired
+	private IIndicatorService iIndicatorService;
+
+
+	/**
+	 *
+	 * @param id 主键ID
+	 * @param indicatorName 指标名称
+	 * @param indicatorCede 指标编码
+	 * @param binSection 业务版块
+	 * @param binStage 业务阶段
+	 * @param dept 部门
+	 * @param company 公司
+	 * @return
+	 */
+	//@ImsPreAuth("eval:dataDictionary:view")
+	@GetMapping(value = "list")
+	public R list(@RequestParam(value = "id", required = false) String id,
+				  @RequestParam(value = "indicatorName", required = false) String indicatorName,
+				  @RequestParam(value = "indicatorCede", required = false) String indicatorCede,
+				  @RequestParam(value = "binSection", required = false) String binSection,
+				  @RequestParam(value = "binStage", required = false) String binStage,
+				  @RequestParam(value = "dept", required = false) String dept,
+				  @RequestParam(value = "company", required = false) String company) {
+		List<Indicator> list = iIndicatorService.list(id, indicatorName, indicatorCede, binSection,binStage,dept,company);
+		return R.ok().data(list);
+	}
+
+	/**
+	 * 添加
+	 * @param indicator
+	 * @return
+	 */
+
+	//@ImsPreAuth("eval:dataDictionary:edit")
+	@PostMapping(value = "/save")
+	@ApiOperation(value = "新增(修改)", notes = "新增(修改)")
+	public R addAll(@RequestBody Indicator indicator) {
+
+		boolean b = iIndicatorService.saveOrUpdate(indicator);
+		if (b) {
+			return R.ok().data(b);
+		} else {
+			return R.error().data("保存失败!");
+		}
+	}
+
+
 }

+ 80 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/entity/DataDictionary.java

@@ -0,0 +1,80 @@
+package com.ims.eval.entity;
+
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.time.LocalDate;
+
+/**
+ * <p>
+ * 数据字典表
+ * </p>
+ *
+ * @author wang
+ * @since 2023-02-26
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class DataDictionary extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键ID
+     */
+    private String id;
+
+
+	/**
+	 * 数据key
+	 */
+	private String dataKey;
+
+    /**
+     * 名称
+     */
+    private String keyName;
+
+    /**
+     * 对应值
+     */
+    private String keyValue;
+
+    /**
+     * 描述
+     */
+    private String des;
+
+    /**
+     * 父类key
+     */
+    private String superKey;
+
+    /**
+     * 创建时间
+     */
+    private LocalDate createTime;
+
+    /**
+     * 创建者
+     */
+    private String createBy;
+
+    /**
+     * 更新时间
+     */
+    private LocalDate updateTime;
+
+    /**
+     * 更新者
+     */
+    private String updateBy;
+
+	/**
+	 * 排序字段
+	 */
+	private Integer orderNum;
+
+
+}

+ 3 - 5
ims-service/ims-eval/src/main/java/com/ims/eval/entity/DeptResponsibility.java

@@ -3,12 +3,10 @@
  */
 package com.ims.eval.entity;
 
-import java.math.BigDecimal;
-import java.sql.Timestamp;
+import com.ims.core.entity.DataEntity;
+
 import java.util.Date;
 
-import com.ims.core.entity.DataEntity;
-import com.fasterxml.jackson.annotation.JsonIgnore;
 /**
  * 部门目标责任表Entity
  * @author wang
@@ -156,4 +154,4 @@ public class DeptResponsibility extends DataEntity<DeptResponsibility> {
 		this.remark = remark;
 	}
 
-}
+}

+ 3 - 5
ims-service/ims-eval/src/main/java/com/ims/eval/entity/DeptResponsibilityTarget.java

@@ -3,12 +3,10 @@
  */
 package com.ims.eval.entity;
 
+import com.ims.core.entity.DataEntity;
+
 import java.math.BigDecimal;
-import java.sql.Timestamp;
-import java.util.Date;
 
-import com.ims.core.entity.DataEntity;
-import com.fasterxml.jackson.annotation.JsonIgnore;
 /**
  * 目标责任书指标Entity
  * @author wang
@@ -316,4 +314,4 @@ public class DeptResponsibilityTarget extends DataEntity<DeptResponsibilityTarge
 		this.actual12 = actual12;
 	}
 
-}
+}

+ 108 - 144
ims-service/ims-eval/src/main/java/com/ims/eval/entity/Indicator.java

@@ -1,151 +1,115 @@
-/**
- *
- */
 package com.ims.eval.entity;
 
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
 import java.math.BigDecimal;
-import java.sql.Timestamp;
-import java.util.Date;
+import java.time.LocalDateTime;
 
-import com.ims.core.entity.DataEntity;
-import com.fasterxml.jackson.annotation.JsonIgnore;
 /**
- * 指标Entity
+ * <p>
+ *
+ * </p>
+ *
  * @author wang
- * @version 2023-02-25
+ * @since 2023-02-26
  */
-public class Indicator extends DataEntity<Indicator> {
-
-	private static final long serialVersionUID = 1L;
-	private String indicatorName;		// 指标名称
-	private String indicatorCede;		// 指标编码
-	private String unit;		// 指标单位
-	private String isQuantified;		// 能否量化
-	private String isAdditional;		// 是否专项
-	private String des;		// 描述
-	private String binSection;		// 业务版块
-	private String binStage;		// 业务阶段
-	private String dept;		// 部门
-	private String company;		// 公司
-	private Boolean enable;		// 是否启用
-	private Date createTime;		// 创建时间
-	private Date updateTime;		// 修改时间
-	private String remark;		// 备注
-	private BigDecimal orderNum;		// 排序
-
-
-	public Indicator() {
-		super();
-	}
-
-	public Indicator(String id){
-		super(id);
-	}
-
-	public String getIndicatorName() {
-		return indicatorName;
-	}
-
-	public void setIndicatorName(String indicatorName) {
-		this.indicatorName = indicatorName;
-	}
-	public String getIndicatorCede() {
-		return indicatorCede;
-	}
-
-	public void setIndicatorCede(String indicatorCede) {
-		this.indicatorCede = indicatorCede;
-	}
-	public String getUnit() {
-		return unit;
-	}
-
-	public void setUnit(String unit) {
-		this.unit = unit;
-	}
-	public String getIsQuantified() {
-		return isQuantified;
-	}
-
-	public void setIsQuantified(String isQuantified) {
-		this.isQuantified = isQuantified;
-	}
-	public String getIsAdditional() {
-		return isAdditional;
-	}
-
-	public void setIsAdditional(String isAdditional) {
-		this.isAdditional = isAdditional;
-	}
-	public String getDes() {
-		return des;
-	}
-
-	public void setDes(String des) {
-		this.des = des;
-	}
-	public String getBinSection() {
-		return binSection;
-	}
-
-	public void setBinSection(String binSection) {
-		this.binSection = binSection;
-	}
-	public String getBinStage() {
-		return binStage;
-	}
-
-	public void setBinStage(String binStage) {
-		this.binStage = binStage;
-	}
-	public String getDept() {
-		return dept;
-	}
-
-	public void setDept(String dept) {
-		this.dept = dept;
-	}
-	public String getCompany() {
-		return company;
-	}
-
-	public void setCompany(String company) {
-		this.company = company;
-	}
-	public Boolean getEnable() {
-		return enable;
-	}
-
-	public void setEnable(Boolean enable) {
-		this.enable = enable;
-	}
-	public Date getCreateTime() {
-		return createTime;
-	}
-
-	public void setCreateTime(Date createTime) {
-		this.createTime = createTime;
-	}
-	public Date getUpdateTime() {
-		return updateTime;
-	}
-
-	public void setUpdateTime(Date updateTime) {
-		this.updateTime = updateTime;
-	}
-	public String getRemark() {
-		return remark;
-	}
-
-	public void setRemark(String remark) {
-		this.remark = remark;
-	}
-	public BigDecimal getOrderNum() {
-		return orderNum;
-	}
-
-	public void setOrderNum(BigDecimal orderNum) {
-		this.orderNum = orderNum;
-	}
-
-}
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class Indicator extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    private String id;
+
+    /**
+     * 指标名称
+     */
+    private String indicatorName;
+
+    /**
+     * 指标编码
+     */
+    private String indicatorCede;
+
+    /**
+     * 指标单位
+     */
+    private String unit;
+
+    /**
+     * 能否量化
+     */
+    private String isQuantified;
+
+    /**
+     * 是否专项
+     */
+    private String isAdditional;
+
+    /**
+     * 描述
+     */
+    private String des;
+
+    /**
+     * 业务版块
+     */
+    private String binSection;
+
+    /**
+     * 业务阶段
+     */
+    private String binStage;
+
+    /**
+     * 部门
+     */
+    private String dept;
+
+    /**
+     * 公司
+     */
+    private String company;
+
+    /**
+     * 是否启用
+     */
+    private Boolean enable;
+
+    /**
+     * 创建时间
+     */
+    private LocalDateTime createTime;
+
+    /**
+     * 修改时间
+     */
+    private LocalDateTime updateTime;
+
+    /**
+     * 创建者
+     */
+    private String createBy;
+
+    /**
+     * 更新者
+     */
+    private String updateBy;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    /**
+     * 排序
+     */
+    private BigDecimal orderNum;
+
+
+}

+ 66 - 79
ims-service/ims-eval/src/main/java/com/ims/eval/entity/IndicatorDictionary.java

@@ -1,88 +1,75 @@
-/**
- *
- */
 package com.ims.eval.entity;
 
-import com.alibaba.fastjson.annotation.JSONField;
-import com.ims.core.entity.DataEntity;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
 
-import java.util.Date;
+import java.math.BigDecimal;
+import java.time.LocalDate;
 
 /**
- * 指标字典表Entity
+ * <p>
+ * 指标字典表
+ * </p>
+ *
  * @author wang
- * @version 2023-02-25
+ * @since 2023-02-26
  */
-public class IndicatorDictionary extends DataEntity<IndicatorDictionary> {
-
-	private static final long serialVersionUID = 1L;
-	private String indicatorId;		// 指标ID
-	private String optionCode;		// 选项编码
-	private String optionName;		// 选项名称
-	private Integer optionOrder;		// 选项顺序
-	private String des;		// 描述
-	private Date createTime;		// 创建时间
-	private Date updateTime;		// 更新时间
-
-
-	public IndicatorDictionary() {
-		super();
-	}
-
-	public IndicatorDictionary(String id){
-		super(id);
-	}
-
-	public String getIndicatorId() {
-		return indicatorId;
-	}
-
-	public void setIndicatorId(String indicatorId) {
-		this.indicatorId = indicatorId;
-	}
-	public String getOptionCode() {
-		return optionCode;
-	}
-
-	public void setOptionCode(String optionCode) {
-		this.optionCode = optionCode;
-	}
-	public String getOptionName() {
-		return optionName;
-	}
-
-	public void setOptionName(String optionName) {
-		this.optionName = optionName;
-	}
-	public Integer getOptionOrder() {
-		return optionOrder;
-	}
-
-	public void setOptionOrder(Integer optionOrder) {
-		this.optionOrder = optionOrder;
-	}
-	public String getDes() {
-		return des;
-	}
-
-	public void setDes(String des) {
-		this.des = des;
-	}
-	@JSONField(format = "yyyy-MM-dd HH:mm:ss")
-	public Date getCreateTime() {
-		return createTime;
-	}
-
-	public void setCreateTime(Date createTime) {
-		this.createTime = createTime;
-	}
-	@JSONField(format = "yyyy-MM-dd HH:mm:ss")
-	public Date getUpdateTime() {
-		return updateTime;
-	}
-
-	public void setUpdateTime(Date updateTime) {
-		this.updateTime = updateTime;
-	}
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class IndicatorDictionary extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键ID
+     */
+    private String id;
+
+    /**
+     * 指标ID
+     */
+    private String indicatorId;
+
+    /**
+     * 选项编码
+     */
+    private String optionCode;
+
+    /**
+     * 选项名称
+     */
+    private String optionName;
+
+    /**
+     * 选项顺序
+     */
+    private BigDecimal optionOrder;
+
+    /**
+     * 描述
+     */
+    private String des;
+
+    /**
+     * 创建者
+     */
+    private String createBy;
+
+    /**
+     * 创建时间
+     */
+    private LocalDate createTime;
+
+    /**
+     * 更新者
+     */
+    private String updateBy;
+
+    /**
+     * 更新时间
+     */
+    private LocalDate updateTime;
+
 
 }

+ 71 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/entity/result/R.java

@@ -0,0 +1,71 @@
+package com.ims.eval.entity.result;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * @ClassName : R
+ * @Author : xieshengjie
+ * @Date: 2021/5/16 16:59
+ * @Description : 结果集
+ */
+@Data
+public class R {
+    @ApiModelProperty(value = "是否成功")
+    private Boolean success;
+    @ApiModelProperty(value = "返回码")
+    private Integer code;
+    @ApiModelProperty(value = "返回消息")
+    private String message;
+    @ApiModelProperty(value = "总数量")
+    private Integer count;
+    @ApiModelProperty(value = "返回数据")
+    private Object data = new Object();
+    private R(){}
+    public static R ok(){
+        R r = new R();
+        r.setSuccess(true);
+        r.setCode(ResultCode.SUCCESS);
+        r.setMessage("成功");
+        return r;
+    }
+    public static R ok(Integer count){
+        R r = new R();
+        r.setSuccess(true);
+        r.setCode(ResultCode.SUCCESS);
+        r.setMessage("成功");
+        r.setCount(count);
+        return r;
+    }
+    public static R error(){
+        R r = new R();
+        r.setSuccess(false);
+        r.setCode(ResultCode.ERROR);
+        r.setMessage("失败");
+        return r;
+    }
+    public R success(Boolean success){
+        this.setSuccess(success);
+        return this;
+    }
+    public R message(String message){
+        this.setMessage(message);
+        return this;
+    }
+    public R code(Integer code){
+        this.setCode(code);
+        return this;
+    }
+//    public R data(String key, Object value){
+//        this.data.put(key, value);
+//        return this;
+//    }
+//    public R data(Map<String, Object> map){
+//        this.setData(map);
+//        return this;
+//    }
+    public R data(Object value){
+        this.setData(value);
+        return this;
+    }
+}

+ 12 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/entity/result/ResultCode.java

@@ -0,0 +1,12 @@
+package com.ims.eval.entity.result;
+
+/**
+ * @ClassName : ResultCode
+ * @Author : xieshengjie
+ * @Date: 2021/5/16 17:01
+ * @Description : 结果状态
+ */
+public class ResultCode {
+    public static Integer SUCCESS = 200;
+    public static Integer ERROR = 500;
+}

+ 87 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/entity/result/ResultInfo.java

@@ -0,0 +1,87 @@
+package com.ims.eval.entity.result;
+
+import lombok.Data;
+
+/**
+ *@ClassName ResultInfo
+ *@Description 返回结果类统一封装
+ *@Author 谢生杰
+ *@Date 2020/9/25 18:53
+ *@Version 1.0
+ **/
+@Data
+public class ResultInfo {
+    // 状态码
+    private Integer code;
+    // 消息
+    private String message;
+    // 数据对象
+    private Object result;
+
+    private Integer total;
+
+    /**
+     * 无参构造器
+     */
+    public ResultInfo() {
+        super();
+    }
+
+    public ResultInfo(Status status) {
+        super();
+        this.code = status.code;
+        this.message = status.message;
+    }
+
+    public ResultInfo result(Object result) {
+        this.result = result;
+        return this;
+    }
+
+    public ResultInfo message(String message) {
+        this.message = message;
+        return this;
+    }
+    public ResultInfo total(Integer total) {
+        this.total = total;
+        return this;
+    }
+
+    /**
+     * 只返回状态,状态码,消息
+     *
+     * @param code
+     * @param message
+     */
+    public ResultInfo(Integer code, String message) {
+        super();
+        this.code = code;
+        this.message = message;
+    }
+
+    /**
+     * 只返回状态,状态码,数据对象
+     *
+     * @param code
+     * @param result
+     */
+    public ResultInfo(Integer code, Object result) {
+        super();
+        this.code = code;
+        this.result = result;
+    }
+
+    /**
+     * 返回全部信息即状态,状态码,消息,数据对象
+     *
+     * @param code
+     * @param message
+     * @param result
+     */
+    public ResultInfo(Integer code, String message, Object result) {
+        super();
+        this.code = code;
+        this.message = message;
+        this.result = result;
+    }
+}

+ 42 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/entity/result/Status.java

@@ -0,0 +1,42 @@
+package com.ims.eval.entity.result;
+/**
+ *@ClassName Status
+ *@Description 枚举类对象
+ *@Author 谢生杰
+ *@Date 2020/9/25 18:54
+ *@Version 1.0
+ **/
+public enum Status {
+    // 公共
+    SUCCESS(2000, "成功"),
+    UNKNOWN_ERROR(9998,"未知异常"),
+    SYSTEM_ERROR(9999, "系统异常"),
+
+
+    INSUFFICIENT_PERMISSION(4003, "权限不足"),
+
+    WARN(9000, "失败"),
+    REQUEST_PARAMETER_ERROR(1002, "请求参数错误"),
+
+
+
+    // 登录
+    LOGIN_EXPIRE(2001, "未登录或者登录失效"),
+    LOGIN_CODE_ERROR(2002, "登录验证码错误"),
+    LOGIN_ERROR(2003, "用户名不存在或密码错误"),
+    LOGIN_USER_STATUS_ERROR(2004, "用户状态不正确"),
+    LOGOUT_ERROR(2005, "退出失败,token不存在"),
+    LOGIN_USER_NOT_EXIST(2006, "该用户不存在"),
+    LOGIN_USER_EXIST(2007, "该用户已存在");
+
+
+
+
+    public int code;
+    public String message;
+
+    Status(int code, String message) {
+        this.code = code;
+        this.message = message;
+    }
+}

+ 1 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/service/IDataDictionaryService.java

@@ -18,4 +18,5 @@ public interface IDataDictionaryService extends IService<DataDictionary> {
 	List<DataDictionary> list(String id,String dataKey,String keyName,String superKey);
 
 
+
 }

+ 4 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/service/IIndicatorService.java

@@ -3,6 +3,8 @@ package com.ims.eval.service;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.ims.eval.entity.Indicator;
 
+import java.util.List;
+
 /**
  * <p>
  *  服务类
@@ -13,4 +15,6 @@ import com.ims.eval.entity.Indicator;
  */
 public interface IIndicatorService extends IService<Indicator> {
 
+	List<Indicator> list(String id, String indicatorName, String indicatorCede, String binSection, String binStage, String dept, String company);
+
 }

+ 30 - 4
ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/DataDictionaryServiceImpl.java

@@ -2,6 +2,7 @@ package com.ims.eval.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ims.common.utils.StringUtils;
 import com.ims.eval.dao.DataDictionaryMapper;
 import com.ims.eval.entity.DataDictionary;
 import com.ims.eval.service.IDataDictionaryService;
@@ -22,14 +23,39 @@ public class DataDictionaryServiceImpl extends ServiceImpl<DataDictionaryMapper,
 
 	@Override
 	public List<DataDictionary> list(String id, String dataKey, String keyName, String superKey) {
+
 		QueryWrapper<DataDictionary> qw = new QueryWrapper<>();
-		qw.lambda().eq(DataDictionary::getId, id);
-		qw.lambda().eq(DataDictionary::getDataKey, dataKey);
-		qw.lambda().like(DataDictionary::getKeyName, keyName);
-		qw.lambda().eq(DataDictionary::getSuperKey, superKey);
+		if (StringUtils.isNotEmpty(id)) {
+			qw.lambda().eq(DataDictionary::getId, id);
+		}
+		if (StringUtils.isNotEmpty(dataKey)) {
+			qw.lambda().eq(DataDictionary::getDataKey, dataKey);
+		}
+		if (StringUtils.isNotEmpty(keyName)) {
+			qw.lambda().like(DataDictionary::getKeyName, keyName);
+		}
+		if (StringUtils.isNotEmpty(superKey)) {
+			qw.lambda().eq(DataDictionary::getSuperKey, superKey);
+		}
+		qw.lambda().orderByAsc(DataDictionary::getOrderNum);
+
 		List<DataDictionary> list = baseMapper.selectList(qw);
+
 		return list;
 	}
 
 
+	@Override
+	public boolean saveOrUpdate(DataDictionary entity) {
+
+		if (null != entity &&  (null == entity.getId() || "".equals(entity.getId().trim()))){
+			QueryWrapper<DataDictionary> qw = new QueryWrapper<>();
+			qw.lambda().eq(DataDictionary::getDataKey, entity.getDataKey());
+			List<DataDictionary> list = baseMapper.selectList(qw);
+			if (null !=list && list.size()>0){
+				throw  new RuntimeException("当前字典key已存在");
+			}
+		}
+		return super.saveOrUpdate(entity);
+	}
 }

+ 58 - 0
ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/IndicatorServiceImpl.java

@@ -1,11 +1,16 @@
 package com.ims.eval.service.impl;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ims.common.utils.StringUtils;
 import com.ims.eval.dao.IndicatorMapper;
+import com.ims.eval.entity.DataDictionary;
 import com.ims.eval.entity.Indicator;
 import com.ims.eval.service.IIndicatorService;
 import org.springframework.stereotype.Service;
 
+import java.util.List;
+
 /**
  * <p>
  *  服务实现类
@@ -17,4 +22,57 @@ import org.springframework.stereotype.Service;
 @Service
 public class IndicatorServiceImpl extends ServiceImpl<IndicatorMapper, Indicator> implements IIndicatorService {
 
+	@Override
+	public List<Indicator> list(String id, String indicatorName, String indicatorCede, String binSection, String binStage, String dept, String company) {
+
+		QueryWrapper<Indicator> qw = new QueryWrapper<>();
+		if (StringUtils.isNotEmpty(id)) {
+			qw.lambda().eq(Indicator::getId, id);
+		}
+
+		if (StringUtils.isNotEmpty(indicatorName)) {
+			qw.lambda().like(Indicator::getIndicatorName, indicatorName);
+		}
+
+		if (StringUtils.isNotEmpty(indicatorCede)) {
+			qw.lambda().like(Indicator::getIndicatorCede, indicatorCede);
+		}
+
+		if (StringUtils.isNotEmpty(binSection)) {
+			qw.lambda().eq(Indicator::getBinSection, binSection);
+		}
+
+		if (StringUtils.isNotEmpty(binStage)) {
+			qw.lambda().eq(Indicator::getBinStage, binStage);
+		}
+
+		if (StringUtils.isNotEmpty(dept)) {
+			qw.lambda().eq(Indicator::getDept, dept);
+		}
+
+		if (StringUtils.isNotEmpty(company)) {
+			qw.lambda().eq(Indicator::getCompany, company);
+		}
+
+		qw.lambda().orderByAsc(Indicator::getOrderNum);
+
+		List<Indicator> list = baseMapper.selectList(qw);
+		return null;
+	}
+
+	@Override
+	public boolean saveOrUpdate(Indicator entity) {
+
+
+		if (null != entity &&  (null == entity.getId() || "".equals(entity.getId().trim()))){
+			QueryWrapper<Indicator> qw = new QueryWrapper<>();
+			qw.lambda().eq(Indicator::getIndicatorCede, entity.getIndicatorCede());
+			List<Indicator> list = baseMapper.selectList(qw);
+			if (null !=list && list.size()>0){
+				throw  new RuntimeException("当前指标code已存在");
+			}
+		}
+
+		return super.saveOrUpdate(entity);
+	}
 }