Browse Source

fix:bug

zhangwei 3 years ago
parent
commit
9959d7966f
19 changed files with 492 additions and 563 deletions
  1. 0 112
      src/main/java/com/winhc/repal/controller/AccountBillController.java
  2. 0 99
      src/main/java/com/winhc/repal/controller/AccountBillDiagnosisController.java
  3. 0 78
      src/main/java/com/winhc/repal/controller/AccountBillMoneyRecordController.java
  4. 0 60
      src/main/java/com/winhc/repal/controller/AccountBillOperLogController.java
  5. 0 60
      src/main/java/com/winhc/repal/controller/AccountBillPayerController.java
  6. 0 99
      src/main/java/com/winhc/repal/controller/AccountBookOpenController.java
  7. 0 42
      src/main/java/com/winhc/repal/controller/AccountRemindSettingController.java
  8. 47 0
      src/main/java/com/winhc/repal/controller/RepalManageController.java
  9. 3 3
      src/main/java/com/winhc/repal/controller/RepalRemindHistoryController.java
  10. 29 0
      src/main/java/com/winhc/repal/model/bo/ManageBillInfoBO.java
  11. 47 0
      src/main/java/com/winhc/repal/model/bo/RepalManageBillPageBO.java
  12. 90 0
      src/main/java/com/winhc/repal/model/vo/RepalManageBillDetailVO.java
  13. 32 0
      src/main/java/com/winhc/repal/model/vo/RepalManageBillInfoVO.java
  14. 59 0
      src/main/java/com/winhc/repal/model/vo/RepalManageBillPageVO.java
  15. 32 0
      src/main/java/com/winhc/repal/repository/RepalBillMapper.java
  16. 15 3
      src/main/java/com/winhc/repal/service/RepalBillService.java
  17. 84 6
      src/main/java/com/winhc/repal/service/impl/RepalBillServiceImpl.java
  18. 1 1
      src/main/java/com/winhc/repal/service/impl/RepalCustomerServiceImpl.java
  19. 53 0
      src/main/resources/mapper/RepalBillMapper.xml

+ 0 - 112
src/main/java/com/winhc/repal/controller/AccountBillController.java

@@ -1,112 +0,0 @@
-//package com.winhc.returnmoney.controller;
-//
-//import com.winhc.common.base.BeanResponse;
-//import com.winhc.common.enums.CodeMsg;
-//import com.winhc.common.model.base.VOPage;
-//import com.winhc.returnmoney.common.BaseController;
-//import com.winhc.returnmoney.entity.AccountBill;
-//import com.winhc.returnmoney.model.dto.*;
-//import com.winhc.returnmoney.model.vo.*;
-//import com.winhc.returnmoney.service.AccountBillService;
-//import com.winhc.returnmoney.util.RequesterUtil;
-//import io.swagger.annotations.Api;
-//import io.swagger.annotations.ApiOperation;
-//import lombok.extern.slf4j.Slf4j;
-//import org.springframework.beans.factory.annotation.Autowired;
-//import org.springframework.validation.annotation.Validated;
-//import org.springframework.web.bind.annotation.*;
-//
-//import java.util.List;
-//
-//
-///**
-// * @description AccountBill Controller
-// * @author Generator
-// * @date 2020-12-15
-// */
-//@Slf4j
-//@Api(tags = "账款")
-//@RestController
-//@RequestMapping(value = "/accountBill")
-//public class AccountBillController extends BaseController {
-//
-//    @Autowired
-//    private AccountBillService accountBillService;
-//
-//    @ApiOperation("获取账本下的账款列表")
-//    @RequestMapping( method = RequestMethod.GET)
-//    public BeanResponse<VOPage<AccountBillListVO>> getAccountBillList(@Validated GetAccountBillListDTO dto) {
-//        return BeanResponse.success(CodeMsg.SUCCESS, accountBillService.getAccountBillList(dto.setUserId(RequesterUtil.getCurrentUserId())));
-//    }
-//
-//    @ApiOperation("获取账款信息by账款id")
-//    @RequestMapping(value = "/{id}", method = RequestMethod.GET)
-//    public BeanResponse<AccountBillDetailVO> getAccountBillDetailById(@PathVariable("id") Long id) {
-//        return BeanResponse.success(CodeMsg.SUCCESS, accountBillService.getAccountBillDetailById(id, RequesterUtil.getCurrentUserId(), getAppPackageName(), getAppVersion()));
-//    }
-//
-//    @ApiOperation("根据类型和账款id修改账款信息")
-//    @RequestMapping(value = "/{id}", method = RequestMethod.PUT)
-//    public BeanResponse<Boolean> updateAccountBillByType(@PathVariable("id")Long id, @Validated @RequestBody UpdateAccountBillDTO dto) {
-//        return BeanResponse.success(CodeMsg.SUCCESS, accountBillService.updateAccountBillByType(dto.setUserId(RequesterUtil.getCurrentUserId()).setAccountBillId(id)));
-//    }
-//
-//    @ApiOperation("新增账款")
-//    @RequestMapping(method = RequestMethod.POST)
-//    public BeanResponse<AccountBillVO> addAccountBook(@Validated @RequestBody AddAccountBillDTO dto) {
-//        return BeanResponse.success(CodeMsg.SUCCESS, accountBillService.addAccountBill(dto, RequesterUtil.getCurrentUserId()));
-//    }
-//
-//    @ApiOperation("删除账款")
-//    @DeleteMapping("/{id}")
-//    public BeanResponse<Boolean> delAccountBook(@PathVariable("id")Long id){
-//        return BeanResponse.success(CodeMsg.SUCCESS, accountBillService.deleteAccountBill(id,RequesterUtil.getCurrentUser()));
-//    }
-//
-//    @ApiOperation("简易轮询账款")
-//    @RequestMapping(value = "/poll/{id}", method = RequestMethod.GET)
-//    public BeanResponse<AccountBillVO> pollAccountBillById(@PathVariable("id")Long id) {
-//        return BeanResponse.success(CodeMsg.SUCCESS, accountBillService.pollAccountBillById(new AccountBill().setId(id).setUserId(RequesterUtil.getCurrentUserId())));
-//    }
-//
-//    @ApiOperation("批量轮询")
-//    @RequestMapping(value = "/poll/batch", method = RequestMethod.POST)
-//    public BeanResponse<List<AccountBillVO>> pollBatchAccountBillByIds(@RequestBody BatchPollAccountBillDTO dto) {
-//        return BeanResponse.success(CodeMsg.SUCCESS, accountBillService.pollBatchAccountBillByIds(dto.setUserId(RequesterUtil.getCurrentUserId())));
-//    }
-//
-//    @ApiOperation("联系客服")
-//    @RequestMapping(value = "/apply", method = RequestMethod.GET)
-//    public BeanResponse<Boolean> applyCustomerService(ApplyCustomerServiceDTO dto) {
-//        return BeanResponse.success(CodeMsg.SUCCESS, accountBillService.applyCustomerService(dto.setUserId(RequesterUtil.getCurrentUserId())));
-//    }
-//
-//    @ApiOperation("批量导入")
-//    @RequestMapping(value = "/batchImport", method = RequestMethod.POST)
-//    public BeanResponse<BatchImportResultVO> batchImportAccountBill(@RequestBody List<BatchImportAccountBillDTO> dtoList) {
-//        return BeanResponse.success(CodeMsg.SUCCESS, accountBillService.batchImportAccountBill(dtoList));
-//    }
-//
-//    @ApiOperation("账款添加一笔已收回记录")
-//    @RequestMapping(value = "/receipt", method = RequestMethod.POST)
-//    public BeanResponse<Boolean> addAccountBillReceipt(@RequestBody AddAccountBillReceiptDTO dto) {
-//        return BeanResponse.success(CodeMsg.SUCCESS, accountBillService.addAccountBillReceipt(dto, RequesterUtil.getCurrentUserId()));
-//    }
-//
-////    @Deprecated
-////    @ApiOperation("修复cid对应companyId")
-////    @RequestMapping(value = "/fixCompanyId", method = RequestMethod.POST)
-////    public BeanResponse<Boolean> fixCompanyId() {
-////        return BeanResponse.success(CodeMsg.SUCCESS, accountBillService.fixCompanyId());
-////    }
-//
-//    @ApiOperation("获取用户应收账款总额和笔数")
-//    @RequestMapping(value = "/total/{userId}", method = RequestMethod.GET)
-//    public BeanResponse<AccountBillTotalVO> getTotalMoneyAndCount(@PathVariable("userId") Long userId) {
-//        return BeanResponse.success(CodeMsg.SUCCESS, accountBillService.getTotalMoneyAndCount(userId));
-//    }
-//
-//
-//
-//
-//}

+ 0 - 99
src/main/java/com/winhc/repal/controller/AccountBillDiagnosisController.java

@@ -1,99 +0,0 @@
-//package com.winhc.returnmoney.controller;
-//
-//import com.winhc.common.base.BeanResponse;
-//import com.winhc.common.enums.CodeMsg;
-//import com.winhc.common.model.base.VOPage;
-//import com.winhc.returnmoney.model.vo.DiagnosisHistoryVO;
-//import com.winhc.returnmoney.model.vo.DiagnosisSectionVO;
-//import com.winhc.returnmoney.mq.bean.RiskScoreDataTransfer;
-//import com.winhc.returnmoney.service.AccountBillDiagnosisService;
-//import io.swagger.annotations.Api;
-//import io.swagger.annotations.ApiOperation;
-//import lombok.extern.slf4j.Slf4j;
-//import org.springframework.beans.factory.annotation.Autowired;
-//import org.springframework.web.bind.annotation.PathVariable;
-//import org.springframework.web.bind.annotation.RequestMapping;
-//import org.springframework.web.bind.annotation.RequestMethod;
-//import org.springframework.web.bind.annotation.RequestParam;
-//import org.springframework.web.bind.annotation.RestController;
-//
-//
-///**
-// * @description AccountBillDiagnosis Controller
-// * @author Generator
-// * @date 2020-12-15
-// */
-//@Slf4j
-//@Api(tags = "账款评级")
-//@RestController
-//@RequestMapping("/accountBillDiagnosis")
-//public class AccountBillDiagnosisController {
-//
-//    @Autowired
-//    private AccountBillDiagnosisService diagnosisService;
-//
-//    @ApiOperation("账款评级历史")
-//    @RequestMapping(value = "/history/{id}", method = RequestMethod.GET)
-//    public BeanResponse<VOPage<DiagnosisHistoryVO>> getDiagnosisHistory(@PathVariable("id") Long id,
-//                                                                @RequestParam(value = "pageNum" , defaultValue = "1")Integer pageNum,
-//                                                                @RequestParam(value = "pageSize", defaultValue = "10")Integer pageSize) {
-//        return BeanResponse.success(CodeMsg.SUCCESS, diagnosisService.getDiagnosisHistory(id, pageNum, pageSize));
-//    }
-//
-//    @ApiOperation("账款评级区间历史")
-//    @RequestMapping(value = "/dynamic/{id}", method = RequestMethod.GET)
-//    public BeanResponse<DiagnosisSectionVO> getDiagnosisDynamic(@PathVariable("id")Long id) {
-//        return BeanResponse.success(CodeMsg.SUCCESS, diagnosisService.getDiagnosisDynamic(id));
-//    }
-//
-//    @ApiOperation("report回调接口")
-//    @RequestMapping(value = "/open/grade/refresh", method = RequestMethod.GET)
-//    public BeanResponse<Boolean> updateGrade(RiskScoreDataTransfer transfer){
-//        diagnosisService.updateGrade(transfer);
-//        return BeanResponse.success(CodeMsg.SUCCESS,Boolean.TRUE);
-//    }
-//
-//
-//
-//    //@Autowired
-//    //private AccountBillDiagnosisService accountBillDiagnosisService;
-//    //
-//    //@PostMapping
-//    //@ApiOperation(value = "add AccountBillDiagnosis")
-//    //public ApiResult add(@Validated @RequestBody AccountBillDiagnosisDTO dto) {
-//    //    accountBillDiagnosisService.add(dto);
-//    //    return ResultUtil.response(CodeMsg.SUCCESS);
-//    //}
-//    //
-//    //@PutMapping("/{id}")
-//    //@ApiOperation(value = "update AccountBillDiagnosis")
-//    //public ApiResult update(@PathVariable Long id, @Validated @RequestBody AccountBillDiagnosisDTO dto) {
-//    //    accountBillDiagnosisService.update(id, dto);
-//    //    return ResultUtil.response(CodeMsg.SUCCESS);
-//    //}
-//    //
-//    //@GetMapping("/{id}")
-//    //@ApiOperation(value = "find AccountBillDiagnosis")
-//    //public ApiDataResult<AccountBillDiagnosisVO> find(@PathVariable Long id) {
-//    //    return ResultUtil.response(CodeMsg.SUCCESS,accountBillDiagnosisService.find(id));
-//    //}
-//    //
-//    //@DeleteMapping("/{id}")
-//    //@ApiOperation(value = "delete AccountBillDiagnosis")
-//    //public ApiResult delete(@PathVariable Long id) {
-//    //    accountBillDiagnosisService.delete(id);
-//    //    return ResultUtil.response(CodeMsg.SUCCESS);
-//    //}
-//    //
-//    //@GetMapping("/list")
-//    //@ApiOperation(value = "list of AccountBillDiagnosis")
-//    //public ApiDataResult<List<AccountBillDiagnosisVO>> list(AccountBillDiagnosisDTO dto) {
-//    //    return ResultUtil.response(CodeMsg.SUCCESS,accountBillDiagnosisService.find(dto));
-//    //}
-//    //
-//    //@GetMapping("/page")
-//    //@ApiOperation(value = "page of AccountBillDiagnosis")
-//    //public ApiDataResult<VOPage<AccountBillDiagnosisVO>> page(AccountBillDiagnosisDTO dto, @RequestParam Integer pageNum, @RequestParam Integer pageSize) {
-//    //    return ResultUtil.response(CodeMsg.SUCCESS,accountBillDiagnosisService.find(dto, pageNum, pageSize));
-//    //}
-//}

+ 0 - 78
src/main/java/com/winhc/repal/controller/AccountBillMoneyRecordController.java

@@ -1,78 +0,0 @@
-//package com.winhc.returnmoney.controller;
-//
-//import com.winhc.common.base.BeanResponse;
-//import com.winhc.common.enums.CodeMsg;
-//import com.winhc.returnmoney.model.vo.BillMoneyChangeRecordVO;
-//import com.winhc.returnmoney.service.AccountBillMoneyRecordService;
-//import org.springframework.web.bind.annotation.RequestMapping;
-//import org.springframework.beans.factory.annotation.Autowired;
-//import org.springframework.web.bind.annotation.*;
-//import java.util.List;
-//import lombok.extern.slf4j.Slf4j;
-//import io.swagger.annotations.Api;
-//import io.swagger.annotations.ApiOperation;
-//import org.springframework.web.bind.annotation.RestController;
-//
-//
-///**
-// * @description AccountBillMoneyRecord Controller
-// * @author Generator
-// * @date 2020-12-15
-// */
-//@Slf4j
-//@Api(tags = "账款金额变动记录")
-//@RestController
-//@RequestMapping("/accountBillMoneyRecord")
-//public class AccountBillMoneyRecordController {
-//
-//    @Autowired
-//    private AccountBillMoneyRecordService moneyRecordService;
-//
-//    @ApiOperation(value = "变动记录list")
-//    @RequestMapping(value = "/{accountBillId}", method = RequestMethod.GET)
-//    public BeanResponse<List<BillMoneyChangeRecordVO>> getChangeRecordList(@PathVariable("accountBillId")Long accountBillId) {
-//        return BeanResponse.success(CodeMsg.SUCCESS, moneyRecordService.getChangeRecordList(accountBillId));
-//    }
-//
-//    //@Autowired
-//    //private AccountBillMoneyRecordService accountBillMoneyRecordService;
-//    //
-//    //@PostMapping
-//    //@ApiOperation(value = "add AccountBillMoneyRecord")
-//    //public ApiResult add(@Validated @RequestBody AccountBillMoneyRecordDTO dto) {
-//    //    accountBillMoneyRecordService.add(dto);
-//    //    return ResultUtil.response(CodeMsg.SUCCESS);
-//    //}
-//    //
-//    //@PutMapping("/{id}")
-//    //@ApiOperation(value = "update AccountBillMoneyRecord")
-//    //public ApiResult update(@PathVariable Long id, @Validated @RequestBody AccountBillMoneyRecordDTO dto) {
-//    //    accountBillMoneyRecordService.update(id, dto);
-//    //    return ResultUtil.response(CodeMsg.SUCCESS);
-//    //}
-//    //
-//    //@GetMapping("/{id}")
-//    //@ApiOperation(value = "find AccountBillMoneyRecord")
-//    //public ApiDataResult<AccountBillMoneyRecordVO> find(@PathVariable Long id) {
-//    //    return ResultUtil.response(CodeMsg.SUCCESS,accountBillMoneyRecordService.find(id));
-//    //}
-//    //
-//    //@DeleteMapping("/{id}")
-//    //@ApiOperation(value = "delete AccountBillMoneyRecord")
-//    //public ApiResult delete(@PathVariable Long id) {
-//    //    accountBillMoneyRecordService.delete(id);
-//    //    return ResultUtil.response(CodeMsg.SUCCESS);
-//    //}
-//    //
-//    //@GetMapping("/list")
-//    //@ApiOperation(value = "list of AccountBillMoneyRecord")
-//    //public ApiDataResult<List<AccountBillMoneyRecordVO>> list(AccountBillMoneyRecordDTO dto) {
-//    //    return ResultUtil.response(CodeMsg.SUCCESS,accountBillMoneyRecordService.find(dto));
-//    //}
-//    //
-//    //@GetMapping("/page")
-//    //@ApiOperation(value = "page of AccountBillMoneyRecord")
-//    //public ApiDataResult<VOPage<AccountBillMoneyRecordVO>> page(AccountBillMoneyRecordDTO dto, @RequestParam Integer pageNum, @RequestParam Integer pageSize) {
-//    //    return ResultUtil.response(CodeMsg.SUCCESS,accountBillMoneyRecordService.find(dto, pageNum, pageSize));
-//    //}
-//}

+ 0 - 60
src/main/java/com/winhc/repal/controller/AccountBillOperLogController.java

@@ -1,60 +0,0 @@
-//package com.winhc.returnmoney.controller;
-//
-//import org.springframework.web.bind.annotation.RequestMapping;
-//import lombok.extern.slf4j.Slf4j;
-//import io.swagger.annotations.Api;
-//import org.springframework.web.bind.annotation.RestController;
-//
-//
-///**
-// * @description AccountBillOperLog Controller
-// * @author Generator
-// * @date 2020-12-15
-// */
-//@Slf4j
-//@Api(tags = "AccountBillOperLog Controller")
-//@RestController
-//@RequestMapping("accountBillOperLog")
-//public class AccountBillOperLogController {
-//    //@Autowired
-//    //private AccountBillOperLogService accountBillOperLogService;
-//    //
-//    //@PostMapping
-//    //@ApiOperation(value = "add AccountBillOperLog")
-//    //public ApiResult add(@Validated @RequestBody AccountBillOperLogDTO dto) {
-//    //    accountBillOperLogService.add(dto);
-//    //    return ResultUtil.response(CodeMsg.SUCCESS);
-//    //}
-//    //
-//    //@PutMapping("/{id}")
-//    //@ApiOperation(value = "update AccountBillOperLog")
-//    //public ApiResult update(@PathVariable Long id, @Validated @RequestBody AccountBillOperLogDTO dto) {
-//    //    accountBillOperLogService.update(id, dto);
-//    //    return ResultUtil.response(CodeMsg.SUCCESS);
-//    //}
-//    //
-//    //@GetMapping("/{id}")
-//    //@ApiOperation(value = "find AccountBillOperLog")
-//    //public ApiDataResult<AccountBillOperLogVO> find(@PathVariable Long id) {
-//    //    return ResultUtil.response(CodeMsg.SUCCESS,accountBillOperLogService.find(id));
-//    //}
-//    //
-//    //@DeleteMapping("/{id}")
-//    //@ApiOperation(value = "delete AccountBillOperLog")
-//    //public ApiResult delete(@PathVariable Long id) {
-//    //    accountBillOperLogService.delete(id);
-//    //    return ResultUtil.response(CodeMsg.SUCCESS);
-//    //}
-//    //
-//    //@GetMapping("/list")
-//    //@ApiOperation(value = "list of AccountBillOperLog")
-//    //public ApiDataResult<List<AccountBillOperLogVO>> list(AccountBillOperLogDTO dto) {
-//    //    return ResultUtil.response(CodeMsg.SUCCESS,accountBillOperLogService.find(dto));
-//    //}
-//    //
-//    //@GetMapping("/page")
-//    //@ApiOperation(value = "page of AccountBillOperLog")
-//    //public ApiDataResult<VOPage<AccountBillOperLogVO>> page(AccountBillOperLogDTO dto, @RequestParam Integer pageNum, @RequestParam Integer pageSize) {
-//    //    return ResultUtil.response(CodeMsg.SUCCESS,accountBillOperLogService.find(dto, pageNum, pageSize));
-//    //}
-//}

+ 0 - 60
src/main/java/com/winhc/repal/controller/AccountBillPayerController.java

@@ -1,60 +0,0 @@
-//package com.winhc.returnmoney.controller;
-//
-//import org.springframework.web.bind.annotation.RequestMapping;
-//import lombok.extern.slf4j.Slf4j;
-//import io.swagger.annotations.Api;
-//import org.springframework.web.bind.annotation.RestController;
-//
-//
-///**
-// * @description AccountBillPayer Controller
-// * @author Generator
-// * @date 2020-12-15
-// */
-//@Slf4j
-//@Api(tags = "AccountBillPayer Controller")
-//@RestController
-//@RequestMapping("accountBillPayer")
-//public class AccountBillPayerController {
-//    //@Autowired
-//    //private AccountBillPayerService accountBillPayerService;
-//    //
-//    //@PostMapping
-//    //@ApiOperation(value = "add AccountBillPayer")
-//    //public ApiResult add(@Validated @RequestBody AccountBillPayerDTO dto) {
-//    //    accountBillPayerService.add(dto);
-//    //    return ResultUtil.response(CodeMsg.SUCCESS);
-//    //}
-//    //
-//    //@PutMapping("/{id}")
-//    //@ApiOperation(value = "update AccountBillPayer")
-//    //public ApiResult update(@PathVariable Long id, @Validated @RequestBody AccountBillPayerDTO dto) {
-//    //    accountBillPayerService.update(id, dto);
-//    //    return ResultUtil.response(CodeMsg.SUCCESS);
-//    //}
-//    //
-//    //@GetMapping("/{id}")
-//    //@ApiOperation(value = "find AccountBillPayer")
-//    //public ApiDataResult<AccountBillPayerVO> find(@PathVariable Long id) {
-//    //    return ResultUtil.response(CodeMsg.SUCCESS,accountBillPayerService.find(id));
-//    //}
-//    //
-//    //@DeleteMapping("/{id}")
-//    //@ApiOperation(value = "delete AccountBillPayer")
-//    //public ApiResult delete(@PathVariable Long id) {
-//    //    accountBillPayerService.delete(id);
-//    //    return ResultUtil.response(CodeMsg.SUCCESS);
-//    //}
-//    //
-//    //@GetMapping("/list")
-//    //@ApiOperation(value = "list of AccountBillPayer")
-//    //public ApiDataResult<List<AccountBillPayerVO>> list(AccountBillPayerDTO dto) {
-//    //    return ResultUtil.response(CodeMsg.SUCCESS,accountBillPayerService.find(dto));
-//    //}
-//    //
-//    //@GetMapping("/page")
-//    //@ApiOperation(value = "page of AccountBillPayer")
-//    //public ApiDataResult<VOPage<AccountBillPayerVO>> page(AccountBillPayerDTO dto, @RequestParam Integer pageNum, @RequestParam Integer pageSize) {
-//    //    return ResultUtil.response(CodeMsg.SUCCESS,accountBillPayerService.find(dto, pageNum, pageSize));
-//    //}
-//}

+ 0 - 99
src/main/java/com/winhc/repal/controller/AccountBookOpenController.java

@@ -1,99 +0,0 @@
-//package com.winhc.returnmoney.controller;
-//
-//import com.winhc.common.base.BeanResponse;
-//import com.winhc.common.enums.CodeMsg;
-//import com.winhc.common.model.base.VOPage;
-//import com.winhc.returnmoney.common.BaseController;
-//import com.winhc.returnmoney.model.dto.GetAccountBillListDTO;
-//import com.winhc.returnmoney.model.vo.AccountBillDetailVO;
-//import com.winhc.returnmoney.model.vo.AccountBillListVO;
-//import com.winhc.returnmoney.model.vo.AccountBookDetailVO;
-//import com.winhc.returnmoney.model.vo.AccountBookVO;
-//import com.winhc.returnmoney.model.vo.BillMoneyChangeRecordVO;
-//import com.winhc.returnmoney.model.vo.DiagnosisHistoryVO;
-//import com.winhc.returnmoney.model.vo.DiagnosisSectionVO;
-//import com.winhc.returnmoney.service.AccountBillDiagnosisService;
-//import com.winhc.returnmoney.service.AccountBillMoneyRecordService;
-//import com.winhc.returnmoney.service.AccountBillService;
-//import com.winhc.returnmoney.service.AccountBookService;
-//import io.swagger.annotations.Api;
-//import io.swagger.annotations.ApiOperation;
-//import org.springframework.beans.factory.annotation.Autowired;
-//import org.springframework.web.bind.annotation.PathVariable;
-//import org.springframework.web.bind.annotation.RequestMapping;
-//import org.springframework.web.bind.annotation.RequestMethod;
-//import org.springframework.web.bind.annotation.RequestParam;
-//import org.springframework.web.bind.annotation.RestController;
-//
-//import java.util.List;
-//
-///**
-// * @Description: AccountBookOpenController
-// * @Author: xda
-// * @Date: 2020/12/21  18:20
-// */
-//@Api(tags = "演示数据")
-//@RestController
-//@RequestMapping("/open")
-//public class AccountBookOpenController extends BaseController {
-//
-//    @Autowired
-//    private AccountBillService accountBillService;
-//
-//    @Autowired
-//    private AccountBookService accountBookService;
-//
-//    @Autowired
-//    private AccountBillMoneyRecordService moneyRecordService;
-//
-//    @Autowired
-//    private AccountBillDiagnosisService diagnosisService;
-//
-//    // 11.3.5 USER WINHC
-//
-//    @ApiOperation(value = "获取账本列表")
-//    @RequestMapping(value = "/accountBook", method = RequestMethod.GET)
-//    public BeanResponse<List<AccountBookVO>> getAccountBookList() {
-//        return BeanResponse.success(CodeMsg.SUCCESS, accountBookService.getAccountBookList(0L));
-//    }
-//
-//    @ApiOperation(value = "查看单个账本")
-//    @RequestMapping(value = "/accountBook/{id}", method = RequestMethod.GET)
-//    public BeanResponse<AccountBookDetailVO> getAccountBookById(@PathVariable("id") Long id) {
-//        return BeanResponse.success(CodeMsg.SUCCESS, accountBookService.getAccountBookById(id, 0L));
-//    }
-//
-//    @ApiOperation("获取账本下的账款列表")
-//    @RequestMapping(value = "/accountBill", method = RequestMethod.GET)
-//    public BeanResponse<VOPage<AccountBillListVO>> getAccountBillList(GetAccountBillListDTO dto) {
-//        return BeanResponse.success(CodeMsg.SUCCESS, accountBillService.getAccountBillList(dto.setUserId(0L)));
-//    }
-//
-//    @ApiOperation("获取账款信息by账款id")
-//    @RequestMapping(value = "/accountBill/{id}", method = RequestMethod.GET)
-//    public BeanResponse<AccountBillDetailVO> getAccountBillDetailById(@PathVariable("id") Long id) {
-//        return BeanResponse.success(CodeMsg.SUCCESS, accountBillService.getAccountBillDetailById(id, 0L, getAppPackageName(), getAppVersion()));
-//    }
-//
-//    @ApiOperation(value = "变动记录list")
-//    @RequestMapping(value = "/accountBillMoneyRecord/{accountBillId}", method = RequestMethod.GET)
-//    public BeanResponse<List<BillMoneyChangeRecordVO>> getChangeRecordList(@PathVariable("accountBillId")Long accountBillId) {
-//        return BeanResponse.success(CodeMsg.SUCCESS, moneyRecordService.getChangeRecordList(accountBillId));
-//    }
-//
-//    @ApiOperation("账款评级历史")
-//    @RequestMapping(value = "/accountBillDiagnosis/history/{id}", method = RequestMethod.GET)
-//    public BeanResponse<VOPage<DiagnosisHistoryVO>> getDiagnosisHistory(@PathVariable("id") Long id,
-//                                                                        @RequestParam(value = "pageNum" , defaultValue = "1")Integer pageNum,
-//                                                                        @RequestParam(value = "pageSize", defaultValue = "10")Integer pageSize) {
-//        return BeanResponse.success(CodeMsg.SUCCESS, diagnosisService.getDiagnosisHistory(id, pageNum, pageSize));
-//    }
-//
-//    @ApiOperation("账款评级区间历史")
-//    @RequestMapping(value = "/accountBillDiagnosis/dynamic/{id}", method = RequestMethod.GET)
-//    public BeanResponse<DiagnosisSectionVO> getDiagnosisDynamic(@PathVariable("id")Long id) {
-//        return BeanResponse.success(CodeMsg.SUCCESS, diagnosisService.getDiagnosisDynamic(id));
-//    }
-//
-//
-//}

+ 0 - 42
src/main/java/com/winhc/repal/controller/AccountRemindSettingController.java

@@ -1,42 +0,0 @@
-//package com.winhc.returnmoney.controller;
-//
-//import com.module.login.usersession.UserBean;
-//import com.winhc.common.base.BeanResponse;
-//import com.winhc.common.enums.CodeMsg;
-//import com.winhc.returnmoney.model.dto.AccountRemindSettingDTO;
-//import com.winhc.returnmoney.model.vo.AccountRemindSettingVO;
-//import com.winhc.returnmoney.service.AccountRemindSettingService;
-//import com.winhc.returnmoney.util.RequesterUtil;
-//import io.swagger.annotations.Api;
-//import io.swagger.annotations.ApiOperation;
-//import lombok.extern.slf4j.Slf4j;
-//import org.springframework.beans.factory.annotation.Autowired;
-//import org.springframework.web.bind.annotation.*;
-//
-///**
-// * @author Aaron
-// * @date 2021/8/3 15:06
-// * @description
-// */
-//@Slf4j
-//@Api(tags = "提醒设置")
-//@RestController
-//@RequestMapping("accountRemind/setting")
-//public class AccountRemindSettingController {
-//    @Autowired
-//    private AccountRemindSettingService accountRemindSettingService;
-//
-//    @GetMapping
-//    @ApiOperation(value = "查询提醒设置")
-//    public BeanResponse<AccountRemindSettingVO> querySetting(){
-//        UserBean userBean = RequesterUtil.getCurrentUser();
-//        return BeanResponse.success(CodeMsg.SUCCESS, accountRemindSettingService.find(userBean.getUserId()));
-//    }
-//
-//    @PostMapping
-//    @ApiOperation(value = "修改提醒设置")
-//    public BeanResponse<Boolean> updateSetting(@RequestBody AccountRemindSettingDTO dto){
-//        accountRemindSettingService.update(RequesterUtil.getCurrentUser(),dto);
-//        return BeanResponse.success(CodeMsg.SUCCESS,Boolean.TRUE);
-//    }
-//}

+ 47 - 0
src/main/java/com/winhc/repal/controller/RepalManageController.java

@@ -0,0 +1,47 @@
+package com.winhc.repal.controller;
+
+import com.winhc.common.base.BeanResponse;
+import com.winhc.common.enums.CodeMsg;
+import com.winhc.common.model.base.VOPage;
+import com.winhc.repal.model.vo.RepalManageBillDetailVO;
+import com.winhc.repal.model.vo.RepalManageBillInfoVO;
+import com.winhc.repal.model.vo.RepalManageBillPageVO;
+import com.winhc.repal.service.RepalBillService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * @author Aaron
+ * @date 2022/5/6 11:16
+ * @description
+ */
+@Slf4j
+@Api(tags = "催款管理")
+@RestController
+@RequestMapping("repalManage")
+public class RepalManageController {
+    @Autowired
+    private RepalBillService repalBillService;
+
+    @ApiOperation("汇总")
+    @GetMapping("/summary")
+    public BeanResponse<RepalManageBillInfoVO> queryManageInfo(){
+        return BeanResponse.success(CodeMsg.SUCCESS,repalBillService.queryManageInfo());
+    }
+
+    @ApiOperation("分页查询催款列表")
+    @GetMapping("/page")
+    public BeanResponse<VOPage<RepalManageBillPageVO>> queryManageBillPage(@RequestParam(value = "pageNum",defaultValue = "1")Integer pageNum,
+                                                                           @RequestParam(value = "pageSize",defaultValue = "10")Integer pageSize){
+        return BeanResponse.success(CodeMsg.SUCCESS,repalBillService.queryManageBillPage(pageNum, pageSize));
+    }
+
+    @ApiOperation("查询催款账款详情")
+    @GetMapping("/{repalBillId}")
+    public BeanResponse<RepalManageBillDetailVO> querManageBillDetail(@PathVariable("repalBillId")Long repalBillId){
+        return BeanResponse.success(CodeMsg.SUCCESS,null);
+    }
+}

+ 3 - 3
src/main/java/com/winhc/repal/controller/RepalRemindHistoryController.java

@@ -27,7 +27,7 @@ import java.util.List;
  * @date 2020-12-14
  */
 @Slf4j
-@Api(tags = "智能提醒API")
+@Api(tags = "智能监测")
 @RestController
 @RequestMapping("repalRemind")
 public class RepalRemindHistoryController extends BaseController {
@@ -35,14 +35,14 @@ public class RepalRemindHistoryController extends BaseController {
     private RepalRemindHistoryService accountRemindHistoryService;
 
     @GetMapping("/{id}")
-    @ApiOperation(value = "根据id查询智能提醒详情")
+    @ApiOperation(value = "根据id查询智能监测详情")
     public BeanResponse<RepalRemindHistoryVO> find(@PathVariable Long id) {
         return BeanResponse.success(CodeMsg.SUCCESS,accountRemindHistoryService.getDetailById(id, getUser()));
     }
 
 
     @GetMapping("/page")
-    @ApiOperation(value = "根据条件查询智能提醒")
+    @ApiOperation(value = "根据条件查询智能监测")
     public BeanResponse<VOPage<RepalRemindHistoryVO>> page(RepalRemindHistoryDTO dto,
                                                            @RequestParam(required = false,defaultValue = "1") Integer pageNum,
                                                            @RequestParam(required = false,defaultValue = "10") Integer pageSize) {

+ 29 - 0
src/main/java/com/winhc/repal/model/bo/ManageBillInfoBO.java

@@ -0,0 +1,29 @@
+package com.winhc.repal.model.bo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+
+/**
+ * @author Aaron
+ * @date 2022/5/6 13:56
+ * @description
+ */
+@Data
+public class ManageBillInfoBO {
+    @ApiModelProperty("总逾期金额")
+    private BigDecimal totalOverdue;
+
+    @ApiModelProperty("总逾期笔数")
+    private Integer totalOverdueCount;
+
+    @ApiModelProperty("即将逾期金额str")
+    private BigDecimal totalOverdueWeek;
+
+    @ApiModelProperty("即将逾期笔数")
+    private Integer totalOverdueWeekCount;
+
+    @ApiModelProperty("总金额")
+    private BigDecimal totalMoney;
+}

+ 47 - 0
src/main/java/com/winhc/repal/model/bo/RepalManageBillPageBO.java

@@ -0,0 +1,47 @@
+package com.winhc.repal.model.bo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.time.LocalDate;
+import java.util.List;
+
+/**
+ * @Description: RepalBillPageVO
+ * @Author: xda
+ * @Date: 2022/4/8 11:13
+ */
+@Data
+@ApiModel("账款分页对象")
+public class RepalManageBillPageBO {
+    @ApiModelProperty(value = "账款id")
+    private Long repalBillId;
+
+    @ApiModelProperty(value = "账本id")
+    private Long repalBookId;
+
+    @ApiModelProperty(value = "账本名称")
+    private String repalBookName;
+
+    @ApiModelProperty(value = "账款逾期状态,1进行中,2三天后到期,3已逾期.4已结清。5已终止")
+    private Integer repalBillStatus;
+
+    @ApiModelProperty("到期日期,字符串,格式yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private LocalDate endDate;
+
+    @ApiModelProperty(value = "客户性质 1企业 2个人 3政府事业单位")
+    private Integer custProperty;
+
+    @ApiModelProperty(value = "客户名称")
+    private String customerName;
+
+    @ApiModelProperty(value = "账款总金额")
+    private BigDecimal totalMoney;
+
+    @ApiModelProperty(value = "逾期/即将逾期金额")
+    private BigDecimal receivable;
+}

+ 90 - 0
src/main/java/com/winhc/repal/model/vo/RepalManageBillDetailVO.java

@@ -0,0 +1,90 @@
+package com.winhc.repal.model.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.util.List;
+
+/**
+ * @Description: RepalBillDetailVO
+ * @Author: xda
+ * @Date: 2022/4/13 19:40
+ */
+@Data
+@ApiModel("账款详情")
+public class RepalManageBillDetailVO {
+
+    @ApiModelProperty(value = "所属组织id")
+    private Long repalGroupId;
+
+    @ApiModelProperty(value = "账款id")
+    private Long repalBillId;
+
+    @ApiModelProperty(value = "账本id")
+    private Long repalBookId;
+
+    @ApiModelProperty(value = "客户name")
+    private String customerName;
+
+    @ApiModelProperty(value = "公司companyId")
+    private String companyId;
+
+    @ApiModelProperty(value = "客户性质 1企业 2个人 3政府事业单位")
+    private Integer custProperty;
+
+    @ApiModelProperty("失信限高标签list")
+    private List<String> labelList;
+
+    @ApiModelProperty(value = "负责人name")
+    private List<String> responsiblePersonName;
+
+    @ApiModelProperty("到期日期,字符串,格式yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private LocalDate endDate;
+
+    @ApiModelProperty(value = "账款总金额")
+    private String totalMoneyStr;
+
+    @ApiModelProperty(value = "逾期/即将逾期金额")
+    private String receivableStr;
+
+    @ApiModelProperty(value = "账款已收金额")
+    private String receiptStr;
+
+    @ApiModelProperty(value = "分数趋势,1上升,2下降。0持平")
+    private Integer diagnosisScoreTrend;
+
+    @ApiModelProperty(value = "本次评估等级描述")
+    private String diagnosisGradeDesc;
+
+    @ApiModelProperty(value = "本次评估分数")
+    private String diagnosisScore;
+
+    @ApiModelProperty(value = "账单状态,1进行中,2已逾期,3已收回,4已终止")
+    private Integer repalBillStatus;
+
+    @ApiModelProperty(value = "账款阶段,1未起诉,2已起诉,3已申请执行,4终结本次执行")
+    private Integer repalBillStage;
+
+    @ApiModelProperty(value = "账款备注")
+    private String billRemark;
+
+    @ApiModelProperty(value = "风险数量)")
+    private Integer riskNum;
+
+    @ApiModelProperty("财产线索)")
+    private Integer assetsNum;
+
+    @ApiModelProperty(value = "逾期天数/离收款日")
+    private Integer overdueDay;
+
+
+
+}

+ 32 - 0
src/main/java/com/winhc/repal/model/vo/RepalManageBillInfoVO.java

@@ -0,0 +1,32 @@
+package com.winhc.repal.model.vo;
+
+import com.winhc.common.model.base.VOPage;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * @Description: RepalBillInfoVO
+ * @Author: xda
+ * @Date: 2022/4/18 12:51
+ */
+@Data
+@ApiModel("账款信息")
+public class RepalManageBillInfoVO {
+
+    @ApiModelProperty("总逾期金额str")
+    private String totalOverdueStr;
+
+    @ApiModelProperty("总逾期笔数")
+    private Integer totalOverdueCount;
+
+    @ApiModelProperty("即将逾期金额str")
+    private String totalOverdueWeekStr;
+
+    @ApiModelProperty("即将逾期笔数")
+    private Integer totalOverdueWeekCount;
+
+    @ApiModelProperty("逾期比例str")
+    private String overdueScaleStr;
+
+}

+ 59 - 0
src/main/java/com/winhc/repal/model/vo/RepalManageBillPageVO.java

@@ -0,0 +1,59 @@
+package com.winhc.repal.model.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.time.LocalDate;
+import java.util.List;
+
+/**
+ * @Description: RepalBillPageVO
+ * @Author: xda
+ * @Date: 2022/4/8 11:13
+ */
+@Data
+@ApiModel("账款分页对象")
+public class RepalManageBillPageVO {
+
+
+
+    @ApiModelProperty(value = "账款id")
+    private Long repalBillId;
+
+    @ApiModelProperty(value = "账本id")
+    private Long repalBookId;
+
+    @ApiModelProperty(value = "账本名称")
+    private String repalBookName;
+
+    @ApiModelProperty(value = "账款逾期状态,1进行中,2已逾期")
+    private Integer repalBillStatus;
+
+    @ApiModelProperty(value = "账款逾期/即将逾期天数")
+    private Long overdueDay;
+
+
+    @ApiModelProperty("到期日期,字符串,格式yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private LocalDate endDate;
+
+    @ApiModelProperty(value = "客户性质 1企业 2个人 3政府事业单位")
+    private Integer custProperty;
+
+    @ApiModelProperty(value = "客户名称")
+    private String customerName;
+
+    @ApiModelProperty(value = "账款总金额")
+    private String totalMoneyStr;
+
+    @ApiModelProperty(value = "逾期/即将逾期金额")
+    private String receivableStr;
+
+    @ApiModelProperty(value = "负责人name")
+    private List<String> responsiblePersonName;
+
+    @ApiModelProperty(value = "催款动态数量")
+    private Integer repalDynamicCount;
+}

+ 32 - 0
src/main/java/com/winhc/repal/repository/RepalBillMapper.java

@@ -3,11 +3,16 @@ package com.winhc.repal.repository;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.winhc.repal.entity.RepalBill;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.winhc.repal.model.bo.ManageBillInfoBO;
+import com.winhc.repal.model.bo.RepalManageBillPageBO;
 import com.winhc.repal.model.bo.TotalMoneyBO;
 import com.winhc.repal.model.dto.GetRepalBillPageDTO;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Repository;
 
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+
 /**
  * @description RepalBill Mapper 接口
  * @author Generator
@@ -69,4 +74,31 @@ public interface RepalBillMapper extends BaseMapper<RepalBill> {
      * @date 2022/4/13 17:44
      */
     Page<RepalBill> getCustRepalBillPage(Page<RepalBill> page, @Param("custId") Long custId);
+
+    /**
+     * 查询催款汇总数据
+     * @param allFlag
+     * @param userId
+     * @param groupId
+     * @return
+     */
+    ManageBillInfoBO getManageBillInfo(@Param("allFlag") boolean allFlag,
+                                       @Param("userId") Long userId,
+                                       @Param("groupId") Long groupId,
+                                       @Param("startTime") LocalDate startTime);
+
+    /**
+     * 分页查询催款列表
+     * @param page
+     * @param allFlag
+     * @param userId
+     * @param groupId
+     * @param startTime
+     * @return
+     */
+    Page<RepalManageBillPageBO> getManageBillPage(Page<RepalManageBillPageBO>page,
+                                                  @Param("allFlag") boolean allFlag,
+                                                  @Param("userId") Long userId,
+                                                  @Param("groupId") Long groupId,
+                                                  @Param("startTime") LocalDate startTime);
 }

+ 15 - 3
src/main/java/com/winhc/repal/service/RepalBillService.java

@@ -4,9 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
 import com.winhc.common.model.base.VOPage;
 import com.winhc.repal.entity.RepalBill;
 import com.winhc.repal.model.dto.*;
-import com.winhc.repal.model.vo.RepalBillDetailVO;
-import com.winhc.repal.model.vo.RepalBillInfoVO;
-import com.winhc.repal.model.vo.RepalBillPageVO;
+import com.winhc.repal.model.vo.*;
 
 
 /**
@@ -105,4 +103,18 @@ public interface RepalBillService extends IService<RepalBill> {
      * @return
      */
     VOPage<RepalBillPageVO> getCustRepalBillPage(Integer pageNum, Integer pageSize, Long custId);
+
+    /**
+     * 催款管理数据汇总
+     * @return
+     */
+    RepalManageBillInfoVO queryManageInfo();
+
+    /**
+     * 分页查询催款管理列表
+     * @param pageNum
+     * @param pageSize
+     * @return
+     */
+    VOPage<RepalManageBillPageVO>  queryManageBillPage(Integer pageNum, Integer pageSize);
 }

+ 84 - 6
src/main/java/com/winhc/repal/service/impl/RepalBillServiceImpl.java

@@ -22,14 +22,11 @@ import com.winhc.repal.cloud.vo.DiagnosisRecordVO;
 import com.winhc.repal.cloud.vo.FinanceDynamicNumVO;
 import com.winhc.repal.entity.*;
 import com.winhc.repal.enums.*;
-import com.winhc.repal.model.bo.BillPageBO;
-import com.winhc.repal.model.bo.TotalMoneyBO;
-import com.winhc.repal.model.bo.UserBillUnreadInfoBO;
+import com.winhc.repal.model.bo.*;
 import com.winhc.repal.model.dto.*;
-import com.winhc.repal.model.vo.RepalBillDetailVO;
-import com.winhc.repal.model.vo.RepalBillInfoVO;
-import com.winhc.repal.model.vo.RepalBillPageVO;
+import com.winhc.repal.model.vo.*;
 import com.winhc.repal.repository.RepalBillMapper;
+import com.winhc.repal.repository.RepalResponsiblePersonMapper;
 import com.winhc.repal.service.*;
 import com.winhc.repal.util.DiagnosisUtil;
 import com.winhc.repal.util.RepalBillStatusUtil;
@@ -42,6 +39,7 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.math.BigDecimal;
+import java.math.RoundingMode;
 import java.time.DayOfWeek;
 import java.time.LocalDate;
 import java.time.LocalDateTime;
@@ -103,6 +101,12 @@ public class RepalBillServiceImpl extends ServiceImpl<RepalBillMapper, RepalBill
     @Autowired
     private UserExtService userExtService;
 
+    @Autowired
+    private RepalResponsiblePersonMapper repalResponsiblePersonMapper;
+
+    @Autowired
+    private RepalDynamicService repalDynamicService;
+
 
     @Override
     public RepalBillInfoVO getRepalBillPage(GetRepalBillPageDTO dto) {
@@ -529,4 +533,78 @@ public class RepalBillServiceImpl extends ServiceImpl<RepalBillMapper, RepalBill
         }).collect(Collectors.toList()));
         return voPage;
     }
+
+    @Override
+    public RepalManageBillInfoVO queryManageInfo() {
+        //权限
+        UserContextBO userContextBO = UserContextUtil.getUser();
+        boolean allFlag = repalRolePermissionService.checkUserPermission(userContextBO.getUserId(),PermissionEnum.QUERY_ALL_URGE.getCode());
+        //查询组织编号
+        RepalGroupMember repalGroupMember = repalGroupMemberService.getOne(Wrappers.lambdaQuery(RepalGroupMember.class).eq(RepalGroupMember::getUserId,userContextBO.getUserId()).eq(RepalGroupMember::getDeleted,Dict.DeletedStatusEnunm.否.getCode()),false);
+        if(ObjectUtil.isNull(repalGroupMember)){
+            throw new CommonException(CodeMsg.FAILED,"您还未加入该组织,请联系超级管理员");
+        }
+        LocalDate startTime = LocalDate.now().plusDays(7);
+        ManageBillInfoBO manageBillInfo = repalBillMapper.getManageBillInfo(allFlag,userContextBO.getUserId(),repalGroupMember.getRepalGroupId(),startTime);
+        RepalManageBillInfoVO repalManageBillInfoVO = new RepalManageBillInfoVO();
+        if(ObjectUtil.isNull(manageBillInfo.getTotalMoney()) || BigDecimal.ZERO.equals(manageBillInfo.getTotalMoney())){
+            repalManageBillInfoVO.setOverdueScaleStr("0");
+            repalManageBillInfoVO.setTotalOverdueCount(0);
+            repalManageBillInfoVO.setTotalOverdueStr("0");
+            repalManageBillInfoVO.setTotalOverdueWeekCount(0);
+            repalManageBillInfoVO.setTotalOverdueWeekStr("0");
+        }else {
+            repalManageBillInfoVO.setTotalOverdueCount(manageBillInfo.getTotalOverdueCount());
+            repalManageBillInfoVO.setTotalOverdueStr(manageBillInfo.getTotalOverdue().toPlainString());
+            repalManageBillInfoVO.setTotalOverdueWeekCount(manageBillInfo.getTotalOverdueWeekCount());
+            repalManageBillInfoVO.setTotalOverdueWeekStr(manageBillInfo.getTotalOverdueWeek().toPlainString());
+            repalManageBillInfoVO.setOverdueScaleStr(manageBillInfo.getTotalOverdue().divide(manageBillInfo.getTotalMoney(),2, RoundingMode.HALF_UP).toPlainString());
+        }
+        return repalManageBillInfoVO;
+    }
+
+    @Override
+    public VOPage<RepalManageBillPageVO> queryManageBillPage(Integer pageNum, Integer pageSize) {
+        //权限
+        UserContextBO userContextBO = UserContextUtil.getUser();
+        boolean allFlag = repalRolePermissionService.checkUserPermission(userContextBO.getUserId(),PermissionEnum.QUERY_ALL_URGE.getCode());
+        //查询组织编号
+        RepalGroupMember repalGroupMember = repalGroupMemberService.getOne(Wrappers.lambdaQuery(RepalGroupMember.class).eq(RepalGroupMember::getUserId,userContextBO.getUserId()).eq(RepalGroupMember::getDeleted,Dict.DeletedStatusEnunm.否.getCode()),false);
+        if(ObjectUtil.isNull(repalGroupMember)){
+            throw new CommonException(CodeMsg.FAILED,"您还未加入该组织,请联系超级管理员");
+        }
+        LocalDate startTime = LocalDate.now().plusDays(7);
+        VOPage<RepalManageBillPageVO> voPage = new VOPage<>();
+        voPage.setPageSize(pageSize);
+        voPage.setPageNum(pageNum);
+        // 分页数据
+        Page<RepalManageBillPageBO> repalBillPage = new Page<>(pageNum,pageSize);
+        repalBillPage = repalBillMapper.getManageBillPage(repalBillPage,allFlag,userContextBO.getUserId(),repalGroupMember.getRepalGroupId(),startTime);
+        voPage.setTotalPage(Math.toIntExact(repalBillPage.getPages()));
+        voPage.setTotalNum(repalBillPage.getTotal());
+        voPage.setDataList(new ArrayList<>());
+        if (CollUtil.isEmpty(repalBillPage.getRecords())) {
+            return voPage;
+        }
+        List<RepalManageBillPageVO> vos = new ArrayList<>();
+        voPage.setDataList(vos);
+        Map<Long,List<ResponsiblePersonNameVO>> personMap= repalResponsiblePersonMapper.getResponsiblePersonNameList(repalBillPage.getRecords().stream().map(RepalManageBillPageBO::getRepalBillId).collect(Collectors.toList())).stream().collect(Collectors.groupingBy(ResponsiblePersonNameVO::getRepalBillId));
+        for(RepalManageBillPageBO manageBillPageBO:repalBillPage.getRecords()){
+            RepalManageBillPageVO vo = new RepalManageBillPageVO();
+            vos.add(vo);
+            BeanUtils.copyProperties(manageBillPageBO,vo);
+            vo.setOverdueDay(Math.abs(manageBillPageBO.getEndDate().toEpochDay() - LocalDate.now().toEpochDay()));
+            vo.setTotalMoneyStr(manageBillPageBO.getTotalMoney().stripTrailingZeros().toPlainString());
+            vo.setReceivableStr(manageBillPageBO.getReceivable().stripTrailingZeros().toPlainString());
+            //负责人
+            if(personMap.containsKey(manageBillPageBO.getRepalBillId())){
+                List<ResponsiblePersonNameVO> personNames = personMap.get(manageBillPageBO.getRepalBillId());
+                vo.setResponsiblePersonName(personNames.stream().map(ResponsiblePersonNameVO::getUserName).collect(Collectors.toList()));
+            }
+            //催款动态条数
+            int dynamicCount = repalDynamicService.count(Wrappers.lambdaQuery(RepalDynamic.class).eq(RepalDynamic::getRepalBillId,manageBillPageBO.getRepalBillId()));
+            vo.setRepalDynamicCount(dynamicCount);
+        }
+        return voPage;
+    }
 }

+ 1 - 1
src/main/java/com/winhc/repal/service/impl/RepalCustomerServiceImpl.java

@@ -166,7 +166,7 @@ public class RepalCustomerServiceImpl extends ServiceImpl<RepalCustomerMapper, R
         }
          RepalCustomer repalCustomer = new RepalCustomer();
          BeanUtils.copyProperties(dto,repalCustomer);
-         repalCustomer.setRepalGroupId(repalCustomer.getRepalGroupId());
+         repalCustomer.setRepalGroupId(repalGroupMember.getRepalGroupId());
          //校验非空字段
          if(StrUtil.isBlank(dto.getCustName())){
              throw new CommonException(CodeMsg.FAILED,"客户名不能为空");

+ 53 - 0
src/main/resources/mapper/RepalBillMapper.xml

@@ -120,4 +120,57 @@
         </where>
             ORDER BY bill.ID DESC
     </select>
+    <select id="getManageBillInfo" resultType="com.winhc.repal.model.bo.ManageBillInfoBO">
+        select (SELECT count(*) FROM REPAL_BILL A WHERE
+                    REPAL_GROUP_ID = #{groupId}
+                  AND DELETED = 0
+                  AND REPAL_BILL_STATUS = 2
+                  <if test="!allFlag">
+                      AND EXISTS ( SELECT 1 FROM REPAL_RESPONSIBLE_PERSON B WHERE B.REPAL_BILL_ID = A.ID AND B.USER_ID = #{userId})
+                  </if>
+            ) as totalOverdueCount,
+
+           (SELECT IFNULL(sum(RECEIVABLE),0) FROM REPAL_BILL A
+            WHERE REPAL_GROUP_ID = #{groupId}
+              AND DELETED = 0
+              AND REPAL_BILL_STATUS = 2
+                <if test="!allFlag">
+                    AND EXISTS ( SELECT 1 FROM REPAL_RESPONSIBLE_PERSON B WHERE B.REPAL_BILL_ID = A.ID AND B.USER_ID = #{userId})
+                </if>
+               ) as totalOverdue,
+
+           (SELECT IFNULL( sum( RECEIVABLE ), 0 ) FROM REPAL_BILL A
+            WHERE REPAL_GROUP_ID = #{groupId}
+              AND DELETED = 0
+              AND REPAL_BILL_STATUS = 1
+              AND END_DATE <![CDATA[<=]]> #{startTime}
+                <if test="!allFlag">
+                    AND EXISTS ( SELECT 1 FROM REPAL_RESPONSIBLE_PERSON B WHERE B.REPAL_BILL_ID = A.ID AND B.USER_ID = #{userId})
+                </if>
+               ) as totalOverdueWeek,
+
+           (SELECT count(*) FROM REPAL_BILL A
+            WHERE
+                REPAL_GROUP_ID = #{groupId}
+              AND DELETED = 0
+              AND REPAL_BILL_STATUS = 1
+              AND END_DATE <![CDATA[<=]]> #{startTime}
+                <if test="!allFlag">
+                    AND EXISTS ( SELECT 1 FROM REPAL_RESPONSIBLE_PERSON B WHERE B.REPAL_BILL_ID = A.ID AND B.USER_ID = #{userId})
+                </if>
+               ) as totalOverdueWeekCount,
+
+             (SELECT IFNULL( sum( RECEIVABLE ), 0 ) FROM REPAL_BILL A
+              WHERE
+                  REPAL_GROUP_ID = #{groupId}
+                AND DELETED = 0
+                AND REPAL_BILL_STATUS in (1,2)
+                <if test="!allFlag">
+                    AND EXISTS ( SELECT 1 FROM REPAL_RESPONSIBLE_PERSON B WHERE B.REPAL_BILL_ID = A.ID AND B.USER_ID = #{userId})
+                </if>
+                 )  as totalMoney from dual
+    </select>
+    <select id="getManageBillPage" resultType="com.winhc.repal.model.bo.RepalManageBillPageBO">
+
+    </select>
 </mapper>