| | |
| | | conditions.add(dataScope);
|
| | | break;
|
| | | }
|
| | | else if (DATA_SCOPE_CUSTOM.equals(dataScope))
|
| | | {
|
| | | if (scopeCustomIds.size() > 1)
|
| | | {
|
| | | // 多个自定数据权限使用in查询,避免多次拼接。
|
| | | sqlString.append(StringUtils.format(" OR {}.dept_id IN ( SELECT dept_id FROM sys_role_dept WHERE role_id in ({}) ) ", deptAlias, String.join(",", scopeCustomIds)));
|
| | | }
|
| | | else
|
| | | {
|
| | | sqlString.append(StringUtils.format(" OR {}.dept_id IN ( SELECT dept_id FROM sys_role_dept WHERE role_id = {} ) ", deptAlias, role.getRoleId()));
|
| | | }
|
| | | }
|
| | | // else if (DATA_SCOPE_CUSTOM.equals(dataScope))
|
| | | // {
|
| | | // if (scopeCustomIds.size() > 1)
|
| | | // {
|
| | | // // 多个自定数据权限使用in查询,避免多次拼接。
|
| | | // sqlString.append(StringUtils.format(" OR {}.dept_id IN ( SELECT dept_id FROM sys_role_dept WHERE role_id in ({}) ) ", deptAlias, String.join(",", scopeCustomIds)));
|
| | | // }
|
| | | // else
|
| | | // {
|
| | | // sqlString.append(StringUtils.format(" OR {}.dept_id IN ( SELECT dept_id FROM sys_role_dept WHERE role_id = {} ) ", deptAlias, role.getRoleId()));
|
| | | // }
|
| | | // }
|
| | | // else if (DATA_SCOPE_DEPT_AND_CHILD.equals(dataScope))
|
| | | // {
|
| | | // sqlString.append(StringUtils.format(" OR {}.dept_id IN ( SELECT dept_id FROM sys_dept WHERE dept_id = {} or find_in_set( {} , ancestors ) )", deptAlias, user.getDeptId(), user.getDeptId()));
|
| | |
| | | public AjaxResult paymentMonthList() { |
| | | return success(paymentRegistrationService.paymentMonthList()); |
| | | } |
| | | |
| | | /** |
| | | * 查询付款登记列表 |
| | | * |
| | | * @param paymentRegistrationDto 付款登记 |
| | | * @return 付款登记集合 |
| | | */ |
| | | @GetMapping("/paymentHistoryList") |
| | | public TableDataInfo paymentHistoryList(PaymentRegistrationDto paymentRegistrationDto) { |
| | | startPage(); |
| | | List<PaymentRegistrationDto> list = paymentRegistrationService.paymentHistoryList(paymentRegistrationDto); |
| | | return getDataTable(list); |
| | | } |
| | | } |
| | |
| | | |
| | | // 登记人 |
| | | private String registrant; |
| | | |
| | | private String searchText; |
| | | } |
| | |
| | | * @return 付款登记集合 |
| | | */ |
| | | public List<PaymentRegistrationDto> selectPaymentRegistrationList(PaymentRegistrationDto paymentRegistrationDto); |
| | | |
| | | /** |
| | | * 查询付款登记列表 |
| | | * |
| | | * @param paymentRegistrationDto 付款登记 |
| | | * @return 付款登记集合 |
| | | */ |
| | | public List<PaymentRegistrationDto> paymentHistoryList(@Param("params") PaymentRegistrationDto paymentRegistrationDto); |
| | | } |
| | |
| | | Integer detailPageSize); |
| | | |
| | | Map<String, BigDecimal> paymentMonthList(); |
| | | |
| | | /** |
| | | * 查询付款登记列表 |
| | | * |
| | | * @param paymentRegistrationDto 付款登记 |
| | | * @return 付款登记集合 |
| | | */ |
| | | public List<PaymentRegistrationDto> paymentHistoryList(PaymentRegistrationDto paymentRegistrationDto); |
| | | } |
| | |
| | | |
| | | private PurchaseLedgerMapper purchaseLedgerMapper; |
| | | |
| | | private InvoicePurchaseMapper invoicePurchaseMapper; |
| | | |
| | | private SalesLedgerMapper salesLedgerMapper; |
| | | |
| | | private SupplierManageMapper supplierManageMapper; |
| | |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 查询付款登记列表 |
| | | * |
| | | * @param paymentRegistrationDto 付款登记 |
| | | * @return 付款登记集合 |
| | | */ |
| | | @Override |
| | | public List<PaymentRegistrationDto> paymentHistoryList(PaymentRegistrationDto paymentRegistrationDto) { |
| | | return paymentRegistrationMapper.paymentHistoryList(paymentRegistrationDto); |
| | | } |
| | | |
| | | // 批量查询采购台账(当月) |
| | | private Map<Long, List<PurchaseLedger>> batchQueryPurchaseLedgers(List<Long> supplierIds, LocalDate startDate, LocalDate endDate) { |
| | | LambdaQueryWrapper<PurchaseLedger> query = new LambdaQueryWrapper<>(); |
| | |
| | | where pr.id = #{id} |
| | | </select> |
| | | |
| | | <select id="paymentHistoryList" resultType="com.ruoyi.purchase.dto.PaymentRegistrationDto"> |
| | | SELECT |
| | | T1.payment_date, |
| | | T2.supplier_name, |
| | | T1.current_payment_amount, |
| | | T1.payment_method, |
| | | T3.nick_name AS registrant, |
| | | T1.registrationt_date |
| | | FROM |
| | | payment_registration T1 |
| | | LEFT JOIN |
| | | supplier_manage T2 ON T1.supplier_id = T2.id |
| | | LEFT JOIN |
| | | sys_user T3 ON T3.user_id = T1.registrant_id |
| | | <where> |
| | | <if test="params.searchText != null and params.searchText != '' "> |
| | | AND T2.supplier_name LIKE CONCAT('%',#{params.searchText},'%') |
| | | </if> |
| | | </where> |
| | | ORDER BY T1.payment_date,T1.create_time DESC |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 --> |
| | | AND date_format(u.create_time,'%Y%m%d') <= date_format(#{params.endTime},'%Y%m%d') |
| | | </if> |
| | | <if test="deptId != null"> |
| | | <if test="params.deptId != null"> |
| | | AND u.user_id IN |
| | | ( |
| | | SELECT user_id FROM sys_user_dept WHERE dept_id = #{deptId} |
| | |
| | | <select id="selectAllocatedList" parameterType="com.ruoyi.project.system.domain.SysUser" resultMap="SysUserResult"> |
| | | select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time |
| | | from sys_user u |
| | | left join sys_dept d on u.dept_id = d.dept_id |
| | | left join sys_user_role ur on u.user_id = ur.user_id |
| | | left join sys_role r on r.role_id = ur.role_id |
| | | where u.del_flag = '0' and r.role_id = #{roleId} |
| | |
| | | <select id="selectUnallocatedList" parameterType="com.ruoyi.project.system.domain.SysUser" resultMap="SysUserResult"> |
| | | select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time |
| | | from sys_user u |
| | | left join sys_dept d on u.dept_id = d.dept_id |
| | | left join sys_user_role ur on u.user_id = ur.user_id |
| | | left join sys_role r on r.role_id = ur.role_id |
| | | where u.del_flag = '0' and (r.role_id != #{roleId} or r.role_id IS NULL) |