Commit 6893a9c147eef66f7bc8309473406cc575bee677

Authored by yeqianyong
2 parents 5958d0b9 a23a8d0c

Merge branch 'master_cj_zq' into master_sample_order

@@ -154,7 +154,7 @@ public class ReceiptLedgerInfoController extends DefaultBaseController { @@ -154,7 +154,7 @@ public class ReceiptLedgerInfoController extends DefaultBaseController {
154 * 台账报表导出 154 * 台账报表导出
155 */ 155 */
156 @ApiOperation("台账报表导出") 156 @ApiOperation("台账报表导出")
157 - @HasPermission({"customer-dev-manage:customer-dev-plan:export"}) 157 + @HasPermission({"account-manage:ledger-table:export"})
158 @GetMapping("/report/export") 158 @GetMapping("/report/export")
159 public InvokeResult<Void> export(@Valid ReceiptLedgerReportVo vo) { 159 public InvokeResult<Void> export(@Valid ReceiptLedgerReportVo vo) {
160 if (StringUtils.isBlank(vo.getExportType())) { 160 if (StringUtils.isBlank(vo.getExportType())) {
@@ -575,8 +575,8 @@ public class ReceiptLedgerInfoServiceImpl extends BaseMpServiceImpl<ReceiptLedge @@ -575,8 +575,8 @@ public class ReceiptLedgerInfoServiceImpl extends BaseMpServiceImpl<ReceiptLedge
575 reportDetail.setTimingStatus("超期3"); 575 reportDetail.setTimingStatus("超期3");
576 } 576 }
577 // 统计待交付订单数 577 // 统计待交付订单数
578 - Long count = orderCountMap.get(customerName);  
579 - if (count != null && !customerNames.contains(customerName)) { 578 + long count = orderCountMap.get(customerName) == null ? 0 : orderCountMap.get(customerName);
  579 + if (!customerNames.contains(customerName)) {
580 waitDeliveredOrderTotal += count; 580 waitDeliveredOrderTotal += count;
581 reportDetail.setWaitDeliveredOrder(count); 581 reportDetail.setWaitDeliveredOrder(count);
582 // 防止重复相加 582 // 防止重复相加
@@ -146,10 +146,14 @@ @@ -146,10 +146,14 @@
146 ELSE 10 -- 其他办事处按字母顺序排在后面 146 ELSE 10 -- 其他办事处按字母顺序排在后面
147 END, 147 END,
148 d.name ASC, 148 d.name ASC,
  149 + CASE WHEN r.name IS NULL THEN 1 ELSE 0 END,
149 r.name ASC, 150 r.name ASC,
  151 + CASE WHEN cs.short_name IS NULL THEN 1 ELSE 0 END,
150 cs.short_name ASC, 152 cs.short_name ASC,
  153 + CASE WHEN oc.name IS NULL THEN 1 ELSE 0 END,
151 oc.name ASC, 154 oc.name ASC,
152 - tb.shipment_date DESC 155 + CASE WHEN tb.shipment_date IS NULL THEN 1 ELSE 0 END,
  156 + tb.shipment_date ASC
153 </select> 157 </select>
154 158
155 <select id="queryByCustomerShortName" resultMap="ReceiptLedgerInfo"> 159 <select id="queryByCustomerShortName" resultMap="ReceiptLedgerInfo">
@@ -292,6 +296,7 @@ @@ -292,6 +296,7 @@
292 else 10 -- 其他办事处按字母顺序排在后面 296 else 10 -- 其他办事处按字母顺序排在后面
293 end, 297 end,
294 d.name asc, 298 d.name asc,
  299 + case when r.name is null then 1 else 0 end,
295 r.name asc, 300 r.name asc,
296 sum(distinct rl.end_account_receivable) desc 301 sum(distinct rl.end_account_receivable) desc
297 </select> 302 </select>