feat:退换各自食堂明细
This commit is contained in:
1 parent
ab1397897f
commit
8b0df2572e
10 files changed
+139
-15
No files matched your search
+5
-3
@@ -20,7 +20,6 @@ public class WalletTransactionVo extends WalletTransactionEntity implements Base
|
||||
/**
|
||||
* 用户相关
|
||||
*/
|
||||
|
||||
private Long userId;
|
||||
|
||||
private String username;
|
||||
@@ -32,7 +31,6 @@ public class WalletTransactionVo extends WalletTransactionEntity implements Base
|
||||
/**
|
||||
* 部门相关
|
||||
*/
|
||||
|
||||
private Long deptId;
|
||||
|
||||
private String deptName;
|
||||
@@ -40,7 +38,6 @@ public class WalletTransactionVo extends WalletTransactionEntity implements Base
|
||||
/**
|
||||
* 钱包相关
|
||||
*/
|
||||
|
||||
private Long walletId;
|
||||
|
||||
private String walletCardNumber;
|
||||
@@ -99,4 +96,9 @@ public class WalletTransactionVo extends WalletTransactionEntity implements Base
|
||||
*/
|
||||
private Long lineNumber;
|
||||
|
||||
|
||||
/**
|
||||
* 审批相关
|
||||
*/
|
||||
private String processId;
|
||||
}
|
||||
+20
@@ -127,6 +127,16 @@ public class WalletTransactionController {
|
||||
return R.ok(walletTransactionService.scopePageList(page, dto, dataScope));
|
||||
}
|
||||
|
||||
@Operation(summary = "后台退还各自食堂记录", description = "后台退还各自食堂记录")
|
||||
@PostMapping("/page-th")
|
||||
public R pageTh(@ParameterObject Page page, @RequestBody WalletTransactionDto dto) {
|
||||
dto.setBizTypes(List.of(WalletBizEnum.RETURN_CANTEEN.getCode()));
|
||||
dto.setIsFindOrder(false);
|
||||
DataScope dataScope = new DataScope();
|
||||
return R.ok(walletTransactionService.scopePageList(page, dto, dataScope));
|
||||
}
|
||||
|
||||
|
||||
@Operation(summary = "分页查询复杂查询", description = "分页查询复杂查询")
|
||||
@GetMapping("/page-join")
|
||||
// TODO 这个比较公用先不加权限
|
||||
@@ -206,4 +216,14 @@ public class WalletTransactionController {
|
||||
List<WalletTransactionVo> list = walletTransactionService.scopeList(dto, DataScope.of());
|
||||
walletTransactionService.exportByTemplate(response, dto, "file/个人退款明细.xlsx", list);
|
||||
}
|
||||
|
||||
@Operation(summary = "后台退还各自食堂记录导出", description = "后台退还各自食堂记录导出")
|
||||
@PostMapping("/export-th")
|
||||
@PreAuthorize("@pms.hasPermission('wallet_walletTransaction_export')")
|
||||
public void exportTh(HttpServletResponse response, @RequestBody WalletTransactionDto dto) {
|
||||
dto.setBizTypes(List.of(WalletBizEnum.RETURN_CANTEEN.getCode()));
|
||||
dto.setIsFindOrder(false);
|
||||
List<WalletTransactionVo> list = walletTransactionService.scopeList(dto, DataScope.of());
|
||||
walletTransactionService.exportByTemplate(response, dto, "file/退还各自食堂明细.xlsx", list);
|
||||
}
|
||||
}
|
||||
+2
@@ -99,6 +99,8 @@ public interface WalletTransactionMapper extends PjcloudBaseMapper<WalletTransac
|
||||
return BeanUtils.toBean(list, WalletTransactionVo.class);
|
||||
}
|
||||
|
||||
Page<WalletTransactionVo> scopeJzPageList(Page page, @Param("dto") WalletTransactionDto dto, DataScope dataScope);
|
||||
|
||||
Integer getTransactionPriceCount(@Param("month") String importTimeStr, @Param("walletId") Long walletId,
|
||||
@Param("bizType") String bizType);
|
||||
|
||||
|
||||
+5
@@ -16,6 +16,11 @@ public interface WalletTransactionService extends IService<WalletTransactionEnti
|
||||
|
||||
Page<WalletTransactionVo> scopePageList(Page page, WalletTransactionDto dto, DataScope dataScope);
|
||||
|
||||
/**
|
||||
* 记账列表
|
||||
*/
|
||||
Page<WalletTransactionVo> scopeJzPageList(Page page, WalletTransactionDto dto, DataScope dataScope);
|
||||
|
||||
List<WalletTransactionVo> scopeList(WalletTransactionDto dto, DataScope dataScope);
|
||||
|
||||
/**
|
||||
|
||||
+10
@@ -179,6 +179,16 @@ public class WalletTransactionServiceImpl extends ServiceImpl<WalletTransactionM
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 记账列表
|
||||
*/
|
||||
@Override
|
||||
public Page<WalletTransactionVo> scopeJzPageList(Page page, WalletTransactionDto dto, DataScope dataScope) {
|
||||
Page<WalletTransactionVo> list = baseMapper.scopeJzPageList(page, dto, dataScope);
|
||||
disposeList(list.getRecords(), dto);
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WalletTransactionVo> scopeList(WalletTransactionDto dto, DataScope dataScope) {
|
||||
List<WalletTransactionVo> list = baseMapper.scopeList(dto, dataScope);
|
||||
|
||||
+46
@@ -13,11 +13,57 @@
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectA">
|
||||
select a.id,
|
||||
a.wallet_id,
|
||||
a.user_id,
|
||||
a.dept_id,
|
||||
a.biz_type,
|
||||
a.biz_id,
|
||||
a.title,
|
||||
a.price,
|
||||
a.balance,
|
||||
a.create_by,
|
||||
a.create_time,
|
||||
a.update_by,
|
||||
a.update_time,
|
||||
a.del_flag,
|
||||
a.tenant_id,
|
||||
</sql>
|
||||
|
||||
<sql id="whereA">
|
||||
a.del_flag = '0'
|
||||
<if test="dto.walletId != null">
|
||||
and a.wallet_id = #{dto.walletId}
|
||||
</if>
|
||||
<if test="dto.userId != null">
|
||||
and a.user_id = #{dto.userId}
|
||||
</if>
|
||||
<if test="dto.bizId != null">
|
||||
and a.biz_id = #{dto.bizId}
|
||||
</if>
|
||||
<if test="dto.bizType != null">
|
||||
and a.biz_type = #{dto.bizType}
|
||||
</if>
|
||||
<if test="dto.type != null and dto.type == 1 ">
|
||||
and a.price > 0
|
||||
</if>
|
||||
<if test="dto.type != null and dto.type == 2 ">
|
||||
and a.price < 0
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="scopeJzPageList" resultType="com.bsd.pjcloud.wallet.api.vo.transaction.WalletTransactionVo">
|
||||
<include refid="selectA"/>
|
||||
y.process_id as processId
|
||||
from wallet_transaction a
|
||||
inner join wallet_recharge_import i on i.id = a.biz_id and i.del_flag = '0'
|
||||
inner join wallet_recharge_apply y on y.id = i.apply_id and y.del_flag = '0'
|
||||
<where>
|
||||
<include refid="whereA"/>
|
||||
</where>
|
||||
order by a.create_time desc , a.id desc
|
||||
</select>
|
||||
|
||||
<select id="getTransactionPriceCount" resultType="java.lang.Integer">
|
||||
select sum(a.price)
|
||||
from wallet_transaction a
|
||||
|
||||
Reference in new issue
Block a user