职等职级接口 getTableInfo接口
This commit is contained in:
parent
c5a7a1fb07
commit
1ce7ae9518
|
|
@ -59,4 +59,11 @@ public interface LevelMapper {
|
|||
* @param ids
|
||||
*/
|
||||
int deleteByIds(@Param("ids") Collection<Long> ids);
|
||||
|
||||
/**
|
||||
* 根据禁用标记统计
|
||||
* @param tag
|
||||
* @return
|
||||
*/
|
||||
int getCountByTag(@Param("tag") int tag);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,6 +41,12 @@
|
|||
<include refid="baseColumns"/>
|
||||
from jcl_org_level t where level_no = #{levelNo} AND delete_type = 0
|
||||
</select>
|
||||
<select id="getCountByTag" resultType="java.lang.Integer">
|
||||
select count(1) from jcl_org_level where 1=1
|
||||
<if test=" tag != -1 " >
|
||||
and forbidden_tag = #{tag}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<update id="updateLevel" parameterType="com.engine.organization.entity.scheme.po.LevelPO">
|
||||
update jcl_org_level
|
||||
|
|
|
|||
|
|
@ -139,11 +139,16 @@ public class LevelServiceImpl extends Service implements LevelService {
|
|||
Map<String, Object> apiDatas = new HashMap<>();
|
||||
List<TopTab> topTabs = new ArrayList<>();
|
||||
topTabs.add(TopTab.builder().color("#000000").groupId("flowAll").showCount(true).title("全部").viewCondition("-1").build());
|
||||
topTabs.add(TopTab.builder().color("#ff3232").groupId("flowNew").showCount(true).title("启用").viewCondition("0").build());
|
||||
topTabs.add(TopTab.builder().color("#fea468").groupId("flowRes").showCount(true).title("禁用").viewCondition("1").build());
|
||||
apiDatas.put("topTabs",topTabs);
|
||||
topTabs.add(TopTab.builder().color("#ff3232").groupId("enable").showCount(true).title("启用").viewCondition("0").build());
|
||||
topTabs.add(TopTab.builder().color("#fea468").groupId("disable").showCount(true).title("禁用").viewCondition("1").build());
|
||||
apiDatas.put("topTabs", topTabs);
|
||||
|
||||
apiDatas.put("topTabCount",topTabs);
|
||||
HashMap<String, Integer> countMap = new HashMap<>();
|
||||
countMap.put("flowAll", getLevelMapper().getCountByTag(-1));
|
||||
countMap.put("enable", getLevelMapper().getCountByTag(0));
|
||||
countMap.put("disable", getLevelMapper().getCountByTag(1));
|
||||
|
||||
apiDatas.put("topTabCount", countMap);
|
||||
return apiDatas;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -190,4 +190,16 @@ public class LevelController {
|
|||
return ReturnResult.exceptionHandle(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("/getTableInfo")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public ReturnResult getTableInfo(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
try {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return ReturnResult.successed(getLevelWrapper(user).getTableInfo());
|
||||
} catch (Exception e) {
|
||||
return ReturnResult.exceptionHandle(e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -99,4 +99,13 @@ public class LevelWrapper extends Service {
|
|||
public Map<String, Object> getTableBtn() {
|
||||
return getLevelService(user).getTableBtn();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取列表tabs
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Map<String, Object> getTableInfo() {
|
||||
return getLevelService(user).getTableInfo();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue