jiangping
2024-11-25 027ee354f145886cb4280cc980af41e9304c7888
开发更新
已修改4个文件
142 ■■■■ 文件已修改
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/YwContract.java 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/YwContractBill.java 39 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractServiceImpl.java 70 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwWorkorderServiceImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/YwContract.java
@@ -104,7 +104,37 @@
    @ApiModelProperty(value = "联系人编码(关联memebr)", example = "1")
    @ExcelColumn(name="联系人编码(关联memebr)")
    private Integer memberId;
    @ApiModelProperty(value = "退租类型 0到期退租 1换房退租 2违约退租 3协商退租", example = "1")
    @ExcelColumn(name="退租类型 0到期退租 1换房退租 2违约退租 3协商退租")
    private Integer btType;
    @ApiModelProperty(value = "退租操作时间")
    @ExcelColumn(name="退租操作时间")
    private Date btActDate;
    @ApiModelProperty(value = "退租操作人(关联system_user)", example = "1")
    @ExcelColumn(name="退租操作人(关联system_user)")
    private Integer btActUserId;
    @ApiModelProperty(value = "退租原因")
    @ExcelColumn(name="退租原因")
    private String btInfo;
    @ApiModelProperty(value = "退租日期")
    @ExcelColumn(name="退租日期")
    private Date btDate;
    @ApiModelProperty(value = "退租经办人编码", example = "1")
    @ExcelColumn(name="退租经办人编码")
    private Integer btUserId;
    @ApiModelProperty(value = "退租签到日期")
    @ExcelColumn(name="退租签到日期")
    private Date btSignDate;
    @ApiModelProperty(value = "退租结算金额合计", example = "1")
    @ExcelColumn(name="退租结算金额合计")
    private BigDecimal btFee;
    @ApiModelProperty(value = "租赁条款押金(元)", example = "1")
    @ExcelColumn(name="租赁条款押金(元)")
    private BigDecimal zlDeposit;
@@ -193,7 +223,7 @@
    @TableField(exist = false)
    private Date queryEndTime;
    @ApiModelProperty(value = "退款时新增的收付款账单")
    @ApiModelProperty(value = "退租时新增的收付款账单")
    @TableField(exist = false)
    private List<YwContractBill> addBillList;
}
server/visits/dmvisit_service/src/main/java/com/doumee/dao/business/model/YwContractBill.java
@@ -51,8 +51,8 @@
    private String title;
    @ApiModelProperty(value = "账单编号")
    private String code;
    @ApiModelProperty(value = "类型 0租赁条款 1物业条款 2租赁押金 3物业押金 4自建账单", example = "1")
    @ExcelColumn(name="账单来源",index = 12,width = 6,valueMapping = "0=合同账单;1=合同账单;2=合同账单;3=合同账单;4=自建账单;")
    @ApiModelProperty(value = "类型 0合同账单 1自建账单", example = "1")
    @ExcelColumn(name="账单来源",index = 12,width = 6,valueMapping = "0=合同账单;1=自建账单;")
    private Integer type;
    @ApiModelProperty(value = "状态 0开始;1关闭;", example = "1")
@@ -90,8 +90,8 @@
    @ExcelColumn(name="应收金额",index = 5,width = 6)
    private BigDecimal receivableFee;
    @ApiModelProperty(value = "费用类型:0=租赁费;1=物业费;2=押金;3=保证金;4=水电费;5=杂项费;6=其他", example = "1")
    @ExcelColumn(name="费用类型",index = 8,width = 6,valueMapping = "0=租赁费;1=物业费;2=押金;3=保证金;4=水电费;5=杂项费;6=其他;")
    @ApiModelProperty(value = "费用类型:0=租赁费;1=物业费;2=租赁押金;3=物业证金;4=水电费;5=杂项费;6=其他 ", example = "1")
    @ExcelColumn(name="费用类型",index = 8,width = 6,valueMapping = "0=租赁费;1=物业费;2=租赁押金;3=物业证金;4=水电费;5=杂项费;6=其他;")
    private Integer costType;
    @ApiModelProperty(value = "账单类型:0=收款;1=付款", example = "1")
@@ -103,7 +103,37 @@
    @ApiModelProperty(value = "付款状态:0=待收款;1=已结清;2=部分结清;3=待付款;4=待退款;5=已关闭")
    @ExcelColumn(name="结清状态",index = 3,width = 6,valueMapping = "0=待收款;1=已结清;2=部分结清;3=待付款;4=待退款;5=已关闭;")
    private Integer payStatus;
    @ApiModelProperty(value = "退租类型 0到期退租 1换房退租 2违约退租 3协商退租", example = "1")
    @ExcelColumn(name="退租类型 0到期退租 1换房退租 2违约退租 3协商退租")
    private Integer btType;
    @ApiModelProperty(value = "退租操作时间")
    @ExcelColumn(name="退租操作时间")
    private Date btActDate;
    @ApiModelProperty(value = "退租操作人(关联system_user)", example = "1")
    @ExcelColumn(name="退租操作人(关联system_user)")
    private Integer btActUserId;
    @ApiModelProperty(value = "退租原因")
    @ExcelColumn(name="退租原因")
    private String btInfo;
    @ApiModelProperty(value = "退租日期")
    @ExcelColumn(name="退租日期")
    private Date btDate;
    @ApiModelProperty(value = "退租经办人编码", example = "1")
    @ExcelColumn(name="退租经办人编码")
    private Integer btUserId;
    @ApiModelProperty(value = "退租签到日期")
    @ExcelColumn(name="退租签到日期")
    private Date btSignDate;
    @ApiModelProperty(value = "退租结算金额合计", example = "1")
    @ExcelColumn(name="退租结算金额合计")
    private BigDecimal btFee;
    @ApiModelProperty(value = "客户名称(付款方)", example = "1")
    @ExcelColumn(name="客户名称",index = 0,width = 10)
    @TableField(exist = false)
@@ -165,4 +195,5 @@
    @ApiModelProperty(value = "收支流水", example = "1")
    @TableField(exist = false)
    private List<YwContractRevenue> ywContractRevenueList;
}
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwContractServiceImpl.java
@@ -87,26 +87,59 @@
    }
    /**
     * 退租提交
     * @param model
     * @param param
     * @return
     */
    @Override
    @Transactional(rollbackFor = {BusinessException.class,Exception.class})
    public  Integer backRent(YwContract model){
        isParamValidCreated(model);
    public  Integer backRent(YwContract param){
        isParamValidBackRent(param);
        //处理
        dealBackRentBillBiz(param);
        YwContract update = new YwContract();
        update.setEditDate(new Date());
        update.setEditor(param.getLoginUserInfo().getId());
        update.setBtActDate(update.getEditDate());
        update.setBtActUserId(update.getEditor());
        update.setStatus(Constants.THREE);
        update.setBtInfo(param.getBtInfo());
        update.setBtDate(param.getBtDate());
        update.setBtType(param.getBtType());
        update.setBtUserId(param.getBtUserId());
        update.setBtFee(param.getBtFee());
        ywContractMapper.updateById(update);
        dealLogBiz(param,Constants.YwLogType.CONTRACT_BACK,null,null);
        return param.getId();
    }
        model.setCreator(model.getLoginUserInfo().getId());
        model.setIsdeleted(Constants.ZERO);
        model.setCreateDate(new Date());
        model.setStatus(Constants.ZERO);
        model.setEditDate(model.getCreateDate());
        model.setEditor(model.getCreator());
        model.setStatus(Constants.ZERO);//待执行
        ywContractMapper.insert(model);
        dealDetailListBiz(model);//处理条款信息
        dealMultifileBiz(model);//处理附件信息
        dealLogBiz(model,Constants.YwLogType.CONTRACT_CREATE,null,null);//记录新建日志
        return model.getId();
    private void dealBackRentBillBiz(YwContract param) {
    }
    private void isParamValidBackRent(YwContract param) {
        if(param.getId()==null
                || param.getBtType() == null
                || param.getBtDate() == null
                || param.getBtUserId() == null
                || param.getBtSignDate() == null
                ||StringUtils.isBlank( param.getBtInfo())){
            throw new BusinessException(ResponseStatus.BAD_REQUEST);
        }
        YwContract model = ywContractMapper.selectById(param.getId());
        if(model==null || Constants.equalsInteger(model.getIsdeleted(),Constants.ONE)){
            throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"对不起,合同信息不存在,请返回列表刷新重试!");
        }
        SystemUser user = systemUserMapper.selectById(param.getUserId());
        if(user ==null ||  (user.getDeleted()!=null&& user.getDeleted() )){
            throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"对不起,经办人信息不存在!");
        }
        if(param.getAddBillList()!=null && param.getAddBillList().size()>0){
            for(YwContractBill bill: param.getAddBillList()){
                if(bill.getCostType() == null){
                }
            }
        }
    }
    private void dealDetailListBiz(YwContract model) {
@@ -211,10 +244,10 @@
        bill.setStatus(Constants.ZERO);
        bill.setStartDate(model.getStartDate());
        bill.setEndDate(model.getEndDate());
        bill.setType(type);
        bill.setType(Constants.ZERO);
        bill.setCostType(type);
        bill.setTotleFee(type==Constants.THREE?model.getZlDeposit():model.getWyDeposit());//押金费用
        bill.setSortnum(0);
        bill.setTitle(type==Constants.THREE?"租赁押金":"物业押金" );
        return bill;
    }
@@ -416,7 +449,8 @@
        bill.setContractId(model.getId());
        bill.setStatus(Constants.ZERO);
        bill.setDetailId(d.getId());
        bill.setType(d.getType());
        bill.setCostType(d.getType());
        bill.setType(Constants.ZERO);
        return bill;
    }
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/YwWorkorderServiceImpl.java
@@ -66,6 +66,7 @@
        model.setIsdeleted(Constants.ZERO);
        model.setCreateDate(new Date());
        model.setStatus(Constants.ZERO);
        model.setDealStatus(Constants.ZERO);
        model.setEditDate(model.getCreateDate());
        model.setEditor(model.getCreator());
        ywWorkorderMapper.insert(model);