diff --git a/src/com/engine/organization/annotation/OrganizationFormulaVar.java b/src/com/engine/organization/annotation/OrganizationFormulaVar.java
deleted file mode 100644
index 95b4063e..00000000
--- a/src/com/engine/organization/annotation/OrganizationFormulaVar.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package com.engine.organization.annotation;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * 薪资公式计算器-变量
- *
Copyright: Copyright (c) 2022
- * Company: 泛微软件
- *
- * @author qiantao
- * @version 1.0
- **/
-@Target({ElementType.FIELD})
-@Retention(RetentionPolicy.RUNTIME)
-public @interface OrganizationFormulaVar {
-
- int labelId();
-
- String defaultLabel();
-
- String dataType();
-
- String fieldId() default "";
-}
diff --git a/src/com/engine/organization/common/BaseQueryParam.java b/src/com/engine/organization/common/BaseQueryParam.java
deleted file mode 100644
index 3b732e6f..00000000
--- a/src/com/engine/organization/common/BaseQueryParam.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package com.engine.organization.common;
-
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-/**
- * @Author weaver_cl
- * @Description: TODO 基础查询参数
- * @Date 2022/3/17
- * @Version V1.0
- **/
-@Data
-@NoArgsConstructor
-@AllArgsConstructor
-public class BaseQueryParam {
- //当前页码
- private Integer current = 1;
-
- //每页数据条数
- private Integer pageSize = 10;
-}
diff --git a/src/com/engine/organization/common/LocalDateRange.java b/src/com/engine/organization/common/LocalDateRange.java
deleted file mode 100644
index 670962f2..00000000
--- a/src/com/engine/organization/common/LocalDateRange.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package com.engine.organization.common;
-
-import com.fasterxml.jackson.annotation.JsonFormat;
-import lombok.AllArgsConstructor;
-import lombok.Builder;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-import lombok.experimental.Accessors;
-
-import java.util.Date;
-
-/**
- * 日期范围
- * Copyright: Copyright (c) 2022
- * Company: 泛微软件
- *
- * @author qiantao
- * @version 1.0
- **/
-@Data
-@Builder
-@Accessors(chain = true)
-@NoArgsConstructor
-@AllArgsConstructor
-public class LocalDateRange {
-
- //"开始日期
- @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
- private Date fromDate;
-
- //结束日期
- @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
- private Date endDate;
-
-
-}
diff --git a/src/com/engine/organization/entity/QueryParam.java b/src/com/engine/organization/entity/QueryParam.java
new file mode 100644
index 00000000..31b6c31d
--- /dev/null
+++ b/src/com/engine/organization/entity/QueryParam.java
@@ -0,0 +1,36 @@
+package com.engine.organization.entity;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import weaver.general.StringUtil;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * @Author dxfeng
+ * @Description: TODO
+ * @Date 2022/5/9
+ * @Version V1.0
+ **/
+@Data
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+public class QueryParam {
+ private String ids;
+
+ public Collection getIds() {
+ if(StringUtil.isEmpty(ids)){
+ return new ArrayList<>();
+ }
+ List collect = Arrays.stream(ids.split(",")).map(item -> Long.parseLong(item)).collect(Collectors.toList());
+ return collect;
+ }
+
+}
diff --git a/src/com/engine/organization/entity/scheme/dto/SchemeDTO.java b/src/com/engine/organization/entity/scheme/dto/SchemeDTO.java
new file mode 100644
index 00000000..7792bdc8
--- /dev/null
+++ b/src/com/engine/organization/entity/scheme/dto/SchemeDTO.java
@@ -0,0 +1,94 @@
+package com.engine.organization.entity.scheme.dto;
+
+import com.engine.organization.entity.scheme.param.SchemeSearchParam;
+import com.engine.organization.entity.scheme.po.SchemePO;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.Date;
+import java.util.Map;
+/**
+ * @Author dxfeng
+ * @Description: TODO
+ * @Date 2022/5/9
+ * @Version V1.0
+ **/
+@Data
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+public class SchemeDTO {
+ /**
+ * 自增主键
+ */
+ private long id;
+ /**
+ * 编号
+ */
+ private String schemeNo;
+ /**
+ * 方案名称
+ */
+ private String schemeName;
+ /**
+ * 方案说明
+ */
+ private String schemeDescription;
+ /**
+ * 禁用标记
+ */
+ private int forbiddenTag;
+ /**
+ *
+ */
+ private Long creator;
+ /**
+ *
+ */
+ private int deleteType;
+ /**
+ *
+ */
+ private Date createTime;
+ /**
+ *
+ */
+ private Date updateTime;
+
+ public static SchemePO convertToPO(Map param, Long employeeId) {
+ if (param == null) {
+ return null;
+ }
+ return SchemePO.builder()
+ .id(param.get("id") == null ? 0 : Integer.parseInt((String) param.get("id")))
+ .schemeNo(param.get("scheme_no") == null ? null : (String) param.get("scheme_no"))
+ .schemeName(param.get("scheme_name") == null ? null : (String) param.get("scheme_name"))
+ .schemeDescription(param.get("scheme_description") == null ? null : (String) param.get("descrscheme_descriptioniption"))
+ .forbiddenTag(param.get("forbidden_tag") == null ? 0 : Integer.parseInt((String) param.get("forbidden_tag")))
+ .deleteType(0)
+ .createTime(new Date())
+ .updateTime(new Date())
+ .creator(employeeId)
+ .build();
+ }
+
+ public static SchemePO convertParamToPO(SchemeSearchParam param, Long employeeId) {
+ if (param == null) {
+ return null;
+ }
+ return SchemePO.builder()
+ .id(param.getId() == null ? 0 : param.getId())
+ .schemeNo(param.getSchemeNo() == null ? null : param.getSchemeNo())
+ .schemeName(param.getSchemeName() == null ? null : param.getSchemeName())
+ .schemeDescription(param.getSchemeDescription() == null ? null : param.getSchemeDescription())
+ .forbiddenTag(param.getForbiddenTag() == null ? 0 : param.getForbiddenTag() ? 1 : 0)
+ .deleteType(0)
+ .createTime(new Date())
+ .updateTime(new Date())
+ .creator(employeeId)
+ .build();
+ }
+
+}
diff --git a/src/com/engine/organization/entity/scheme/param/SchemeSearchParam.java b/src/com/engine/organization/entity/scheme/param/SchemeSearchParam.java
index 53652b05..18a3112a 100644
--- a/src/com/engine/organization/entity/scheme/param/SchemeSearchParam.java
+++ b/src/com/engine/organization/entity/scheme/param/SchemeSearchParam.java
@@ -1,34 +1,41 @@
package com.engine.organization.entity.scheme.param;
-import com.engine.organization.common.BaseQueryParam;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
- * 薪资项目查询参数
- * Copyright: Copyright (c) 2022
- * Company: 泛微软件
- *
- * @author qiantao
- * @version 1.0
+ * @Author dxfeng
+ * @Description: TODO
+ * @Date 2022/5/9
+ * @Version V1.0
**/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
- public class SchemeSearchParam extends BaseQueryParam {
+public class SchemeSearchParam {
private Long id;
- //名称
+ /**
+ * 编号
+ */
private String schemeNo;
- //备注
+ /**
+ * 名称
+ */
private String schemeName;
+ /**
+ * 方案说明
+ */
private String schemeDescription;
- private Integer forbiddenTag;
+ /**
+ * 禁用标记
+ */
+ private Boolean forbiddenTag;
}
diff --git a/src/com/engine/organization/entity/scheme/po/SchemePO.java b/src/com/engine/organization/entity/scheme/po/SchemePO.java
index a4eb2d6e..9561eeef 100644
--- a/src/com/engine/organization/entity/scheme/po/SchemePO.java
+++ b/src/com/engine/organization/entity/scheme/po/SchemePO.java
@@ -1,13 +1,11 @@
package com.engine.organization.entity.scheme.po;
-import com.engine.organization.entity.scheme.param.SchemeSearchParam;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
-import java.util.Map;
@Data
@Builder
@@ -51,38 +49,4 @@ public class SchemePO {
*/
private Date updateTime;
- public static SchemePO convertToPO(Map param, Long employeeId) {
- if (param == null) {
- return null;
- }
- return SchemePO.builder()
- .id(param.get("id") == null ? 0 : Integer.parseInt((String)param.get("id")))
- .schemeNo(param.get("scheme_no") == null ? null : (String) param.get("scheme_no"))
- .schemeName(param.get("scheme_name") == null ? null : (String) param.get("scheme_name"))
- .schemeDescription(param.get("scheme_description") == null ? null : (String) param.get("descrscheme_descriptioniption"))
- .forbiddenTag(param.get("forbidden_tag") == null ? 0 : Integer.parseInt((String)param.get("forbidden_tag")))
- .deleteType(0)
- .createTime(new Date())
- .updateTime(new Date())
- .creator(employeeId)
- .build();
- }
-
- public static SchemePO convertParamToPO(SchemeSearchParam param, Long employeeId) {
- if (param == null) {
- return null;
- }
- return SchemePO.builder()
- .id(param.getId() == null ? 0 : param.getId())
- .schemeNo(param.getSchemeNo() == null ? null : param.getSchemeNo())
- .schemeName(param.getSchemeName() == null ? null : param.getSchemeName())
- .schemeDescription(param.getSchemeDescription() == null ? null : param.getSchemeDescription())
- .forbiddenTag(param.getForbiddenTag() == null ? 0 : param.getForbiddenTag())
- .deleteType(0)
- .createTime(new Date())
- .updateTime(new Date())
- .creator(employeeId)
- .build();
- }
-
}
diff --git a/src/com/engine/organization/mapper/scheme/SchemeMapper.java b/src/com/engine/organization/mapper/scheme/SchemeMapper.java
index 7d25d9ed..2e75cbcf 100644
--- a/src/com/engine/organization/mapper/scheme/SchemeMapper.java
+++ b/src/com/engine/organization/mapper/scheme/SchemeMapper.java
@@ -9,31 +9,43 @@ import java.util.Collection;
import java.util.List;
/**
- * @Author weaver_cl
+ * @Author dxfeng
* @Description: TODO
- * @Date 2022/3/9
+ * @Date 2022/5/9
* @Version V1.0
**/
public interface SchemeMapper {
/**
- * 根据ID查询登记方案
+ * 根据No查询登记方案
+ *
* @param schemeNo
* @return
*/
- @Select("select * from jcl_org_scheme t where scheme_no = #{schemeNo}")
+ @Select("select * from jcl_org_scheme t where scheme_no = #{schemeNo} AND delete_type = 0")
List listByNo(String schemeNo);
+ /**
+ * 根据ID查询登记方案
+ *
+ * @param id
+ * @return
+ */
+ @Select("select * from jcl_org_scheme t where id = #{id} AND delete_type = 0")
+ SchemePO getSchemeByID(@Param("id") long id);
+
/**
* 根据ID查询登记方案列表
+ *
* @param ids
* @return
*/
- List listSchemesById(@Param("ids") Collection ids);
+ List listSchemesByIds(@Param("ids") Collection ids);
/**
* 新增,忽略null字段
+ *
* @param schemePO
* @return
*/
@@ -41,6 +53,7 @@ public interface SchemeMapper {
/**
* 修改,修改所有字段
+ *
* @param schemePO
* @return
*/
@@ -48,20 +61,12 @@ public interface SchemeMapper {
/**
* 更新禁用标记
+ *
* @param schemePO
* @return
*/
int updateForbiddenTagById(SchemePO schemePO);
-
- /**
- * 删除记录
- *
- * @param schemePO 待删除的记录
- * @return 返回影响行数
- */
- int deleteScheme(SchemePO schemePO);
-
/**
* 批量删除登记方案
*
diff --git a/src/com/engine/organization/mapper/scheme/SchemeMapper.xml b/src/com/engine/organization/mapper/scheme/SchemeMapper.xml
index 6a66f39d..4382a663 100644
--- a/src/com/engine/organization/mapper/scheme/SchemeMapper.xml
+++ b/src/com/engine/organization/mapper/scheme/SchemeMapper.xml
@@ -28,7 +28,7 @@
, t.update_time
-