commit
b9d3ff53c9
|
|
@ -0,0 +1,21 @@
|
|||
package com.engine.organization.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* @Author weaver_cl
|
||||
* @Description: TODO
|
||||
* @Date 2022/5/30
|
||||
* @Version V1.0
|
||||
**/
|
||||
@Target({ElementType.ANNOTATION_TYPE})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Documented
|
||||
public @interface CheckboxPopedom {
|
||||
|
||||
String id() default "";
|
||||
|
||||
String showmethod() default "";
|
||||
|
||||
String popedompara() default "";
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
package com.engine.organization.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* @Author weaver_cl
|
||||
* @Description: TODO
|
||||
* @Date 2022/5/30
|
||||
* @Version V1.0
|
||||
**/
|
||||
@Target({ElementType.ANNOTATION_TYPE})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Documented
|
||||
public @interface OperatePopedom {
|
||||
|
||||
boolean async() default true;
|
||||
|
||||
String transmethod() default "";
|
||||
|
||||
String otherpara() default "";
|
||||
|
||||
String otherpara2() default "";
|
||||
|
||||
String column() default "";
|
||||
}
|
||||
|
|
@ -2,6 +2,7 @@ package com.engine.organization.annotation;
|
|||
|
||||
|
||||
import com.cloudstore.eccom.pc.table.WeaTableType;
|
||||
import com.engine.organization.enums.DeleteTypeEnum;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
|
|
@ -59,9 +60,16 @@ public @interface OrganizationTable {
|
|||
*/
|
||||
OrganizationTableOperate[] operates() default {};
|
||||
|
||||
/**
|
||||
* 操作按钮权限控制
|
||||
* @return
|
||||
*/
|
||||
OperatePopedom operatePopedom() default @OperatePopedom;
|
||||
|
||||
/**
|
||||
* 列表选择框
|
||||
*/
|
||||
WeaTableType tableType() default WeaTableType.NONE;
|
||||
|
||||
CheckboxPopedom checkboxPopedom() default @CheckboxPopedom;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,4 +22,6 @@ public @interface OrganizationTableOperate {
|
|||
String index() default "0";
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,9 +2,7 @@ package com.engine.organization.component;
|
|||
|
||||
import com.cloudstore.eccom.constant.WeaBoolAttr;
|
||||
import com.cloudstore.eccom.pc.table.*;
|
||||
import com.engine.organization.annotation.OrganizationTable;
|
||||
import com.engine.organization.annotation.OrganizationTableColumn;
|
||||
import com.engine.organization.annotation.OrganizationTableOperate;
|
||||
import com.engine.organization.annotation.*;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import weaver.general.PageIdConst;
|
||||
import weaver.hrm.User;
|
||||
|
|
@ -64,6 +62,13 @@ public class OrganizationWeaTable<T> extends WeaTable {
|
|||
operateList.add(weaTableOperate);
|
||||
});
|
||||
WeaTableOperates weaTableOperates = new WeaTableOperates();
|
||||
OperatePopedom popedoms = table.operatePopedom();
|
||||
WeaTablePopedom popedom = new WeaTablePopedom();
|
||||
if (popedoms != null && !"".equals(popedoms.transmethod())) {
|
||||
popedom.setTransmethod(popedoms.transmethod());
|
||||
popedom.setOtherpara(popedoms.otherpara());
|
||||
weaTableOperates.setPopedom(popedom);
|
||||
}
|
||||
weaTableOperates.setOperate(operateList);
|
||||
super.setOperates(weaTableOperates);
|
||||
}
|
||||
|
|
@ -72,9 +77,13 @@ public class OrganizationWeaTable<T> extends WeaTable {
|
|||
//设置check是否可用
|
||||
if (weaTableTypeEnum == WeaTableType.CHECKBOX) {
|
||||
super.setTableType(weaTableTypeEnum);
|
||||
// WeaTableCheckboxpopedom checkboxpopedom = new WeaTableCheckboxpopedom();
|
||||
// checkboxpopedom.setShowmethod("true");
|
||||
// super.setCheckboxpopedom(checkboxpopedom);
|
||||
CheckboxPopedom checkPopedom = table.checkboxPopedom();
|
||||
WeaTableCheckboxpopedom checkboxpopedom = new WeaTableCheckboxpopedom();
|
||||
if (checkPopedom != null && !"".equals(checkPopedom.showmethod())){
|
||||
checkboxpopedom.setShowmethod(checkPopedom.showmethod());
|
||||
checkboxpopedom.setPopedompara(checkPopedom.popedompara());
|
||||
}
|
||||
super.setCheckboxpopedom(checkboxpopedom);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
package com.engine.organization.entity.scheme.vo;
|
||||
|
||||
import com.engine.organization.annotation.OrganizationTable;
|
||||
import com.engine.organization.annotation.OrganizationTableColumn;
|
||||
import com.engine.organization.annotation.OrganizationTableOperate;
|
||||
import com.cloudstore.eccom.pc.table.WeaTableType;
|
||||
import com.engine.organization.annotation.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
|
@ -29,7 +28,10 @@ import lombok.NoArgsConstructor;
|
|||
operates = {
|
||||
@OrganizationTableOperate(index = "0", text = "编辑"),
|
||||
@OrganizationTableOperate(index = "1", text = "删除")
|
||||
}
|
||||
},
|
||||
tableType = WeaTableType.CHECKBOX,
|
||||
operatePopedom = @OperatePopedom(transmethod = "com.engine.organization.util.ConfigTrans.formatSourceOperates",otherpara = "column:forbidden_tag"),
|
||||
checkboxPopedom = @CheckboxPopedom(showmethod = "com.engine.organization.util.ConfigTrans.getCheckBoxPopedom",popedompara = "column:forbidden_tag")
|
||||
)
|
||||
public class SchemeTableVO {
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ package com.engine.organization.service.impl;
|
|||
import com.api.browser.bean.SearchConditionGroup;
|
||||
import com.api.browser.bean.SearchConditionItem;
|
||||
import com.cloudstore.eccom.pc.table.WeaTableCheckboxpopedom;
|
||||
import com.cloudstore.eccom.pc.table.WeaTableOperate;
|
||||
import com.cloudstore.eccom.pc.table.WeaTableOperates;
|
||||
import com.cloudstore.eccom.pc.table.WeaTablePopedom;
|
||||
import com.cloudstore.eccom.result.WeaResultMsg;
|
||||
import com.engine.core.impl.Service;
|
||||
|
|
@ -22,6 +24,7 @@ import org.apache.commons.lang3.StringUtils;
|
|||
import weaver.conn.RecordSet;
|
||||
import weaver.general.StringUtil;
|
||||
import weaver.general.Util;
|
||||
import weaver.systeminfo.SystemEnv;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
|
@ -43,11 +46,6 @@ public class SchemeServiceImpl extends Service implements SchemeService {
|
|||
|
||||
String sqlWhere = buildSqlWhere(params);
|
||||
table.setSqlwhere(sqlWhere);
|
||||
|
||||
WeaTableCheckboxpopedom checkboxpopedom = new WeaTableCheckboxpopedom();
|
||||
checkboxpopedom.setShowmethod("com.engine.organization.util.ConfigTrans.getCheckBoxPopedom");
|
||||
checkboxpopedom.setPopedompara("column:forbidden_tag");
|
||||
table.setCheckboxpopedom(checkboxpopedom);
|
||||
WeaResultMsg result = new WeaResultMsg(false);
|
||||
result.putAll(table.makeDataResult());
|
||||
result.success();
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
package com.engine.organization.util;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author weaver_cl
|
||||
* @Description: TODO
|
||||
|
|
@ -14,4 +18,16 @@ public class ConfigTrans {
|
|||
else
|
||||
return "false";
|
||||
}
|
||||
|
||||
public static List<Object> formatSourceOperates(String id,String isDefault) {
|
||||
List list = Lists.newArrayList();
|
||||
list.add(true);
|
||||
if ("0".equals(isDefault)) {
|
||||
list.add(true);
|
||||
} else {
|
||||
list.add(false);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue