Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
14cc5b5c0c
@ -26,6 +26,14 @@ export function treeselect(params) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function treeselects(params) {
|
||||||
|
return request({
|
||||||
|
url: 'backendApi/source/treeselects',
|
||||||
|
method: 'get',
|
||||||
|
params: params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 根据角色ID查询菜单下拉树结构
|
// 根据角色ID查询菜单下拉树结构
|
||||||
export function roleMenuTreeselect(roleId) {
|
export function roleMenuTreeselect(roleId) {
|
||||||
return request({
|
return request({
|
||||||
|
@ -152,7 +152,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import {dutyDelete, dutyEdit, dutyList} from "@/api/duty/duty";
|
import {dutyDelete, dutyEdit, dutyList} from "@/api/duty/duty";
|
||||||
import {addRole, getRole, updateRole} from "@/api/system/role";
|
import {addRole, getRole, updateRole} from "@/api/system/role";
|
||||||
import {treeselect} from "@/api/system/menu";
|
import {treeselects} from "@/api/system/menu";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data(){
|
data(){
|
||||||
@ -197,10 +197,10 @@ export default {
|
|||||||
changeMenu(){
|
changeMenu(){
|
||||||
console.log(this.form1.roleType)
|
console.log(this.form1.roleType)
|
||||||
if (this.form1.roleType == '4'){
|
if (this.form1.roleType == '4'){
|
||||||
this.getMenuTreeselect(2);
|
this.getMenuTreeselect();
|
||||||
}
|
}
|
||||||
if (this.form1.roleType == '3'){
|
if (this.form1.roleType == '3'){
|
||||||
this.getMenuTreeselect(1);
|
this.getMenuTreeselect();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 表单重置
|
// 表单重置
|
||||||
@ -217,7 +217,8 @@ export default {
|
|||||||
status: "A",
|
status: "A",
|
||||||
menuIds: [],
|
menuIds: [],
|
||||||
menuCheckStrictly: true,
|
menuCheckStrictly: true,
|
||||||
description: ''
|
description: '',
|
||||||
|
deptType: '3',
|
||||||
};
|
};
|
||||||
this.resetForm("form1");
|
this.resetForm("form1");
|
||||||
},
|
},
|
||||||
@ -280,13 +281,13 @@ export default {
|
|||||||
},
|
},
|
||||||
handleAdd1(){
|
handleAdd1(){
|
||||||
this.reset1();
|
this.reset1();
|
||||||
this.getMenuTreeselect(1);
|
this.getMenuTreeselect();
|
||||||
this.openDuty = true;
|
this.openDuty = true;
|
||||||
this.title = "添加角色";
|
this.title = "添加角色";
|
||||||
},
|
},
|
||||||
// 查询菜单树结构
|
// 查询菜单树结构
|
||||||
getMenuTreeselect(merchantId) {
|
getMenuTreeselect() {
|
||||||
return treeselect({merchantId:merchantId}).then(response => {
|
return treeselects().then(response => {
|
||||||
this.menuOptions = response.data;
|
this.menuOptions = response.data;
|
||||||
return response
|
return response
|
||||||
});
|
});
|
||||||
@ -305,7 +306,7 @@ export default {
|
|||||||
let val = null;
|
let val = null;
|
||||||
if (data.dutyType == '3') val = 1;
|
if (data.dutyType == '3') val = 1;
|
||||||
if (data.dutyType == '4') val = 2;
|
if (data.dutyType == '4') val = 2;
|
||||||
const roleMenu = this.getMenuTreeselect(val);
|
const roleMenu = this.getMenuTreeselect();
|
||||||
const roleId = data.dutyId
|
const roleId = data.dutyId
|
||||||
getRole(roleId).then(response => {
|
getRole(roleId).then(response => {
|
||||||
this.form1.roleName = response.data.roleInfo.name;
|
this.form1.roleName = response.data.roleInfo.name;
|
||||||
|
@ -117,13 +117,16 @@
|
|||||||
@click="binding(scope.row)"
|
@click="binding(scope.row)"
|
||||||
|
|
||||||
>一键绑定</el-button>
|
>一键绑定</el-button>
|
||||||
|
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
@click="nobinding(scope.row)"
|
@click="nobinding(scope.row)"
|
||||||
|
v-if="scope.row.tagStatus == 1"
|
||||||
>解绑</el-button>
|
>解绑</el-button>
|
||||||
|
|
||||||
|
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
@ -316,29 +319,55 @@
|
|||||||
<el-dialog title="码牌列表" :visible.sync="openShow" width="800px" append-to-body>
|
<el-dialog title="码牌列表" :visible.sync="openShow" width="800px" append-to-body>
|
||||||
|
|
||||||
<div class="wrap-box">
|
<div class="wrap-box">
|
||||||
|
<div class="gang-box">
|
||||||
|
<div class="rw">
|
||||||
|
序号
|
||||||
|
</div>
|
||||||
|
<div class="rw">
|
||||||
|
厂商名称
|
||||||
|
</div>
|
||||||
|
<div class="rw">
|
||||||
|
二维码SN号
|
||||||
|
</div>
|
||||||
|
<div class="rw">
|
||||||
|
码牌SN号
|
||||||
|
</div>
|
||||||
|
<div class="rw">
|
||||||
|
操作
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="gang-box" :class="{'oilid' :oilid == item.id }" v-for="(item,index) in arrList" :key="index">
|
<div class="gang-box" :class="{'oilid' :oilid == item.id }" v-for="(item,index) in arrList" :key="index">
|
||||||
<el-table-column label="厂商名称" align="center" width="110">
|
<!-- <el-table-column label="厂商名称" align="center" width="110">-->
|
||||||
<template slot-scope="item">
|
<!-- <template slot-scope="item">-->
|
||||||
<span>{{item.companyName}}</span>
|
<!-- <span>{{item.companyName || ''}}</span>-->
|
||||||
</template>
|
<!-- </template>-->
|
||||||
</el-table-column>
|
<!-- </el-table-column>-->
|
||||||
<el-table-column label="二维码SN号" align="center" width="110">
|
<!-- <el-table-column label="二维码SN号" align="center" width="110">-->
|
||||||
<template slot-scope="item">
|
<!-- <template slot-scope="item">-->
|
||||||
<span>{{item.tagCodeSn}}</span>
|
<!-- <span>{{item.tagCodeSn|| ''}}</span>-->
|
||||||
</template>
|
<!-- </template>-->
|
||||||
</el-table-column>
|
<!-- </el-table-column>-->
|
||||||
<el-table-column label="码牌SN号" align="center" width="110">
|
<!-- <el-table-column label="码牌SN号" align="center" width="110">-->
|
||||||
<template slot-scope="item">
|
<!-- <template slot-scope="item">-->
|
||||||
<span>{{item.snCode}}</span>
|
<!-- <span>{{item.snCode|| ''}}</span>-->
|
||||||
</template>
|
<!-- </template>-->
|
||||||
</el-table-column>
|
<!-- </el-table-column>-->
|
||||||
<!-- <div>
|
<div class="rw">
|
||||||
|
{{index+1}}
|
||||||
|
</div>
|
||||||
|
<div class="rw">
|
||||||
{{item.companyName}}
|
{{item.companyName}}
|
||||||
</div>-->
|
</div>
|
||||||
<div style="color: #00afff;cursor: pointer;margin-right: 15px" v-if="oilid != item.id" @click="getoil(item.id)">
|
<div class="rw">
|
||||||
|
{{item.tagCodeSn}}
|
||||||
|
</div>
|
||||||
|
<div class="rw">
|
||||||
|
{{item.snCode}}
|
||||||
|
</div>
|
||||||
|
<div style="width: 25%; text-align: center; color: #00afff;cursor: pointer;" v-if="oilid != item.id" @click="getoil(item.id)">
|
||||||
选择
|
选择
|
||||||
</div>
|
</div>
|
||||||
<div style="color: #adadad;cursor: pointer;margin-right: 15px" v-if="oilid == item.id">
|
<div style="width: 25%; text-align: center; color: #adadad;cursor: pointer;" v-if="oilid == item.id">
|
||||||
已选择
|
已选择
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -529,7 +558,7 @@ export default {
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.gettagCodeRecord()
|
//
|
||||||
// this.getDuty();
|
// this.getDuty();
|
||||||
// this.getStoreList();
|
// this.getStoreList();
|
||||||
},
|
},
|
||||||
@ -537,6 +566,7 @@ export default {
|
|||||||
binding(row){
|
binding(row){
|
||||||
this.staffId = row.id
|
this.staffId = row.id
|
||||||
this.openShow = true
|
this.openShow = true
|
||||||
|
this.gettagCodeRecord()
|
||||||
},
|
},
|
||||||
nobinding(row){
|
nobinding(row){
|
||||||
let data = {
|
let data = {
|
||||||
@ -907,5 +937,9 @@ export default {
|
|||||||
.oilid{
|
.oilid{
|
||||||
background: #f6f8f9 !important;
|
background: #f6f8f9 !important;
|
||||||
}
|
}
|
||||||
|
.rw{
|
||||||
|
width: 25%;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
@ -11,6 +11,7 @@ import com.fuint.common.util.TokenUtil;
|
|||||||
import com.fuint.system.dept.entity.SysDept;
|
import com.fuint.system.dept.entity.SysDept;
|
||||||
import com.fuint.system.dept.service.ISysDeptService;
|
import com.fuint.system.dept.service.ISysDeptService;
|
||||||
import com.fuint.system.role.entity.TDuty;
|
import com.fuint.system.role.entity.TDuty;
|
||||||
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@ -64,6 +65,7 @@ public class LJDutyServiceImpl extends ServiceImpl<LJDutyMapper, TDuty> implemen
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Page<TDuty> selectDutyPage(Page page, TDuty duty) {
|
public Page<TDuty> selectDutyPage(Page page, TDuty duty) {
|
||||||
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
/*if (ObjectUtil.isNotEmpty(duty.getStoreId())){
|
/*if (ObjectUtil.isNotEmpty(duty.getStoreId())){
|
||||||
SysDept sysDept = sysDeptService.selectParentId(Long.valueOf(duty.getStoreId()));
|
SysDept sysDept = sysDeptService.selectParentId(Long.valueOf(duty.getStoreId()));
|
||||||
duty.setStoreId(Math.toIntExact(sysDept.getDeptId()));
|
duty.setStoreId(Math.toIntExact(sysDept.getDeptId()));
|
||||||
@ -72,7 +74,12 @@ public class LJDutyServiceImpl extends ServiceImpl<LJDutyMapper, TDuty> implemen
|
|||||||
SysDept sysDept = sysDeptService.selectParentId(nowAccountInfo.getDeptId());
|
SysDept sysDept = sysDeptService.selectParentId(nowAccountInfo.getDeptId());
|
||||||
duty.setStoreId(Math.toIntExact(sysDept.getDeptId()));
|
duty.setStoreId(Math.toIntExact(sysDept.getDeptId()));
|
||||||
}*/
|
}*/
|
||||||
|
if (ObjectUtils.isNotEmpty(duty.getStoreId())){
|
||||||
duty.setStoreId(duty.getStoreId());
|
duty.setStoreId(duty.getStoreId());
|
||||||
|
}else {
|
||||||
|
duty.setStoreId(Integer.parseInt(nowAccountInfo.getDeptId().toString()));
|
||||||
|
}
|
||||||
|
|
||||||
return baseMapper.selectDutyPage(page,duty);
|
return baseMapper.selectDutyPage(page,duty);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -391,11 +391,14 @@ public class LJStaffServiceImpl extends ServiceImpl<LJStaffMapper, LJStaff> impl
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public LJStaff selectStaffByStoreId(int storeId) {
|
public LJStaff selectStaffByStoreId(int storeId) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.eq("store_id",storeId);
|
queryWrapper.eq("store_id",storeId);
|
||||||
queryWrapper.eq("status","qy");
|
queryWrapper.eq("status","qy");
|
||||||
queryWrapper.eq("if_delete","0");
|
queryWrapper.eq("if_delete","0");
|
||||||
queryWrapper.eq("role_id","12");
|
//queryWrapper.eq("role_id","12");
|
||||||
queryWrapper.orderByAsc("create_time");
|
queryWrapper.orderByAsc("create_time");
|
||||||
List<LJStaff> list = baseMapper.selectList(queryWrapper);
|
List<LJStaff> list = baseMapper.selectList(queryWrapper);
|
||||||
LJStaff staff = null;
|
LJStaff staff = null;
|
||||||
|
@ -80,7 +80,7 @@ public class TagCodeRecordController extends BaseController {
|
|||||||
* @return 新增结果
|
* @return 新增结果
|
||||||
*/
|
*/
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public ResponseObject insert(@RequestBody TagCodeRecordDTO tagCodeRecordDTO) {
|
public ResponseObject insert(@RequestBody TagCodeRecordDTO tagCodeRecordDTO) throws Exception {
|
||||||
return getSuccessResult(this.tagCodeRecordService.add(tagCodeRecordDTO));
|
return getSuccessResult(this.tagCodeRecordService.add(tagCodeRecordDTO));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
public interface TagCodeRecordService extends IService<TagCodeRecord> {
|
public interface TagCodeRecordService extends IService<TagCodeRecord> {
|
||||||
|
|
||||||
boolean add(TagCodeRecordDTO tagCodeRecordDTO);
|
boolean add(TagCodeRecordDTO tagCodeRecordDTO) throws Exception;
|
||||||
|
|
||||||
IPage<TagCodeRecordVO> selectTagList(Page page, TagCodeRecord tagCodeRecord);
|
IPage<TagCodeRecordVO> selectTagList(Page page, TagCodeRecord tagCodeRecord);
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@ import com.fuint.business.tag.service.TagCodeService;
|
|||||||
import com.fuint.common.dto.AccountInfo;
|
import com.fuint.common.dto.AccountInfo;
|
||||||
import com.fuint.common.util.TokenUtil;
|
import com.fuint.common.util.TokenUtil;
|
||||||
import com.fuint.module.backendApi.controller.BackendFileController;
|
import com.fuint.module.backendApi.controller.BackendFileController;
|
||||||
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.mock.web.MockMultipartFile;
|
import org.springframework.mock.web.MockMultipartFile;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@ -43,9 +44,23 @@ public class OilTagServiceImpl extends ServiceImpl<OilTagMapper, OilTag> impleme
|
|||||||
oilTag.setTerminalNumber(number+"");
|
oilTag.setTerminalNumber(number+"");
|
||||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
oilTag.setDeptId(Integer.parseInt(nowAccountInfo.getDeptId().toString()));
|
oilTag.setDeptId(Integer.parseInt(nowAccountInfo.getDeptId().toString()));
|
||||||
|
|
||||||
LambdaQueryWrapper<TagCode> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<TagCode> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
queryWrapper.eq(TagCode::getTagCodeSn, oilTag.getTagCodeSn());
|
queryWrapper.eq(TagCode::getTagCodeSn, oilTag.getTagCodeSn());
|
||||||
TagCode tagCode = tagCodeService.getOne(queryWrapper);
|
TagCode tagCode = tagCodeService.getOne(queryWrapper);
|
||||||
|
|
||||||
|
LambdaQueryWrapper<OilTag> queryWrapper1 = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper1.eq(OilTag::getTagCodeSn, oilTag.getTagCodeSn());
|
||||||
|
OilTag one = getOne(queryWrapper1);
|
||||||
|
if (ObjectUtils.isNotEmpty(one)){
|
||||||
|
throw new Exception("该二维码已绑定过码牌");
|
||||||
|
}
|
||||||
|
|
||||||
|
queryWrapper1.eq(OilTag::getSnCode, oilTag.getSnCode());
|
||||||
|
OilTag ones = getOne(queryWrapper1);
|
||||||
|
if (ObjectUtils.isNotEmpty(ones)){
|
||||||
|
throw new Exception("该码牌已绑定过二维码");
|
||||||
|
}
|
||||||
//TagCode tagCode = tagCodeService.getById(oilTag.getTagCodeId());
|
//TagCode tagCode = tagCodeService.getById(oilTag.getTagCodeId());
|
||||||
oilTag.setTagCodeId(tagCode.getId());
|
oilTag.setTagCodeId(tagCode.getId());
|
||||||
return save(oilTag);
|
return save(oilTag);
|
||||||
|
@ -57,7 +57,7 @@ public class TagCodeRecordServiceImpl extends ServiceImpl<TagCodeRecordMapper, T
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public boolean add(TagCodeRecordDTO tagCodeRecordDTO) {
|
public boolean add(TagCodeRecordDTO tagCodeRecordDTO) throws Exception {
|
||||||
boolean flag = false;
|
boolean flag = false;
|
||||||
//绑定之前 先去查询
|
//绑定之前 先去查询
|
||||||
TagCodeRecord tagCodeRecord = new TagCodeRecord();
|
TagCodeRecord tagCodeRecord = new TagCodeRecord();
|
||||||
@ -68,6 +68,20 @@ public class TagCodeRecordServiceImpl extends ServiceImpl<TagCodeRecordMapper, T
|
|||||||
OilTag byId = oilTagService.getById(integer);
|
OilTag byId = oilTagService.getById(integer);
|
||||||
//二维码id
|
//二维码id
|
||||||
Integer tagCodeId = byId.getTagCodeId();
|
Integer tagCodeId = byId.getTagCodeId();
|
||||||
|
//判断该二维码有没有绑定过码牌
|
||||||
|
/*if (ObjectUtils.isNotEmpty(byId) && ObjectUtils.isNotEmpty(byId.getSnCode())){
|
||||||
|
throw new Exception("该二维码已经绑定过码牌!");
|
||||||
|
}*/
|
||||||
|
|
||||||
|
if (ObjectUtils.isNotEmpty(byId)){
|
||||||
|
LambdaQueryWrapper<TagCodeRecord> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(TagCodeRecord::getOilTagId,byId.getId());
|
||||||
|
TagCodeRecord one = getOne(queryWrapper);
|
||||||
|
if (ObjectUtils.isNotEmpty(one)){
|
||||||
|
throw new Exception("该码牌已经绑定过油站!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//二维码
|
//二维码
|
||||||
TagCode byId1 = tagCodeService.getById(tagCodeId);
|
TagCode byId1 = tagCodeService.getById(tagCodeId);
|
||||||
String collection = byId1.getCollection();
|
String collection = byId1.getCollection();
|
||||||
|
@ -4,6 +4,7 @@ import cn.hutool.core.util.ObjectUtil;
|
|||||||
import com.fuint.common.domain.TreeNode;
|
import com.fuint.common.domain.TreeNode;
|
||||||
import com.fuint.common.domain.TreeSelect;
|
import com.fuint.common.domain.TreeSelect;
|
||||||
import com.fuint.common.dto.AccountInfo;
|
import com.fuint.common.dto.AccountInfo;
|
||||||
|
import com.fuint.common.dto.RoleDto;
|
||||||
import com.fuint.common.dto.SourceDto;
|
import com.fuint.common.dto.SourceDto;
|
||||||
import com.fuint.common.enums.StatusEnum;
|
import com.fuint.common.enums.StatusEnum;
|
||||||
import com.fuint.common.service.SourceService;
|
import com.fuint.common.service.SourceService;
|
||||||
@ -14,6 +15,8 @@ import com.fuint.framework.web.BaseController;
|
|||||||
import com.fuint.framework.web.ResponseObject;
|
import com.fuint.framework.web.ResponseObject;
|
||||||
import com.fuint.repository.model.TAccount;
|
import com.fuint.repository.model.TAccount;
|
||||||
import com.fuint.repository.model.TSource;
|
import com.fuint.repository.model.TSource;
|
||||||
|
import com.fuint.system.role.entity.TDuty;
|
||||||
|
import com.fuint.system.role.service.DutyService;
|
||||||
import com.fuint.utils.StringUtil;
|
import com.fuint.utils.StringUtil;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
@ -22,6 +25,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@ -249,6 +254,8 @@ public class BackendSourceController extends BaseController {
|
|||||||
return getSuccessResult(true);
|
return getSuccessResult(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private DutyService tDutyService;
|
||||||
/**
|
/**
|
||||||
* 获取菜单下拉树列表
|
* 获取菜单下拉树列表
|
||||||
* */
|
* */
|
||||||
@ -269,5 +276,70 @@ public class BackendSourceController extends BaseController {
|
|||||||
List<TreeSelect> data = sourceService.buildMenuTreeSelect(sources);
|
List<TreeSelect> data = sourceService.buildMenuTreeSelect(sources);
|
||||||
|
|
||||||
return getSuccessResult(data);
|
return getSuccessResult(data);
|
||||||
|
|
||||||
|
/*String token = request.getHeader("Access-Token");
|
||||||
|
AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
|
||||||
|
|
||||||
|
TDuty htDuty = tDutyService.getRoleById(Long.parseLong(accountInfo.getRoleIds()));
|
||||||
|
|
||||||
|
Map<String, Object> result = new HashMap<>();
|
||||||
|
|
||||||
|
RoleDto roleInfo = new RoleDto();
|
||||||
|
roleInfo.setMerchantId(htDuty.getStoreId());
|
||||||
|
roleInfo.setId(htDuty.getDutyId().longValue());
|
||||||
|
roleInfo.setName(htDuty.getDutyName());
|
||||||
|
roleInfo.setType(htDuty.getDutyType());
|
||||||
|
roleInfo.setStatus(htDuty.getStatus());
|
||||||
|
roleInfo.setDescription(htDuty.getDescription());
|
||||||
|
|
||||||
|
result.put("roleInfo", roleInfo);
|
||||||
|
return getSuccessResult(result);*/
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取菜单下拉树列表
|
||||||
|
* */
|
||||||
|
@ApiOperation(value = "获取菜单下拉树列表")
|
||||||
|
@RequestMapping(value = "/treeselects", method = RequestMethod.GET)
|
||||||
|
public ResponseObject treeselects(HttpServletRequest request) {
|
||||||
|
String token = request.getHeader("Access-Token");
|
||||||
|
AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
|
||||||
|
if (accountInfo == null) {
|
||||||
|
return getFailureResult(1001, "请先登录");
|
||||||
|
}
|
||||||
|
|
||||||
|
List<Long> checkedKeys = tDutyService.getSourceIdsByDutyId(Integer.parseInt(accountInfo.getRoleIds()));
|
||||||
|
|
||||||
|
ArrayList<TreeNode> longArrayList = new ArrayList<>();
|
||||||
|
List<TreeNode> sources = sSourceService.getSourceTree(null);
|
||||||
|
for (TreeNode source : sources) {
|
||||||
|
for (Long checkedKey : checkedKeys) {
|
||||||
|
if (source.getId() == checkedKey) {
|
||||||
|
longArrayList.add(source);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
List<TreeSelect> data = sourceService.buildMenuTreeSelect(longArrayList);
|
||||||
|
|
||||||
|
return getSuccessResult(data);
|
||||||
|
|
||||||
|
/*String token = request.getHeader("Access-Token");
|
||||||
|
AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
|
||||||
|
|
||||||
|
TDuty htDuty = tDutyService.getRoleById(Long.parseLong(accountInfo.getRoleIds()));
|
||||||
|
|
||||||
|
Map<String, Object> result = new HashMap<>();
|
||||||
|
|
||||||
|
RoleDto roleInfo = new RoleDto();
|
||||||
|
roleInfo.setMerchantId(htDuty.getStoreId());
|
||||||
|
roleInfo.setId(htDuty.getDutyId().longValue());
|
||||||
|
roleInfo.setName(htDuty.getDutyName());
|
||||||
|
roleInfo.setType(htDuty.getDutyType());
|
||||||
|
roleInfo.setStatus(htDuty.getStatus());
|
||||||
|
roleInfo.setDescription(htDuty.getDescription());
|
||||||
|
|
||||||
|
result.put("roleInfo", roleInfo);
|
||||||
|
return getSuccessResult(result);*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user