Commit ceda8764 by ilal Committed by chenzg

提交

parent 3b7d0076
......@@ -29,6 +29,7 @@ import cn.hutool.core.util.NumberUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.timer.api.aspect.lang.annotation.Log;
import cn.timer.api.aspect.lang.enums.BusinessType;
import cn.timer.api.bean.admin.AdminMenuTemplate;
import cn.timer.api.bean.qyzx.QyzxAdminMenu;
import cn.timer.api.bean.qyzx.QyzxAttaFwjsb;
import cn.timer.api.bean.qyzx.QyzxEmpEntAsso;
......@@ -45,6 +46,7 @@ import cn.timer.api.config.annotation.CurrentUser;
import cn.timer.api.config.annotation.UserBean;
import cn.timer.api.config.enums.CommonEnum;
import cn.timer.api.config.enums.SysRoleType;
import cn.timer.api.controller.kqgl.ClockInTool;
import cn.timer.api.dao.qyzx.QyzxEmpEntAssoMapper;
import cn.timer.api.dao.qyzx.QyzxEmpLoginMapper;
import cn.timer.api.dao.qyzx.QyzxEntInfoMMapper;
......@@ -58,6 +60,7 @@ import cn.timer.api.dto.qyzx.AdminListDto;
import cn.timer.api.dto.qyzx.AttaFpglQueryDto;
import cn.timer.api.dto.qyzx.EntauthDto;
import cn.timer.api.dto.qyzx.LogBuyDto;
import cn.timer.api.dto.qyzx.MenuStructureDto;
import cn.timer.api.dto.qyzx.QyzxOperLogQuaryDto;
import cn.timer.api.utils.Result;
import cn.timer.api.utils.ResultUtil;
......@@ -510,6 +513,51 @@ public class QyzxController {
return ResultUtil.data(pages, listOl, "操作成功!");
}
@PostMapping(value = "/menusequencedata")
@ApiOperation(value = "菜单顺序数据", httpMethod = "POST", notes = "")
public Result<Object> menusequencedata(@CurrentUser UserBean userBean) {
List<MenuStructureDto> mestrs = new ArrayList<MenuStructureDto>();
List<QyzxAdminMenu> qyme = QyzxAdminMenu.builder().build().selectList(new QueryWrapper<QyzxAdminMenu>().lambda().eq(QyzxAdminMenu::getOrgCode, userBean.getOrgCode()).orderByAsc(QyzxAdminMenu::getSortNumber));
String[] zdy = new String[qyme.size()];
int i = 0;
for(QyzxAdminMenu me : qyme) {
MenuStructureDto metr = MenuStructureDto.builder().build();
metr.setMenuCode(me.getMenuCode());
metr.setMenuName(me.getMenuName());
metr.setSortNumber(me.getSortNumber());
metr.setPath("");
mestrs.add(metr);
zdy[i] = me.getMenuCode();
i++;
}
//
List<AdminMenuTemplate> adtes = AdminMenuTemplate.builder().build().selectList(new QueryWrapper<AdminMenuTemplate>().lambda().eq(AdminMenuTemplate::getEnable, 1).orderByAsc(AdminMenuTemplate::getSortNumber));
for(AdminMenuTemplate adm : adtes) {
if(!ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(zdy), adm.getMenuCode())) {
if(adm.getDistribution() == 0 && userBean.getOrgCode() == 3) {
MenuStructureDto metr = MenuStructureDto.builder().build();
metr.setMenuCode(adm.getMenuCode());
metr.setMenuName(adm.getMenuName());
metr.setSortNumber(adm.getSortNumber());
metr.setPath("");
mestrs.add(metr);
}else if(adm.getDistribution() == 1) {
MenuStructureDto metr = MenuStructureDto.builder().build();
metr.setMenuCode(adm.getMenuCode());
metr.setMenuName(adm.getMenuName());
metr.setSortNumber(adm.getSortNumber());
metr.setPath("");
mestrs.add(metr);
}
}
}
return ResultUtil.data(mestrs, "成功");
}
@PostMapping(value = "/menustructure")
@ApiOperation(value = "菜单结构", httpMethod = "POST", notes = "")
public Result<Object> menustructure(@CurrentUser UserBean userBean,@RequestBody QyzxAdminMenu qymu) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment