mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-28 19:18:00 +08:00
update 财务中心查询接口新增字段、增加搜索
This commit is contained in:
@@ -3,16 +3,14 @@ package com.jsowell.web.controller.pile;
|
|||||||
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.PageUtils;
|
import com.jsowell.common.util.PageUtils;
|
||||||
import com.jsowell.common.util.SecurityUtils;
|
|
||||||
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;
|
||||||
import com.jsowell.pile.dto.PageDTO;
|
import com.jsowell.pile.dto.QueryMerchantInfoDTO;
|
||||||
import com.jsowell.pile.service.IPileMerchantInfoService;
|
import com.jsowell.pile.service.IPileMerchantInfoService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
@@ -131,16 +129,10 @@ public class PileMerchantInfoController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('pile:merchant:query')")
|
@PreAuthorize("@ss.hasPermi('pile:merchant:query')")
|
||||||
@PostMapping("/getFinancialMerchantList")
|
@PostMapping("/getFinancialMerchantList")
|
||||||
public TableDataInfo getFinancialMerchantList(@RequestBody PageDTO dto) {
|
public TableDataInfo getFinancialMerchantList(@RequestBody QueryMerchantInfoDTO dto) {
|
||||||
int pageNum = dto.getPageNum() == 0 ? 1 : dto.getPageNum();
|
int pageNum = dto.getPageNum() == 0 ? 1 : dto.getPageNum();
|
||||||
int pageSize = dto.getPageSize() == 0 ? 10 : dto.getPageSize();
|
int pageSize = dto.getPageSize() == 0 ? 10 : dto.getPageSize();
|
||||||
// 权限过滤
|
|
||||||
AuthorizedDeptVO authorizedMap = SecurityUtils.getAuthorizedMap();
|
|
||||||
if (authorizedMap == null) {
|
|
||||||
// 为空表示没有权限,返回空数组
|
|
||||||
return new TableDataInfo();
|
|
||||||
}
|
|
||||||
PageUtils.startPage(pageNum, pageSize);
|
PageUtils.startPage(pageNum, pageSize);
|
||||||
return getDataTable(pileMerchantInfoService.queryInfoListByIds(authorizedMap));
|
return getDataTable(pileMerchantInfoService.queryMerchantInfoListByAuth(dto));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package com.jsowell.pile.dto;
|
||||||
|
|
||||||
|
import com.jsowell.common.core.domain.vo.AuthorizedDeptVO;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询运营商信息DTO
|
||||||
|
*
|
||||||
|
* @author Lemon
|
||||||
|
* @Date 2023/9/16 11:05
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class QueryMerchantInfoDTO {
|
||||||
|
private Integer pageSize;
|
||||||
|
|
||||||
|
private Integer pageNum;
|
||||||
|
|
||||||
|
private String merchantId;
|
||||||
|
|
||||||
|
private String merchantName;
|
||||||
|
|
||||||
|
private List<String> deptIds;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
package com.jsowell.pile.mapper;
|
package com.jsowell.pile.mapper;
|
||||||
|
|
||||||
import com.jsowell.pile.domain.PileMerchantInfo;
|
import com.jsowell.pile.domain.PileMerchantInfo;
|
||||||
|
import com.jsowell.pile.dto.QueryMerchantInfoDTO;
|
||||||
|
import com.jsowell.pile.vo.web.MerchantSettleInfoVO;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
@@ -103,4 +105,11 @@ public interface PileMerchantInfoMapper {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<String> getDeptIdsByAppId(@Param("appId") String appId);
|
List<String> getDeptIdsByAppId(@Param("appId") String appId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 后管财务中心页面运营商列表
|
||||||
|
* @param dto
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<MerchantSettleInfoVO> queryMerchantSettleInfoList(@Param("dto") QueryMerchantInfoDTO dto);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,9 @@ package com.jsowell.pile.service;
|
|||||||
import com.jsowell.common.core.domain.vo.AuthorizedDeptVO;
|
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.dto.QueryMerchantInfoDTO;
|
||||||
import com.jsowell.pile.vo.base.MerchantInfoVO;
|
import com.jsowell.pile.vo.base.MerchantInfoVO;
|
||||||
|
import com.jsowell.pile.vo.web.MerchantSettleInfoVO;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -88,10 +90,10 @@ public interface IPileMerchantInfoService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过ids查询信息列表
|
* 通过ids查询信息列表
|
||||||
* @param authorizedMap
|
* @param dto
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<PileMerchantInfo> queryInfoListByIds(AuthorizedDeptVO authorizedMap);
|
List<MerchantSettleInfoVO> queryMerchantInfoListByAuth(QueryMerchantInfoDTO dto);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询一级运营商列表
|
* 查询一级运营商列表
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import com.jsowell.common.constant.Constants;
|
|||||||
import com.jsowell.common.core.domain.entity.SysDept;
|
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.core.page.TableDataInfo;
|
||||||
import com.jsowell.common.enums.ykc.ReturnCodeEnum;
|
import com.jsowell.common.enums.ykc.ReturnCodeEnum;
|
||||||
import com.jsowell.common.exception.BusinessException;
|
import com.jsowell.common.exception.BusinessException;
|
||||||
import com.jsowell.common.util.DateUtils;
|
import com.jsowell.common.util.DateUtils;
|
||||||
@@ -13,9 +14,11 @@ import com.jsowell.common.util.SecurityUtils;
|
|||||||
import com.jsowell.common.util.StringUtils;
|
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.dto.QueryMerchantInfoDTO;
|
||||||
import com.jsowell.pile.mapper.PileMerchantInfoMapper;
|
import com.jsowell.pile.mapper.PileMerchantInfoMapper;
|
||||||
import com.jsowell.pile.service.IPileMerchantInfoService;
|
import com.jsowell.pile.service.IPileMerchantInfoService;
|
||||||
import com.jsowell.pile.vo.base.MerchantInfoVO;
|
import com.jsowell.pile.vo.base.MerchantInfoVO;
|
||||||
|
import com.jsowell.pile.vo.web.MerchantSettleInfoVO;
|
||||||
import com.jsowell.system.service.SysDeptService;
|
import com.jsowell.system.service.SysDeptService;
|
||||||
import com.jsowell.system.service.SysUserService;
|
import com.jsowell.system.service.SysUserService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -25,6 +28,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.concurrent.CompletableFuture;
|
import java.util.concurrent.CompletableFuture;
|
||||||
@@ -319,19 +323,28 @@ public class PileMerchantInfoServiceImpl implements IPileMerchantInfoService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过ids查询信息列表
|
* 通过ids查询信息列表
|
||||||
* @param authorizedMap
|
* @param dto
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<PileMerchantInfo> queryInfoListByIds(AuthorizedDeptVO authorizedMap) {
|
public List<MerchantSettleInfoVO> queryMerchantInfoListByAuth(QueryMerchantInfoDTO dto) {
|
||||||
|
if (CollectionUtils.isEmpty(dto.getDeptIds())) {
|
||||||
|
dto.setDeptIds(Lists.newArrayList());
|
||||||
|
}
|
||||||
|
// 权限过滤
|
||||||
|
AuthorizedDeptVO authorizedMap = SecurityUtils.getAuthorizedMap();
|
||||||
|
if (authorizedMap == null) {
|
||||||
|
// 为空表示没有权限,返回空数组
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
String parentId = authorizedMap.getParentId();
|
String parentId = authorizedMap.getParentId();
|
||||||
List<String> deptIds = Lists.newArrayList();
|
|
||||||
// 父级id为0代表 thinkgem/jskf 账号
|
// 父级id为0代表 thinkgem/jskf 账号
|
||||||
if (!StringUtils.equals("0", parentId)) {
|
if (!StringUtils.equals("0", parentId)) {
|
||||||
String deptId = authorizedMap.getDeptId();
|
String deptId = authorizedMap.getDeptId();
|
||||||
deptIds.add(deptId);
|
dto.getDeptIds().add(deptId);
|
||||||
}
|
}
|
||||||
return pileMerchantInfoMapper.queryInfoListByIds(deptIds);
|
// return pileMerchantInfoMapper.queryInfoListByIds(deptIds);
|
||||||
|
return pileMerchantInfoMapper.queryMerchantSettleInfoList(dto);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package com.jsowell.pile.vo.web;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 后管财务中心页面VO
|
||||||
|
*
|
||||||
|
* @author Lemon
|
||||||
|
* @Date 2023/9/15 16:35
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class MerchantSettleInfoVO {
|
||||||
|
private String merchantId;
|
||||||
|
private String merchantName;
|
||||||
|
private String address;
|
||||||
|
private String status;
|
||||||
|
private String adapayMemberId;
|
||||||
|
private String settleAccountId;
|
||||||
|
private String auditStatus;
|
||||||
|
private String organizationCode;
|
||||||
|
private String managerName;
|
||||||
|
private String managerPhone;
|
||||||
|
private String createTime;
|
||||||
|
}
|
||||||
@@ -368,4 +368,37 @@
|
|||||||
and app_id = #{appId,jdbcType=VARCHAR}
|
and app_id = #{appId,jdbcType=VARCHAR}
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="queryMerchantSettleInfoList" resultType="com.jsowell.pile.vo.web.MerchantSettleInfoVO">
|
||||||
|
SELECT
|
||||||
|
t1.id as merchantId,
|
||||||
|
t1.merchant_name AS merchantName,
|
||||||
|
t1.address,
|
||||||
|
t1.status,
|
||||||
|
t2.adapay_member_id AS adapayMemberId,
|
||||||
|
t2.settle_account_id AS settleAccountId,
|
||||||
|
t2.`status` as auditStatus,
|
||||||
|
t1.organization_code AS organizationCode,
|
||||||
|
t1.manager_name AS managerName,
|
||||||
|
t1.manager_phone AS managerPhone,
|
||||||
|
t1.create_time AS createTime
|
||||||
|
FROM
|
||||||
|
pile_merchant_info t1
|
||||||
|
left JOIN adapay_member_account t2 ON t1.id = t2.merchant_id
|
||||||
|
AND t1.del_flag = '0'
|
||||||
|
AND t2.del_flag = '0'
|
||||||
|
where 1 = 1
|
||||||
|
<if test="dto.deptIds != null and dto.deptIds.size() != 0">
|
||||||
|
and t1.dept_id in
|
||||||
|
<foreach collection="dto.deptIds" item="deptId" open="(" separator="," close=")">
|
||||||
|
#{deptId,jdbcType=VARCHAR}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="dto.merchantName != null and dto.merchantName != ''">
|
||||||
|
and t1.merchant_name like #{dto.merchantName,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
<if test="dto.merchantId != null and dto.merchantId != ''">
|
||||||
|
and t1.id = #{dto.merchantId,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<!-- <el-form
|
<el-form
|
||||||
:model="queryParams"
|
:model="queryParams"
|
||||||
ref="queryForm"
|
ref="queryForm"
|
||||||
size="small"
|
size="small"
|
||||||
@@ -8,13 +8,15 @@
|
|||||||
label-width="110px"
|
label-width="110px"
|
||||||
@submit.native.prevent
|
@submit.native.prevent
|
||||||
>
|
>
|
||||||
<el-form-item label="运营商名称" prop="merchantName">
|
<el-form-item label="运营商" prop="merchantId" label-width="120">
|
||||||
<el-input
|
<el-select v-model="queryParams.merchantId" filterable clearable placeholder="请选择运营商">
|
||||||
v-model="queryParams.merchantName"
|
<el-option
|
||||||
placeholder="请输入运营商名称"
|
v-for="item in merchantList"
|
||||||
clearable
|
:key="item.merchantName"
|
||||||
@keyup.enter.native="handleQuery"
|
:label="item.merchantName"
|
||||||
/>
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button
|
<el-button
|
||||||
@@ -28,8 +30,9 @@
|
|||||||
>重置</el-button
|
>重置</el-button
|
||||||
>
|
>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form> -->
|
</el-form>
|
||||||
<el-table :data="merchantList" style="width: 100%" v-loading="loading">
|
|
||||||
|
<el-table :data="merchantInfoList" style="width: 100%" v-loading="loading">
|
||||||
<el-table-column prop="merchantName" label="运营商" align="center">
|
<el-table-column prop="merchantName" label="运营商" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<router-link
|
<router-link
|
||||||
@@ -60,6 +63,25 @@
|
|||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="adapayMemberId"
|
||||||
|
label="汇付会员id"
|
||||||
|
align="center"
|
||||||
|
/>
|
||||||
|
<!-- <el-table-column prop="auditStatus" label="汇付会员审核状态" align="center" width="130">-->
|
||||||
|
<!-- <template slot-scope="scope">-->
|
||||||
|
<!-- <dict-tag-->
|
||||||
|
<!-- :options="dict.type.account_audit_status"-->
|
||||||
|
<!-- :value="scope.row.status"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- </template>-->
|
||||||
|
<!-- </el-table-column>-->
|
||||||
|
<el-table-column
|
||||||
|
prop="settleAccountId"
|
||||||
|
label="汇付结算账户id"
|
||||||
|
align="center"
|
||||||
|
/>
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="managerName"
|
prop="managerName"
|
||||||
label="联系人"
|
label="联系人"
|
||||||
@@ -108,20 +130,20 @@
|
|||||||
:total="total"
|
:total="total"
|
||||||
:page.sync="queryParams.pageNum"
|
:page.sync="queryParams.pageNum"
|
||||||
:limit.sync="queryParams.pageSize"
|
:limit.sync="queryParams.pageSize"
|
||||||
@pagination="getMerchantList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getFinancialMerchantList } from "@/api/pile/merchant";
|
import {getFinancialMerchantList, getMerchantList} from "@/api/pile/merchant";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
dicts: ["merchant_status"],
|
dicts: ["merchant_status", "account_audit_status"],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 运营商列表
|
// 运营商列表
|
||||||
merchantList: [],
|
merchantInfoList: [],
|
||||||
loading: true,
|
loading: true,
|
||||||
showOrHideText: "显示更多查询条件",
|
showOrHideText: "显示更多查询条件",
|
||||||
buttonBoolean: false,
|
buttonBoolean: false,
|
||||||
@@ -131,11 +153,14 @@ export default {
|
|||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
|
merchantId: null,
|
||||||
|
merchantName: null,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getMerchantList();
|
this.getMerchantList();
|
||||||
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
showOrHide() {
|
showOrHide() {
|
||||||
@@ -149,21 +174,27 @@ export default {
|
|||||||
this.buttonBoolean = !this.buttonBoolean;
|
this.buttonBoolean = !this.buttonBoolean;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 获取运营商列表
|
// 获取列表
|
||||||
getMerchantList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
getFinancialMerchantList(this.queryParams).then((response) => {
|
getFinancialMerchantList(this.queryParams).then((response) => {
|
||||||
this.merchantList = response.rows;
|
this.merchantInfoList = response.rows;
|
||||||
// console.log("response", response);
|
console.log("response", response);
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
getMerchantList() {
|
||||||
|
getMerchantList().then((response) => {
|
||||||
|
this.merchantList = response.rows;
|
||||||
|
console.log("merchantList", this.merchantList)
|
||||||
|
});
|
||||||
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
console.log("搜索的值", this.queryParams);
|
console.log("搜索的值", this.queryParams);
|
||||||
this.queryParams.pageNum = 1;
|
this.queryParams.pageNum = 1;
|
||||||
this.getMerchantList();
|
this.getList();
|
||||||
},
|
},
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
@@ -174,9 +205,7 @@ export default {
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
::v-deep
|
::v-deep .el-descriptions--medium:not(.is-bordered) .el-descriptions-item__cell {
|
||||||
.el-descriptions--medium:not(.is-bordered)
|
|
||||||
.el-descriptions-item__cell {
|
|
||||||
padding-bottom: 4px;
|
padding-bottom: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user