bug
This commit is contained in:
parent
7ca8ad05c5
commit
13211d382d
@ -181,7 +181,7 @@
|
|||||||
:label="dict.name"
|
:label="dict.name"
|
||||||
:value="dict.id">
|
:value="dict.id">
|
||||||
</el-option>
|
</el-option>
|
||||||
<!-- <el-option :value="form.giftId" label="已售罄" v-if="!goodsList.includes(form.giftId)">已售罄</el-option>-->
|
<!-- <el-option v-if="!goodsList.includes(form.giftId)" :value="form.giftId" label="已售罄">已售罄</el-option>-->
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="商品数量" prop="productCount" v-if="form.type==0">
|
<el-form-item label="商品数量" prop="productCount" v-if="form.type==0">
|
||||||
|
@ -91,6 +91,7 @@
|
|||||||
|
|
||||||
<el-table-column label="用户名" align="center" key="accountName" prop="accountName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
|
<el-table-column label="用户名" align="center" key="accountName" prop="accountName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="真实姓名" align="center" key="realName" prop="realName" />
|
<el-table-column label="真实姓名" align="center" key="realName" prop="realName" />
|
||||||
|
<el-table-column label="用户角色" align="center" key="roleName" prop="roleName" />
|
||||||
|
|
||||||
<el-table-column label="所属机构" align="center" prop="storeName" width="160">
|
<el-table-column label="所属机构" align="center" prop="storeName" width="160">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@ -205,17 +206,36 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
|
|
||||||
<template v-if="ruleForm.turnoverType === '2'">
|
<template v-if="ruleForm.turnoverType === '2'">
|
||||||
<el-form-item label="时间限制" prop="turnoverType" style="width:220px">
|
<el-col :span="12">
|
||||||
|
<el-row>
|
||||||
|
<el-form-item label="时间限制" prop="turnoverType" >
|
||||||
|
<!-- <el-date-picker-->
|
||||||
|
<!-- :disabled="isTopDept"-->
|
||||||
|
<!-- v-model="timeFrame"-->
|
||||||
|
<!-- type="daterange"-->
|
||||||
|
<!-- value-format="yyyy-MM-dd"-->
|
||||||
|
<!-- range-separator="至"-->
|
||||||
|
<!-- start-placeholder="开始日期"-->
|
||||||
|
<!-- end-placeholder="结束日期">-->
|
||||||
|
<!-- </el-date-picker>-->
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
|
v-model="beginTime"
|
||||||
:disabled="isTopDept"
|
:disabled="isTopDept"
|
||||||
v-model="timeFrame"
|
style="width: 140px"
|
||||||
type="daterange"
|
type="date"
|
||||||
value-format="yyyy-MM-dd"
|
placeholder="开始日期">
|
||||||
range-separator="至"
|
</el-date-picker>
|
||||||
start-placeholder="开始日期"
|
至
|
||||||
end-placeholder="结束日期">
|
<el-date-picker
|
||||||
|
v-model="endTime"
|
||||||
|
:disabled="isTopDept"
|
||||||
|
style="width: 140px"
|
||||||
|
type="date"
|
||||||
|
placeholder="结束日期">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
</el-row>
|
||||||
|
</el-col>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
@ -279,17 +299,32 @@
|
|||||||
|
|
||||||
<template v-if="ruleForm.turnoverType === '5'">
|
<template v-if="ruleForm.turnoverType === '5'">
|
||||||
<el-col :span="10">
|
<el-col :span="10">
|
||||||
<el-form-item label="时间范围">
|
<el-row>
|
||||||
<el-date-picker
|
<el-form-item label="时间范围">
|
||||||
:disabled="isTopDept"
|
<!-- <el-date-picker-->
|
||||||
v-model="timeFrame"
|
<!-- :disabled="isTopDept"-->
|
||||||
value-format="yyyy-MM-dd"
|
<!-- v-model="timeFrame"-->
|
||||||
type="daterange"
|
<!-- value-format="yyyy-MM-dd"-->
|
||||||
range-separator="至"
|
<!-- type="daterange"-->
|
||||||
start-placeholder="开始日期"
|
<!-- range-separator="至"-->
|
||||||
end-placeholder="结束日期">
|
<!-- start-placeholder="开始日期"-->
|
||||||
</el-date-picker>
|
<!-- end-placeholder="结束日期">-->
|
||||||
</el-form-item>
|
<!-- </el-date-picker>-->
|
||||||
|
<el-date-picker
|
||||||
|
v-model="beginTime"
|
||||||
|
style="width: 140px"
|
||||||
|
type="date"
|
||||||
|
placeholder="开始日期">
|
||||||
|
</el-date-picker>
|
||||||
|
至
|
||||||
|
<el-date-picker
|
||||||
|
v-model="endTime"
|
||||||
|
style="width: 140px"
|
||||||
|
type="date"
|
||||||
|
placeholder="结束日期">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-row>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
@ -308,6 +343,9 @@
|
|||||||
<el-input-number :disabled="isTopDept" v-model="ruleForm.storeNum" @change="handleChangeInputNumber" :min="1"
|
<el-input-number :disabled="isTopDept" v-model="ruleForm.storeNum" @change="handleChangeInputNumber" :min="1"
|
||||||
:max="1000" label="可创建油站数量"></el-input-number>
|
:max="1000" label="可创建油站数量"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="已建油站数量" label-width="110px">
|
||||||
|
<span>{{ruleForm.storeNums || 0}}</span>
|
||||||
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</template>
|
</template>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -334,6 +372,10 @@
|
|||||||
<el-input-number :disabled="isTopDept" v-model="ruleForm.storeNum" @change="handleChangeInputNumber" :min="1"
|
<el-input-number :disabled="isTopDept" v-model="ruleForm.storeNum" @change="handleChangeInputNumber" :min="1"
|
||||||
:max="1000" label="可创建油站数量"></el-input-number>
|
:max="1000" label="可创建油站数量"></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="已建油站数量" label-width="110px">
|
||||||
|
<span>{{ruleForm.storeNums || 0}}</span>
|
||||||
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</template>
|
</template>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -533,6 +575,8 @@ export default {
|
|||||||
cascader:[],
|
cascader:[],
|
||||||
storeOptions:[],
|
storeOptions:[],
|
||||||
merchantOptions:[],
|
merchantOptions:[],
|
||||||
|
beginTime:"",
|
||||||
|
endTime:"",
|
||||||
deleteid:0,
|
deleteid:0,
|
||||||
pdinfo: 1 ,
|
pdinfo: 1 ,
|
||||||
activeName: 'list',
|
activeName: 'list',
|
||||||
@ -763,6 +807,8 @@ export default {
|
|||||||
// 清空数据
|
// 清空数据
|
||||||
rateClearing () {
|
rateClearing () {
|
||||||
this.timeFrame =[]
|
this.timeFrame =[]
|
||||||
|
this.beginTime = ""
|
||||||
|
this.endTime = ""
|
||||||
this.ruleForm.turnoverLimit = 0
|
this.ruleForm.turnoverLimit = 0
|
||||||
this.ruleForm.turnoverTime = ''
|
this.ruleForm.turnoverTime = ''
|
||||||
this.ruleForm.turnoverStartTime = null
|
this.ruleForm.turnoverStartTime = null
|
||||||
@ -879,14 +925,16 @@ export default {
|
|||||||
//新增节点
|
//新增节点
|
||||||
submitForms(formName) {
|
submitForms(formName) {
|
||||||
console.log("timeFrame ",this.timeFrame)
|
console.log("timeFrame ",this.timeFrame)
|
||||||
console.log("this.ruleForm ",this.ruleForm)
|
console.log("this.ruleForm ",this.ruleForm,this.ruleForm.parentId)
|
||||||
this.$refs[formName].validate((valid) => {
|
this.$refs[formName].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
console.log("timeFrame",this.timeFrame)
|
console.log("timeFrame",this.timeFrame)
|
||||||
if (this.timeFrame){
|
if (this.timeFrame){
|
||||||
this.ruleForm.turnoverStartTime = this.timeFrame[0]
|
// this.ruleForm.turnoverStartTime = this.timeFrame[0]
|
||||||
this.ruleForm.turnoverEndTime = this.timeFrame[1]
|
// this.ruleForm.turnoverEndTime = this.timeFrame[1]
|
||||||
}
|
}
|
||||||
|
this.ruleForm.turnoverStartTime = this.beginTime
|
||||||
|
this.ruleForm.turnoverEndTime = this.endTime
|
||||||
if (!this.storeNum) {
|
if (!this.storeNum) {
|
||||||
this.ruleForm.storeNum = null
|
this.ruleForm.storeNum = null
|
||||||
}
|
}
|
||||||
@ -914,10 +962,12 @@ export default {
|
|||||||
if (!this.storeNum) {
|
if (!this.storeNum) {
|
||||||
this.ruleForm.storeNum = null
|
this.ruleForm.storeNum = null
|
||||||
}
|
}
|
||||||
if (this.timeFrame){
|
// if (this.timeFrame){
|
||||||
this.ruleForm.turnoverStartTime = this.timeFrame[0]
|
// this.ruleForm.turnoverStartTime = this.timeFrame[0]
|
||||||
this.ruleForm.turnoverEndTime = this.timeFrame[1]
|
// this.ruleForm.turnoverEndTime = this.timeFrame[1]
|
||||||
}
|
// }
|
||||||
|
this.ruleForm.turnoverStartTime = this.beginTime
|
||||||
|
this.ruleForm.turnoverEndTime = this.endTime
|
||||||
deptedit(this.ruleForm).then(res=>{
|
deptedit(this.ruleForm).then(res=>{
|
||||||
// console.log(res)
|
// console.log(res)
|
||||||
if(res.code == 200){
|
if(res.code == 200){
|
||||||
@ -952,6 +1002,8 @@ export default {
|
|||||||
this.activeName = 'info'
|
this.activeName = 'info'
|
||||||
this.pdinfo = 1
|
this.pdinfo = 1
|
||||||
this.timeFrame = []
|
this.timeFrame = []
|
||||||
|
this.beginTime = ""
|
||||||
|
this.endTime = ""
|
||||||
|
|
||||||
this.addNode(data.id,data.label)
|
this.addNode(data.id,data.label)
|
||||||
// console.log(this.pdinfo)
|
// console.log(this.pdinfo)
|
||||||
@ -974,7 +1026,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 新增数据
|
// 新增数据
|
||||||
async addNode(id,label) {
|
addNode(id,label) {
|
||||||
let _this = this
|
let _this = this
|
||||||
// 默认类型
|
// 默认类型
|
||||||
this.isClick = false
|
this.isClick = false
|
||||||
@ -985,22 +1037,33 @@ export default {
|
|||||||
|
|
||||||
// _this.ruleForm.deptType = '1'
|
// _this.ruleForm.deptType = '1'
|
||||||
// 点击树获取部门信息
|
// 点击树获取部门信息
|
||||||
await Userlist(id).then(res=>{
|
this.cascader = []
|
||||||
console.log("新增树的返回",res)
|
let fanCascader = []
|
||||||
this.cascader = []
|
|
||||||
this.deptType = res.data.deptType
|
Userlist(id).then(async res=>{
|
||||||
if (res.data.deptType === "3") {
|
console.log(res ,263)
|
||||||
this.parentName = res.data.parentName
|
this.deptType = res.data.deptType
|
||||||
// this.cascader
|
this.parentName = res.data.parentName
|
||||||
this.ruleForm.parentId = res.data.parentId
|
// if (res.data.parentId==0){
|
||||||
} else {
|
this.ruleForm.parentId = res.data.deptId
|
||||||
this.parentName = res.data.deptName
|
// }else {
|
||||||
this.ruleForm.parentId = res.data.deptId
|
// this.ruleForm.parentId = res.data.parentId
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
let pid = res.data.parentId
|
||||||
|
fanCascader.push(res.data.deptId)
|
||||||
|
while (pid!=0){
|
||||||
|
await Userlist(pid).then(re=> {
|
||||||
|
pid = re.data.parentId
|
||||||
|
fanCascader.push(re.data.deptId)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.cascader = fanCascader.reverse()
|
||||||
|
this.isTopDept = false
|
||||||
|
console.log( this.ruleForm.parentId ,111)
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
this.cascader.push(this.ruleForm.parentId)
|
|
||||||
})
|
|
||||||
this.isTopDept = false
|
|
||||||
|
|
||||||
},
|
},
|
||||||
//修改树
|
//修改树
|
||||||
@ -1023,10 +1086,12 @@ export default {
|
|||||||
if (this.ruleForm.turnoverStartTime) {
|
if (this.ruleForm.turnoverStartTime) {
|
||||||
const date = new Date(this.ruleForm.turnoverStartTime);
|
const date = new Date(this.ruleForm.turnoverStartTime);
|
||||||
this.timeFrame[0] = date.toString();
|
this.timeFrame[0] = date.toString();
|
||||||
|
this.beginTime = date.toString();
|
||||||
}
|
}
|
||||||
if (this.ruleForm.turnoverEndTime) {
|
if (this.ruleForm.turnoverEndTime) {
|
||||||
const date = new Date(this.ruleForm.turnoverEndTime);
|
const date = new Date(this.ruleForm.turnoverEndTime);
|
||||||
this.timeFrame[1] = date.toString();
|
this.timeFrame[1] = date.toString();
|
||||||
|
this.endTime = date.toString();
|
||||||
}
|
}
|
||||||
if (this.ruleForm.storeNum) {
|
if (this.ruleForm.storeNum) {
|
||||||
this.storeNum = true
|
this.storeNum = true
|
||||||
|
@ -134,14 +134,15 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="10">
|
<el-col :span="10">
|
||||||
<el-form-item label="套餐到期时间" prop="expirationTime" :label-width="formLabelWidth">
|
<!-- <el-form-item label="套餐到期时间" :label-width="formLabelWidth">-->
|
||||||
<el-date-picker
|
<!-- <el-date-picker-->
|
||||||
v-model="from.expirationTime"
|
<!-- disabled-->
|
||||||
type="date"
|
<!-- v-model="from.expirationTime"-->
|
||||||
style="width:220px"
|
<!-- type="date"-->
|
||||||
placeholder="选择日期">
|
<!-- style="width:220px"-->
|
||||||
</el-date-picker>
|
<!-- placeholder="选择日期">-->
|
||||||
</el-form-item>
|
<!-- </el-date-picker>-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -296,7 +297,7 @@
|
|||||||
uploadImages: [],
|
uploadImages: [],
|
||||||
dialogImageUrl: "",
|
dialogImageUrl: "",
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
hideUpload: false,
|
// hideUpload: false,
|
||||||
|
|
||||||
from:{
|
from:{
|
||||||
name: '',
|
name: '',
|
||||||
|
@ -27,6 +27,7 @@ import com.fuint.repository.model.MtMerchant;
|
|||||||
import com.fuint.repository.model.TAccount;
|
import com.fuint.repository.model.TAccount;
|
||||||
import com.fuint.system.dept.entity.SysDept;
|
import com.fuint.system.dept.entity.SysDept;
|
||||||
import com.fuint.system.dept.mapper.SysDeptMapper;
|
import com.fuint.system.dept.mapper.SysDeptMapper;
|
||||||
|
import com.fuint.system.dept.service.ISysDeptService;
|
||||||
import com.fuint.system.role.entity.TDuty;
|
import com.fuint.system.role.entity.TDuty;
|
||||||
import com.fuint.system.role.mapper.TDutyMapper;
|
import com.fuint.system.role.mapper.TDutyMapper;
|
||||||
import com.fuint.utils.StringUtil;
|
import com.fuint.utils.StringUtil;
|
||||||
@ -63,6 +64,8 @@ public class StoreServiceImpl extends ServiceImpl<MtStoreMapper, MtStore> implem
|
|||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private MtMerchantMapper mtMerchantMapper;
|
private MtMerchantMapper mtMerchantMapper;
|
||||||
|
@Resource
|
||||||
|
private ISysDeptService iSysDeptService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商户接口
|
* 商户接口
|
||||||
@ -261,6 +264,15 @@ public class StoreServiceImpl extends ServiceImpl<MtStoreMapper, MtStore> implem
|
|||||||
}
|
}
|
||||||
|
|
||||||
StoreDto mtStoreDto = new StoreDto();
|
StoreDto mtStoreDto = new StoreDto();
|
||||||
|
if (ObjectUtil.isNotEmpty(mtStore.getContractDeptId())){
|
||||||
|
SysDept sysDept = iSysDeptService.selectDeptById(mtStore.getContractDeptId());
|
||||||
|
if (ObjectUtil.isNotEmpty(sysDept)){
|
||||||
|
SysDept sysDept1 = iSysDeptService.selectDeptById(sysDept.getParentId());
|
||||||
|
if (ObjectUtil.isNotEmpty(sysDept1)){
|
||||||
|
mtStore.setExpirationTime(sysDept1.getTurnoverEndTime());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
BeanUtils.copyProperties(mtStore, mtStoreDto);
|
BeanUtils.copyProperties(mtStore, mtStoreDto);
|
||||||
|
|
||||||
return mtStoreDto;
|
return mtStoreDto;
|
||||||
|
@ -1,11 +1,15 @@
|
|||||||
package com.fuint.common.dto;
|
package com.fuint.common.dto;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 店铺实体
|
* 店铺实体
|
||||||
* */
|
* */
|
||||||
|
@Data
|
||||||
public class StoreDto implements Serializable {
|
public class StoreDto implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@ -149,6 +153,8 @@ public class StoreDto implements Serializable {
|
|||||||
* 最后操作人
|
* 最后操作人
|
||||||
*/
|
*/
|
||||||
private String operator;
|
private String operator;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer storeNums;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 服务到期时间
|
* 服务到期时间
|
||||||
|
@ -65,7 +65,10 @@ public class SysDeptController extends BaseController
|
|||||||
@GetMapping(value = "/{deptId}")
|
@GetMapping(value = "/{deptId}")
|
||||||
public ResponseObject getInfo(@PathVariable Long deptId)
|
public ResponseObject getInfo(@PathVariable Long deptId)
|
||||||
{
|
{
|
||||||
return getSuccessResult(deptService.selectDeptById(deptId));
|
List<SysDept> sysDepts = deptService.selectDeptLists(deptId);
|
||||||
|
SysDept sysDept = deptService.selectDeptById(deptId);
|
||||||
|
if (ObjectUtil.isNotEmpty(sysDept)) sysDept.setStoreNums(sysDepts.size());
|
||||||
|
return getSuccessResult(sysDept);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
|
@ -70,13 +70,15 @@ public class SysDept extends BaseEntity
|
|||||||
private String turnoverType;
|
private String turnoverType;
|
||||||
private BigDecimal turnoverLimit;
|
private BigDecimal turnoverLimit;
|
||||||
|
|
||||||
// @JsonFormat(pattern = "yyyy-MM-dd")
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
private Date turnoverStartTime;
|
private Date turnoverStartTime;
|
||||||
// @JsonFormat(pattern = "yyyy-MM-dd")
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
private Date turnoverEndTime;
|
private Date turnoverEndTime;
|
||||||
private BigDecimal rates;
|
private BigDecimal rates;
|
||||||
@TableField(strategy = FieldStrategy.IGNORED)
|
@TableField(strategy = FieldStrategy.IGNORED)
|
||||||
private Integer storeNum;
|
private Integer storeNum;
|
||||||
private BigDecimal prepaidAmount;
|
private BigDecimal prepaidAmount;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer storeNums;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,8 @@ public interface ISysDeptService extends IService<SysDept>
|
|||||||
*/
|
*/
|
||||||
public List<SysDept> selectDeptList(SysDept dept);
|
public List<SysDept> selectDeptList(SysDept dept);
|
||||||
|
|
||||||
|
List<SysDept> selectDeptLists(Long parentId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询部门树结构信息
|
* 查询部门树结构信息
|
||||||
*
|
*
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.fuint.system.dept.service.impl;
|
package com.fuint.system.dept.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.aliyun.oss.ServiceException;
|
import com.aliyun.oss.ServiceException;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
@ -25,6 +26,7 @@ import com.fuint.framework.exception.BusinessCheckException;
|
|||||||
import com.fuint.system.dept.entity.SysDept;
|
import com.fuint.system.dept.entity.SysDept;
|
||||||
import com.fuint.system.dept.mapper.SysDeptMapper;
|
import com.fuint.system.dept.mapper.SysDeptMapper;
|
||||||
import com.fuint.system.dept.service.ISysDeptService;
|
import com.fuint.system.dept.service.ISysDeptService;
|
||||||
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.annotation.Lazy;
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@ -73,6 +75,14 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper,SysDept> imple
|
|||||||
return sysDepts;
|
return sysDepts;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SysDept> selectDeptLists(Long parentId) {
|
||||||
|
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.eq("parent_id",parentId);
|
||||||
|
queryWrapper.eq("if_delete","0");
|
||||||
|
return baseMapper.selectList(queryWrapper);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询部门树结构信息
|
* 查询部门树结构信息
|
||||||
*
|
*
|
||||||
@ -234,6 +244,12 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper,SysDept> imple
|
|||||||
throw new ServiceException("部门停用,不允许新增");
|
throw new ServiceException("部门停用,不允许新增");
|
||||||
}
|
}
|
||||||
dept.setAncestors(info.getAncestors() + "," + dept.getParentId());
|
dept.setAncestors(info.getAncestors() + "," + dept.getParentId());
|
||||||
|
List<SysDept> sysDepts = this.selectDeptLists(dept.getParentId());
|
||||||
|
if (ObjectUtils.isNotEmpty(info) && ObjectUtils.isNotEmpty(info.getStoreNum()) && CollectionUtil.isNotEmpty(sysDepts) && sysDepts.size()>=info.getStoreNum())
|
||||||
|
{
|
||||||
|
throw new Exception("已到达最大的油站数量,不可添加!");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
int insert = baseMapper.insert(dept);
|
int insert = baseMapper.insert(dept);
|
||||||
//处理店铺
|
//处理店铺
|
||||||
|
@ -74,6 +74,8 @@ public class TAccount extends BaseEntity implements Serializable {
|
|||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String deptName;
|
private String deptName;
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
|
private String roleName;
|
||||||
|
@TableField(exist = false)
|
||||||
private String deptType;
|
private String deptType;
|
||||||
// @TableField(exist = false)
|
// @TableField(exist = false)
|
||||||
private String mobile;
|
private String mobile;
|
||||||
|
@ -26,11 +26,12 @@
|
|||||||
|
|
||||||
<select id="listAccount" resultType="com.fuint.repository.model.TAccount">
|
<select id="listAccount" resultType="com.fuint.repository.model.TAccount">
|
||||||
SELECT
|
SELECT
|
||||||
ta.*,sd.dept_name, ms.mobile,sd.dept_type deptType
|
ta.*,sd.dept_name, ms.mobile,sd.dept_type deptType,td.duty_name roleName
|
||||||
FROM
|
FROM
|
||||||
`t_account` ta
|
`t_account` ta
|
||||||
left join sys_dept sd on sd.dept_id = ta.dept_id
|
left join sys_dept sd on sd.dept_id = ta.dept_id
|
||||||
left join mt_staff ms on ta.staff_id = ms.id
|
left join mt_staff ms on ta.staff_id = ms.id
|
||||||
|
left join t_duty td ON ta.role_ids = td.duty_id
|
||||||
where account_status != -1
|
where account_status != -1
|
||||||
|
|
||||||
<if test="accountInfo.realName != null and accountInfo.realName != ''">
|
<if test="accountInfo.realName != null and accountInfo.realName != ''">
|
||||||
|
Loading…
Reference in New Issue
Block a user