Commit a9a8705eee2de5ca9ea737006a5eaecef91b6262
Merge branch 'master_cj_zq' into master_sample_order
Showing
2 changed files
with
29 additions
and
21 deletions
| ... | ... | @@ -245,6 +245,9 @@ public class ReceiptLedgerInfoServiceImpl extends BaseMpServiceImpl<ReceiptLedge |
| 245 | 245 | .eq(ReceiptLedgerInfo::getId, vo.getId()); |
| 246 | 246 | |
| 247 | 247 | getBaseMapper().update(updateWrapper); |
| 248 | + // 检查是否超期或超额(冻结) | |
| 249 | + autoFreeze(data.getCustomerId()); | |
| 250 | + | |
| 248 | 251 | OpLogUtil.setVariable("id", data.getId()); |
| 249 | 252 | OpLogUtil.setExtra(vo); |
| 250 | 253 | } |
| ... | ... | @@ -853,10 +856,13 @@ public class ReceiptLedgerInfoServiceImpl extends BaseMpServiceImpl<ReceiptLedge |
| 853 | 856 | } |
| 854 | 857 | Map<String, Boolean> result = new HashMap<>(); |
| 855 | 858 | for (ReceiptLedgerInfo ledgerInfo : ledgerInfoList) { |
| 859 | + Boolean excessOrOverdue = result.get(ledgerInfo.getCustomerId()); | |
| 856 | 860 | String debtStatus = ledgerInfo.getDebtStatus(); |
| 857 | 861 | BigDecimal endAccountReceivable = ledgerInfo.getEndAccountReceivable(); |
| 858 | 862 | if (StringUtils.isBlank(debtStatus) || endAccountReceivable.compareTo(BigDecimal.ZERO) <= 0) { |
| 859 | - result.put(ledgerInfo.getCustomerId(), Boolean.FALSE); | |
| 863 | + if (excessOrOverdue == null) { | |
| 864 | + result.put(ledgerInfo.getCustomerId(), Boolean.FALSE); | |
| 865 | + } | |
| 860 | 866 | } else { |
| 861 | 867 | CustomerCredit customerCredit = customerCreditMap.get(ledgerInfo.getCustomerId()); |
| 862 | 868 | if ("AGREEMENT".equals(debtStatus) && customerCredit != null) { |
| ... | ... | @@ -865,8 +871,10 @@ public class ReceiptLedgerInfoServiceImpl extends BaseMpServiceImpl<ReceiptLedge |
| 865 | 871 | endAccountReceivable = valueConvert(endAccountReceivable); |
| 866 | 872 | |
| 867 | 873 | boolean isDebt = StringUtils.isBlank(companyCreditLimit) || endAccountReceivable.compareTo(new BigDecimal(companyCreditLimit)) > 0; |
| 868 | - result.put(ledgerInfo.getCustomerId(), isDebt); | |
| 869 | - } else { | |
| 874 | + if (!BooleanUtils.isTrue(excessOrOverdue)) { | |
| 875 | + result.put(ledgerInfo.getCustomerId(), isDebt); | |
| 876 | + } | |
| 877 | + } else if (!BooleanUtils.isTrue(excessOrOverdue)) { | |
| 870 | 878 | result.put(ledgerInfo.getCustomerId(), Boolean.TRUE); |
| 871 | 879 | } |
| 872 | 880 | } | ... | ... |
| ... | ... | @@ -134,15 +134,15 @@ |
| 134 | 134 | </where> |
| 135 | 135 | ORDER BY |
| 136 | 136 | CASE |
| 137 | - WHEN d.name like '宁波办%' THEN 1 | |
| 138 | - WHEN d.name like '温州办%' THEN 2 | |
| 139 | - WHEN d.name like '东莞办%' THEN 3 | |
| 140 | - WHEN d.name like '佛山办%' THEN 4 | |
| 141 | - WHEN d.name like '苏州办%' THEN 5 | |
| 142 | - WHEN d.name like '常州办%' THEN 6 | |
| 143 | - WHEN d.name like '北方办%' THEN 7 | |
| 144 | - WHEN d.name like '紫铜办%' THEN 8 | |
| 145 | - WHEN d.name like '外贸办%' THEN 9 | |
| 137 | + WHEN d.code = 'NB' THEN 1 | |
| 138 | + WHEN d.code = 'WZ' THEN 2 | |
| 139 | + WHEN d.code = 'DG' THEN 3 | |
| 140 | + WHEN d.code = 'FS' THEN 4 | |
| 141 | + WHEN d.code = 'SZ' THEN 5 | |
| 142 | + WHEN d.code = 'CZ' THEN 6 | |
| 143 | + WHEN d.code = 'BF' THEN 7 | |
| 144 | + WHEN d.code = 'ZT' THEN 8 | |
| 145 | + WHEN d.code = 'WM' THEN 9 | |
| 146 | 146 | ELSE 10 -- 其他办事处按字母顺序排在后面 |
| 147 | 147 | END, |
| 148 | 148 | d.name ASC, |
| ... | ... | @@ -284,15 +284,15 @@ |
| 284 | 284 | </if> |
| 285 | 285 | order by |
| 286 | 286 | case |
| 287 | - when d.name like '宁波办%' then 1 | |
| 288 | - when d.name like '温州办%' then 2 | |
| 289 | - when d.name like '东莞办%' then 3 | |
| 290 | - when d.name like '佛山办%' then 4 | |
| 291 | - when d.name like '苏州办%' then 5 | |
| 292 | - when d.name like '常州办%' then 6 | |
| 293 | - when d.name like '北方办%' then 7 | |
| 294 | - when d.name like '紫铜办%' then 8 | |
| 295 | - when d.name like '外贸办%' then 9 | |
| 287 | + when d.code = 'NB' then 1 | |
| 288 | + when d.code = 'WZ' then 2 | |
| 289 | + when d.code = 'DG' then 3 | |
| 290 | + when d.code = 'FS' then 4 | |
| 291 | + when d.code = 'SZ' then 5 | |
| 292 | + when d.code = 'CZ' then 6 | |
| 293 | + when d.code = 'BF' then 7 | |
| 294 | + when d.code = 'ZT' then 8 | |
| 295 | + when d.code = 'WM' then 9 | |
| 296 | 296 | else 10 -- 其他办事处按字母顺序排在后面 |
| 297 | 297 | end, |
| 298 | 298 | d.name asc, | ... | ... |