等级方案 职等职级接口
This commit is contained in:
parent
2775d2486e
commit
0f9c8572a3
|
|
@ -1,26 +0,0 @@
|
|||
package com.engine.organization.entity;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
*
|
||||
* @description: TODO
|
||||
* @author:dxfeng
|
||||
* @createTime: 2022/05/09
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class TopMenuBtn {
|
||||
private String isBatch;
|
||||
private String isTop;
|
||||
private String menuFun;
|
||||
private String menuIcon;
|
||||
private String menuName;
|
||||
private String type;
|
||||
}
|
||||
|
|
@ -83,7 +83,7 @@ public class SchemeDTO {
|
|||
.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 ? null : param.getForbiddenTag() ? 1 : 0)
|
||||
.forbiddenTag(param.getForbiddenTag() == null ? 0 : param.getForbiddenTag() ? 1 : 0)
|
||||
.deleteType(0)
|
||||
.createTime(new Date())
|
||||
.updateTime(new Date())
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ package com.engine.organization.mapper.scheme;
|
|||
|
||||
import com.engine.organization.entity.scheme.po.SchemePO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
|
@ -23,8 +22,7 @@ public interface SchemeMapper {
|
|||
* @param schemeNo
|
||||
* @return
|
||||
*/
|
||||
@Select("select * from jcl_org_scheme t where scheme_no = #{schemeNo} AND delete_type = 0")
|
||||
List<SchemePO> listByNo(String schemeNo);
|
||||
List<SchemePO> listByNo(@Param("schemeNo") String schemeNo);
|
||||
|
||||
/**
|
||||
* 根据ID查询登记方案
|
||||
|
|
@ -32,7 +30,6 @@ public interface SchemeMapper {
|
|||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Select("select * from jcl_org_scheme t where id = #{id} AND delete_type = 0")
|
||||
SchemePO getSchemeByID(@Param("id") long id);
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
<select id="listSchemesByIds" parameterType="com.engine.organization.entity.scheme.po.SchemePO"
|
||||
resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="baseColumns"/>
|
||||
|
||||
from jcl_org_scheme t
|
||||
WHERE delete_type = 0
|
||||
AND id IN
|
||||
|
|
@ -40,6 +40,18 @@
|
|||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="listByNo" parameterType="com.engine.organization.entity.scheme.po.SchemePO" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="baseColumns"/>
|
||||
from jcl_org_scheme t where scheme_no = #{schemeNo} AND delete_type = 0
|
||||
</select>
|
||||
|
||||
<select id="getSchemeByID" parameterType="com.engine.organization.entity.scheme.po.SchemePO" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="baseColumns"/>
|
||||
from jcl_org_scheme t where id = #{id} AND delete_type = 0
|
||||
</select>
|
||||
|
||||
<insert id="insertIgnoreNull" parameterType="com.engine.organization.entity.scheme.po.SchemePO" keyProperty="id"
|
||||
keyColumn="id" useGeneratedKeys="true">
|
||||
INSERT INTO jcl_org_scheme
|
||||
|
|
@ -107,9 +119,6 @@
|
|||
scheme_no=#{schemeNo},
|
||||
scheme_name=#{schemeName},
|
||||
scheme_description=#{schemeDescription},
|
||||
<if test="forbiddenTag != null ">
|
||||
forbidden_tag=#{forbiddenTag},
|
||||
</if>
|
||||
</set>
|
||||
WHERE id = #{id} AND delete_type = 0
|
||||
</update>
|
||||
|
|
|
|||
|
|
@ -5,13 +5,13 @@ import com.api.browser.bean.SearchConditionItem;
|
|||
import com.cloudstore.eccom.result.WeaResultMsg;
|
||||
import com.engine.core.impl.Service;
|
||||
import com.engine.organization.component.OrganizationWeaTable;
|
||||
import com.engine.organization.entity.TopMenuBtn;
|
||||
import com.engine.organization.entity.scheme.dto.SchemeDTO;
|
||||
import com.engine.organization.entity.scheme.param.SchemeSearchParam;
|
||||
import com.engine.organization.entity.scheme.po.SchemePO;
|
||||
import com.engine.organization.entity.scheme.vo.SchemeTableVO;
|
||||
import com.engine.organization.mapper.scheme.SchemeMapper;
|
||||
import com.engine.organization.service.SchemeService;
|
||||
import com.engine.organization.util.MenuBtn;
|
||||
import com.engine.organization.util.OrganizationAssert;
|
||||
import com.engine.organization.util.OrganizationFormItemUtil;
|
||||
import com.engine.organization.util.db.DBType;
|
||||
|
|
@ -90,8 +90,8 @@ public class SchemeServiceImpl extends Service implements SchemeService {
|
|||
Map<String, Object> apiDatas = new HashMap<>();
|
||||
List<SearchConditionGroup> addGroups = new ArrayList<>();
|
||||
List<SearchConditionItem> conditionItems = new ArrayList<>();
|
||||
SearchConditionItem schemeNameCondition = OrganizationFormItemUtil.inputItem(user, 2, 16, 3, 50, "方案名称", "schemeName");
|
||||
SearchConditionItem schemeNoCondition = OrganizationFormItemUtil.inputItem(user, 2, 16, 3, 50, "方案编号", "schemeNo");
|
||||
SearchConditionItem schemeNameCondition = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "方案名称", "schemeName");
|
||||
SearchConditionItem schemeNoCondition = OrganizationFormItemUtil.inputItem(user, 2, 16, 2, 50, "方案编号", "schemeNo");
|
||||
conditionItems.add(schemeNameCondition);
|
||||
conditionItems.add(schemeNoCondition);
|
||||
addGroups.add(new SearchConditionGroup("高级搜索条件", true, conditionItems));
|
||||
|
|
@ -107,7 +107,7 @@ public class SchemeServiceImpl extends Service implements SchemeService {
|
|||
List<SearchConditionGroup> addGroups = new ArrayList<>();
|
||||
SearchConditionItem schemeNameCondition = OrganizationFormItemUtil.inputItem(user, 2, 17, 3, 50, "方案名称", "schemeName");
|
||||
schemeNameCondition.setRules("required|string");
|
||||
SearchConditionItem schemeNoCondition = OrganizationFormItemUtil.inputItem(user, 2, 17, 1, 50, "方案编号", "schemeNo");
|
||||
SearchConditionItem schemeNoCondition = OrganizationFormItemUtil.inputItem(user, 2, 17, 3, 50, "方案编号", "schemeNo");
|
||||
schemeNoCondition.setRules("required|string");
|
||||
SearchConditionItem textareaItem = OrganizationFormItemUtil.textareaItem(user, 2, 16, true, 2, 60, "方案说明", "schemeDescription");
|
||||
|
||||
|
|
@ -120,10 +120,13 @@ public class SchemeServiceImpl extends Service implements SchemeService {
|
|||
schemeNameCondition.setValue(schemePO.getSchemeName());
|
||||
schemeNoCondition.setValue(schemePO.getSchemeNo());
|
||||
textareaItem.setValue(schemePO.getSchemeDescription());
|
||||
|
||||
// 编辑状态下,编号只读
|
||||
schemeNoCondition.setViewAttr(1);
|
||||
}
|
||||
|
||||
selectItems.add(schemeNameCondition);
|
||||
selectItems.add(schemeNoCondition);
|
||||
selectItems.add(schemeNameCondition);
|
||||
selectItems.add(textareaItem);
|
||||
addGroups.add(new SearchConditionGroup("基本信息", true, selectItems));
|
||||
apiDatas.put("condition", addGroups);
|
||||
|
|
@ -133,12 +136,20 @@ public class SchemeServiceImpl extends Service implements SchemeService {
|
|||
@Override
|
||||
public Map<String, Object> getTableBtn() {
|
||||
Map<String, Object> btnDatas = new HashMap<>();
|
||||
ArrayList<TopMenuBtn> btnList = new ArrayList<>();
|
||||
ArrayList<MenuBtn> topMenuList = new ArrayList<>();
|
||||
ArrayList<MenuBtn> rightMenuList = new ArrayList<>();
|
||||
// 新建
|
||||
btnList.add(TopMenuBtn.builder().isBatch("1").isTop("1").menuFun("new").menuIcon("icon-coms-New-Flow").menuName("新建").type( "BTN_Addnew").build());
|
||||
topMenuList.add(MenuBtn.topMenu_addNew());
|
||||
// 批量删除
|
||||
btnList.add(TopMenuBtn.builder().isBatch("1").isTop("1").menuFun("batchDelete").menuIcon("icon-coms-Batch-delete").menuName("批量删除").type( "BTN_BatchDelete").build());
|
||||
btnDatas.put("topMenu",btnList);
|
||||
topMenuList.add(MenuBtn.topMenu_batchDelete());
|
||||
btnDatas.put("topMenu", topMenuList);
|
||||
// 新建
|
||||
rightMenuList.add(MenuBtn.rightMenu_addNew());
|
||||
// 日志
|
||||
rightMenuList.add(MenuBtn.rightMenu_btnLog());
|
||||
// 显示列定制
|
||||
rightMenuList.add(MenuBtn.rightMenu_btnColumn());
|
||||
btnDatas.put("rightMenu",rightMenuList);
|
||||
return btnDatas;
|
||||
}
|
||||
|
||||
|
|
@ -151,11 +162,11 @@ public class SchemeServiceImpl extends Service implements SchemeService {
|
|||
private String buildSqlWhere(Map<String, Object> params) {
|
||||
DBType dbType = DBType.get(new RecordSet().getDBType());
|
||||
String sqlWhere = " where delete_type ='0' ";
|
||||
String name = (String) params.get("name");
|
||||
String name = (String) params.get("schemeName");
|
||||
if (StringUtils.isNotBlank(name)) {
|
||||
sqlWhere += " AND scheme_name " + dbType.like(name);
|
||||
}
|
||||
String no = (String) params.get("no");
|
||||
String no = (String) params.get("schemeNo");
|
||||
if (StringUtils.isNotBlank(no)) {
|
||||
sqlWhere += " AND scheme_no " + dbType.like(no);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,69 @@
|
|||
package com.engine.organization.util;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
*
|
||||
* @description: MenuBtn工具类
|
||||
* @author:dxfeng
|
||||
* @createTime: 2022/05/09
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class MenuBtn {
|
||||
private String isBatch;
|
||||
private String isTop;
|
||||
private String menuFun;
|
||||
private String menuIcon;
|
||||
private String menuName;
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* topMenu新增
|
||||
* @return
|
||||
*/
|
||||
public static MenuBtn topMenu_addNew(){
|
||||
return MenuBtn.builder().isBatch("1").isTop("1").menuFun("new").menuIcon("icon-coms-New-Flow").menuName("新建").type( "BTN_Addnew").build();
|
||||
}
|
||||
|
||||
/**
|
||||
* topMenu批量删除
|
||||
* @return
|
||||
*/
|
||||
public static MenuBtn topMenu_batchDelete(){
|
||||
return MenuBtn.builder().isBatch("1").isTop("1").menuFun("new").menuIcon("icon-coms-New-Flow").menuName("新建").type( "BTN_Addnew").build();
|
||||
}
|
||||
|
||||
/**
|
||||
* rightMenu新增
|
||||
* @return
|
||||
*/
|
||||
public static MenuBtn rightMenu_addNew(){
|
||||
return MenuBtn.builder().isBatch("0").isTop("1").menuFun("new").menuIcon("icon-coms-New-Flow").menuName("新建").type( "BTN_Addnew").build();
|
||||
}
|
||||
|
||||
/**
|
||||
* rightMenu日志
|
||||
* @return
|
||||
*/
|
||||
public static MenuBtn rightMenu_btnLog(){
|
||||
return MenuBtn.builder().isBatch("0").isTop("0").menuFun("log").menuIcon("icon-coms-Print-log").menuName("日志").type( "BTN_log").build();
|
||||
}
|
||||
|
||||
/**
|
||||
* rightMenu显示列定制
|
||||
* @return
|
||||
*/
|
||||
public static MenuBtn rightMenu_btnColumn(){
|
||||
return MenuBtn.builder().isBatch("0").isTop("0").menuFun("custom").menuIcon("icon-coms-task-list").menuName("显示列定制").type( "BTN_COLUMN").build();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue