新增 运营商财务管理页面

This commit is contained in:
Lemon
2023-07-06 15:48:06 +08:00
parent 3102893f32
commit 4d68c43eb8
11 changed files with 227 additions and 87 deletions

View File

@@ -144,4 +144,6 @@ public class OrderBasicInfoController extends BaseController {
public AjaxResult manualSettlementOrder(@RequestBody ManualSettlementDTO dto) { public AjaxResult manualSettlementOrder(@RequestBody ManualSettlementDTO dto) {
return toAjax(orderService.manualSettlementOrder(dto)); return toAjax(orderService.manualSettlementOrder(dto));
} }
} }

View File

@@ -1,11 +1,15 @@
package com.jsowell.web.controller.pile; package com.jsowell.web.controller.pile;
import com.google.common.collect.Lists;
import com.jsowell.common.annotation.Log; import com.jsowell.common.annotation.Log;
import com.jsowell.common.core.controller.BaseController; import com.jsowell.common.core.controller.BaseController;
import com.jsowell.common.core.domain.AjaxResult; import com.jsowell.common.core.domain.AjaxResult;
import com.jsowell.common.core.domain.vo.AuthorizedDeptVO;
import com.jsowell.common.core.page.TableDataInfo; import com.jsowell.common.core.page.TableDataInfo;
import com.jsowell.common.enums.BusinessType; import com.jsowell.common.enums.BusinessType;
import com.jsowell.common.exception.BusinessException; import com.jsowell.common.exception.BusinessException;
import com.jsowell.common.util.SecurityUtils;
import com.jsowell.common.util.StringUtils;
import com.jsowell.common.util.poi.ExcelUtil; import com.jsowell.common.util.poi.ExcelUtil;
import com.jsowell.pile.domain.PileMerchantInfo; import com.jsowell.pile.domain.PileMerchantInfo;
import com.jsowell.pile.dto.CreateMerchantDTO; import com.jsowell.pile.dto.CreateMerchantDTO;
@@ -15,6 +19,7 @@ import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
@@ -109,4 +114,20 @@ public class PileMerchantInfoController extends BaseController {
public AjaxResult remove(@PathVariable Long[] ids) { public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(pileMerchantInfoService.deletePileMerchantInfoByIds(ids)); return toAjax(pileMerchantInfoService.deletePileMerchantInfoByIds(ids));
} }
/**
* 财务管理页面获取运营商列表
* @return
*/
@PreAuthorize("@ss.hasPermi('pile:merchant:query')")
@GetMapping("/getFinancialMerchantList")
public TableDataInfo getFinancialMerchantList() {
// 权限过滤
AuthorizedDeptVO authorizedMap = SecurityUtils.getAuthorizedMap();
if (authorizedMap == null) {
// 为空表示没有权限,返回空数组
return new TableDataInfo();
}
return getDataTable(pileMerchantInfoService.queryInfoListByIds(authorizedMap));
}
} }

View File

@@ -23,4 +23,7 @@ public class AuthorizedDeptVO {
// 运营商id // 运营商id
private List<String> merchantIds; private List<String> merchantIds;
// 父级id
private String parentId;
} }

View File

@@ -132,6 +132,7 @@ public class SecurityUtils {
// 登录用户角色 // 登录用户角色
List<SysRole> roles = user.getRoles(); List<SysRole> roles = user.getRoles();
Long parentId = dept.getParentId(); Long parentId = dept.getParentId();
resultVO.setParentId(String.valueOf(parentId));
List<String> merchantDeptIds = Lists.newArrayList(); List<String> merchantDeptIds = Lists.newArrayList();
List<String> stationDeptIds = Lists.newArrayList(); List<String> stationDeptIds = Lists.newArrayList();
if (parentId == 0L) { if (parentId == 0L) {

View File

@@ -77,4 +77,11 @@ public interface PileMerchantInfoMapper {
* @return * @return
*/ */
PileMerchantInfo queryInfoByDeptId(@Param("deptId") String deptId); PileMerchantInfo queryInfoByDeptId(@Param("deptId") String deptId);
/**
* 通过ids查询信息列表
* @param ids
* @return
*/
List<PileMerchantInfo> queryInfoListByIds(@Param("deptIds") List<String> deptIds);
} }

View File

@@ -1,5 +1,6 @@
package com.jsowell.pile.service; package com.jsowell.pile.service;
import com.jsowell.common.core.domain.vo.AuthorizedDeptVO;
import com.jsowell.pile.domain.PileMerchantInfo; import com.jsowell.pile.domain.PileMerchantInfo;
import com.jsowell.pile.dto.CreateMerchantDTO; import com.jsowell.pile.dto.CreateMerchantDTO;
import com.jsowell.pile.vo.base.MerchantInfoVO; import com.jsowell.pile.vo.base.MerchantInfoVO;
@@ -73,4 +74,11 @@ public interface IPileMerchantInfoService {
List<String> queryByMerchantDeptIds(List<String> merchantDeptIds); List<String> queryByMerchantDeptIds(List<String> merchantDeptIds);
PileMerchantInfo queryInfoByDeptId(String deptId); PileMerchantInfo queryInfoByDeptId(String deptId);
/**
* 通过ids查询信息列表
* @param authorizedMap
* @return
*/
List<PileMerchantInfo> queryInfoListByIds(AuthorizedDeptVO authorizedMap);
} }

View File

@@ -6,10 +6,7 @@ import com.jsowell.common.core.domain.entity.SysDept;
import com.jsowell.common.core.domain.entity.SysUser; import com.jsowell.common.core.domain.entity.SysUser;
import com.jsowell.common.core.domain.vo.AuthorizedDeptVO; import com.jsowell.common.core.domain.vo.AuthorizedDeptVO;
import com.jsowell.common.exception.BusinessException; import com.jsowell.common.exception.BusinessException;
import com.jsowell.common.util.DateUtils; import com.jsowell.common.util.*;
import com.jsowell.common.util.DictUtils;
import com.jsowell.common.util.SecurityUtils;
import com.jsowell.common.util.StringUtils;
import com.jsowell.pile.domain.PileMerchantInfo; import com.jsowell.pile.domain.PileMerchantInfo;
import com.jsowell.pile.dto.CreateMerchantDTO; import com.jsowell.pile.dto.CreateMerchantDTO;
import com.jsowell.pile.mapper.PileMerchantInfoMapper; import com.jsowell.pile.mapper.PileMerchantInfoMapper;
@@ -250,4 +247,22 @@ public class PileMerchantInfoServiceImpl implements IPileMerchantInfoService {
public PileMerchantInfo queryInfoByDeptId(String deptId) { public PileMerchantInfo queryInfoByDeptId(String deptId) {
return pileMerchantInfoMapper.queryInfoByDeptId(deptId); return pileMerchantInfoMapper.queryInfoByDeptId(deptId);
} }
/**
* 通过ids查询信息列表
* @param authorizedMap
* @return
*/
@Override
public List<PileMerchantInfo> queryInfoListByIds(AuthorizedDeptVO authorizedMap) {
String parentId = authorizedMap.getParentId();
List<String> deptIds = Lists.newArrayList();
// 父级id为100表示为 thinkgem 账号, 0为 jskf 账号
if (!StringUtils.equals("100", parentId) && !StringUtils.equals("0", parentId)) {
String deptId = authorizedMap.getDeptId();
deptIds.add(deptId);
}
PageUtils.startPage();
return pileMerchantInfoMapper.queryInfoListByIds(deptIds);
}
} }

View File

@@ -286,4 +286,18 @@
where where
dept_id = #{deptId,jdbcType=VARCHAR} dept_id = #{deptId,jdbcType=VARCHAR}
</select> </select>
<select id="queryInfoListByIds" resultMap="PileMerchantInfoResult">
select
<include refid="Base_Column_List"/>
from
pile_merchant_info
where del_flag = '0'
<if test="deptIds != null and deptIds.size() != 0">
and dept_id in
<foreach collection="deptIds" item="deptId" open="(" separator="," close=")">
#{deptId,jdbcType=VARCHAR}
</foreach>
</if>
</select>
</mapper> </mapper>

View File

@@ -1528,7 +1528,7 @@ public class LianLianServiceImpl implements LianLianService {
List<EquipmentInfo> resultList = new ArrayList<>(); List<EquipmentInfo> resultList = new ArrayList<>();
// 通过站点id查询桩基本信息 // 通过站点id查询桩基本信息
List<PileBasicInfo> list = pileBasicInfoService.getPileListByStationId(String.valueOf(pileStationInfo.getId())); List<PileBasicInfo> list = pileBasicInfoService.getPileListByStationId(String.valueOf(pileStationInfo.getId()));
MerchantInfoVO merchantInfo = pileMerchantInfoService.getMerchantInfo(String.valueOf(pileStationInfo.getMerchantId())); // MerchantInfoVO merchantInfo = pileMerchantInfoService.getMerchantInfo(String.valueOf(pileStationInfo.getMerchantId()));
// 封装成联联平台对象 // 封装成联联平台对象
for (PileBasicInfo pileBasicInfo : list) { for (PileBasicInfo pileBasicInfo : list) {
EquipmentInfo equipmentInfo = new EquipmentInfo(); EquipmentInfo equipmentInfo = new EquipmentInfo();

View File

@@ -51,3 +51,11 @@ export function getMerchantList(query) {
params: query params: query
}) })
} }
// 财务管理页面获取运营商列表
export function getFinancialMerchantList() {
return request({
url: '/pile/merchant/getFinancialMerchantList',
method: 'get'
})
}

View File

@@ -77,7 +77,8 @@
icon="el-icon-search" icon="el-icon-search"
size="mini" size="mini"
@click="handleQuery" @click="handleQuery"
>搜索</el-button >搜索
</el-button
> >
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
@@ -85,7 +86,8 @@
icon="el-icon-refresh" icon="el-icon-refresh"
size="mini" size="mini"
@click="resetQuery" @click="resetQuery"
>重置</el-button >重置
</el-button
> >
</el-col> </el-col>
<el-button <el-button
@@ -95,39 +97,59 @@
size="mini" size="mini"
@click="handleExport" @click="handleExport"
v-hasPermi="['order:order:export']" v-hasPermi="['order:order:export']"
>导出</el-button >导出
</el-button
> >
</el-row> </el-row>
<el-table <el-table
:data="tableData" :data="merchantList"
stripe stripe
border border
style="width: 100%"> style="width: 100%">
<el-table-column <el-table-column
prop="date" prop="merchantName"
label="运营商" label="运营商"
width="180"> align="center"
</el-table-column> />
<el-table-column <el-table-column
prop="name" prop="organizationCode"
label="组织机构代码" label="组织机构代码"
width="180"> align="center"
/>
<el-table-column
prop="status"
label="状态"
align="center"
width="130"
>
<template slot-scope="scope">
<dict-tag
:options="dict.type.merchant_status"
:value="scope.row.status"
/>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="address" prop="managerName"
label="联系人"> label="联系人"
</el-table-column> align="center"
width="130"
/>
<el-table-column
prop="managerPhone"
label="联系方式"
align="center"
width="300"
/>
<el-table-column
prop="createTime"
label="入驻时间"
align="center"
/>
<el-table-column <el-table-column
prop="address" prop="address"
label="联系方式"> label="操作"
</el-table-column> align="center">
<el-table-column
prop="address"
label="入驻时间">
</el-table-column>
<el-table-column
prop="address"
label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- :to="'/merchant/detail/index/' + scope.row.id" --> <!-- :to="'/merchant/detail/index/' + scope.row.id" -->
<router-link <router-link
@@ -145,19 +167,46 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getFinancialMerchantList"
/>
</div> </div>
</template> </template>
<script> <script>
import {getFinancialMerchantList} from "@/api/pile/merchant";
export default { export default {
dicts: ["merchant_status"],
data() { data() {
return { return {
// 运营商列表
merchantList: [],
showOrHideText: "显示更多查询条件", showOrHideText: "显示更多查询条件",
buttonBoolean: false, buttonBoolean: false,
//图标,可根据自己的需求匹配 //图标,可根据自己的需求匹配
icon: "el-icon-caret-bottom", icon: "el-icon-caret-bottom",
queryParams:{},
total: 0,
queryParams: {
pageNum: 1,
pageSize: 10,
merchantName: null,
address: null,
status: null,
organizationCode: null,
managerName: null,
managerPhone: null,
servicePhone: null,
logoUrl: null,
},
tableData: [{ tableData: [{
date: '2016-05-02', date: '2016-05-02',
name: '王小虎', name: '王小虎',
@@ -178,6 +227,7 @@ export default {
}; };
}, },
created() { created() {
this.getFinancialMerchantList();
}, },
methods: { methods: {
showOrHide() { showOrHide() {
@@ -191,6 +241,13 @@ export default {
this.buttonBoolean = !this.buttonBoolean; this.buttonBoolean = !this.buttonBoolean;
} }
}, },
// 获取运营商列表
getFinancialMerchantList() {
getFinancialMerchantList().then((response) => {
console.log("merchantList", response)
this.merchantList = response.rows;
})
},
// 取消按钮 // 取消按钮
cancel() { cancel() {
this.open = false; this.open = false;
@@ -224,13 +281,15 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep ::v-deep
.el-descriptions--medium:not(.is-bordered) .el-descriptions--medium:not(.is-bordered)
.el-descriptions-item__cell { .el-descriptions-item__cell {
padding-bottom: 4px; padding-bottom: 4px;
} }
::v-deep .el-descriptions__header { ::v-deep .el-descriptions__header {
margin-bottom: 10px; margin-bottom: 10px;
} }
.cardview-box { .cardview-box {
width: 100%; width: 100%;
margin-bottom: 12px; margin-bottom: 12px;
@@ -238,6 +297,7 @@ export default {
color: #4a4a4a; color: #4a4a4a;
border: 1px solid #f0f0f0; border: 1px solid #f0f0f0;
} }
.cardview-static { .cardview-static {
height: 100%; height: 100%;
width: 100%; width: 100%;
@@ -249,6 +309,7 @@ export default {
line-height: 46px; line-height: 46px;
background-color: #f0f0f0; background-color: #f0f0f0;
} }
.flex { .flex {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;