jiangping
2024-12-06 88502b104e7a17fb7040771c6f4c93071ec57577
开发更新
已修改3个文件
24 ■■■■ 文件已修改
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/YwContractBill.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractRevenueServiceImpl.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractServiceImpl.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/YwContractBill.java
@@ -162,6 +162,9 @@
    @ExcelColumn(name="合同编号",index = 2,width = 10)
    @TableField(exist = false)
    private String contractCode;
    @ApiModelProperty(value = "合同状态", example = "1")
    @TableField(exist = false)
    private Integer contractStatus;
    @ApiModelProperty(value = "楼宇房间", example = "1")
    @ExcelColumn(name="楼宇房间",index = 1,width = 10)
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractRevenueServiceImpl.java
@@ -85,7 +85,12 @@
        ){
             throw new BusinessException(ResponseStatus.BAD_REQUEST);
        }
        YwContractBill ywContractBill = ywContractBillMapper.selectById(ywContractRevenue.getBillId());
        YwContractBill ywContractBill = ywContractBillMapper.selectJoinOne(YwContractBill.class,
                new MPJLambdaWrapper<YwContractBill>()
                        .selectAll(YwContractBill.class)
                        .selectAs(YwContract::getStatus, YwContractBill::getContractStatus)
                        .leftJoin(YwContract.class,YwContract::getId,YwContractBill::getContractId)
                        .eq(YwContractBill::getId,ywContractRevenue.getBillId()));
        if(Objects.isNull(ywContractBill)){
            throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询到账单信息");
        }
@@ -189,7 +194,8 @@
        ywContractRevenueMapper.insert(ywContractRevenue);
        ywContractBillMapper.updateById(ywContractBill);
        //如果账单完结,则查询合同下开启中的账单是否存在退款中 如果不存在则标记合同已退款
        if(Constants.equalsInteger(ywContractBill.getPayStatus(),Constants.ONE)){
        if(Constants.equalsInteger(ywContractBill.getContractStatus(),Constants.THREE)
                && Constants.equalsInteger(ywContractBill.getPayStatus(),Constants.ONE)){
            if( ywContractBillMapper
                    .selectCount(new QueryWrapper<YwContractBill>().lambda().eq(YwContractBill::getContractId,ywContractBill.getContractId())
                            .ne(YwContractBill::getId,ywContractBill.getId())
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractServiceImpl.java
@@ -316,16 +316,19 @@
                .replace("{param3}",DateUtil.getDateLongSlash(model.getBtDate()))
                .replace("{param4}",fee.compareTo(new BigDecimal(0)) >=0?"收":"付")
                .replace("{param5}",(fee.compareTo(new BigDecimal(0)) >=0?
                        Constants.formatBigdecimal2Float(model.getBtFee()).intValue()
                        :(Constants.formatBigdecimal2Float(model.getBtFee()).intValue() * -1))+"" );
                        Constants.formatBigdecimal2Float(model.getBtFee())
                        :(Constants.formatBigdecimal2Float(model.getBtFee()).multiply(new BigDecimal(-1)))).toString());
        return  str;
    }
    private String getbackRentLogByParam(YwContract model) {
        BigDecimal fee = Constants.formatBigdecimal(model.getBtFee());
        String str = "【退租日{param1},退租原因:{param2},退租协议中统计的费用总计{param3}元。】";
        String str = "【退租日{param1},退租原因:{param2},退租协议中统计的费用总计需{param4}{param5}元。】";
        str = str.replace("{param1}",DateUtil.getDateLongSlash(model.getBtDate()))
                .replace("{param2}",StringUtils.defaultString(model.getBtInfo(),""))
                .replace("{param3}",Constants.formatBigdecimal2Float(model.getBtFee()).doubleValue()+"");
                .replace("{param4}",fee.compareTo(new BigDecimal(0)) >=0?"收":"付")
                .replace("{param5}",(fee.compareTo(new BigDecimal(0)) >=0?
                        Constants.formatBigdecimal2Float(model.getBtFee())
                        :(Constants.formatBigdecimal2Float(model.getBtFee()).multiply(new BigDecimal(-1)))).toString());
        return  str;
    }