wuxw
2022-07-19 05683f2b2bdbdbe21cf17ad523c21ab338bd1c54
service-acct/src/main/java/com/java110/acct/api/AccountApi.java
@@ -82,8 +82,9 @@
            @RequestParam(value = "ownerId", required = false) String ownerId,
            @RequestParam(value = "ownerName", required = false) String ownerName,
            @RequestParam(value = "feeId", required = false) String feeId,
            @RequestParam(value = "tel", required = false) String tel,
            @RequestParam(value = "link", required = false) String link,
            @RequestParam(value = "idCard", required = false) String idCard,
            @RequestParam(value = "acctType", required = false) String acctType,
            @RequestParam(value = "page") int page,
            @RequestParam(value = "row") int row) {
        AccountDto accountDto = new AccountDto();
@@ -98,18 +99,20 @@
            String payerObjType = feeDtos.get(0).getPayerObjType();
            //获取付费对象id
            String payerObjId = feeDtos.get(0).getPayerObjId();
            if (!StringUtil.isEmpty(payerObjType) && payerObjType.equals("3333")) { //房屋
            if (FeeDto.PAYER_OBJ_TYPE_ROOM.equals(payerObjType)) { //房屋
                OwnerRoomRelDto ownerRoomRelDto = new OwnerRoomRelDto();
                ownerRoomRelDto.setRoomId(payerObjId);
                List<OwnerRoomRelDto> ownerRoomRelDtos = ownerRoomRelInnerServiceSMOImpl.queryOwnerRoomRels(ownerRoomRelDto);
                Assert.listOnlyOne(ownerRoomRelDtos, "查询业主房屋关系表错误!");
                ownerId = ownerRoomRelDtos.get(0).getOwnerId();
            } else if (!StringUtil.isEmpty(payerObjType) && payerObjType.equals("6666")) {
            } else if (FeeDto.PAYER_OBJ_TYPE_CAR.equals(payerObjType)) {
                OwnerCarDto ownerCarDto = new OwnerCarDto();
                ownerCarDto.setCarId(payerObjId);
                List<OwnerCarDto> ownerCarDtos = ownerCarInnerServiceSMOImpl.queryOwnerCars(ownerCarDto);
                Assert.listOnlyOne(ownerCarDtos, "查询业主车辆关系表错误!");
//                Assert.listOnlyOne(ownerCarDtos, "查询业主车辆关系表错误!");
                ownerId = ownerCarDtos.get(0).getOwnerId();
            } else {
                ownerId = "-1";
            }
            accountDto.setObjId(ownerId);
        } else {
@@ -118,10 +121,11 @@
        accountDto.setObjType(AccountDto.OBJ_TYPE_PERSON);
        accountDto.setAcctName(ownerName);
        accountDto.setPartId(communityId);
        accountDto.setAcctType(acctType);
        OwnerDto ownerDto = new OwnerDto();
        ownerDto.setOwnerId(ownerId);
        ownerDto.setCommunityId(communityId);
        ownerDto.setLink(tel);
        ownerDto.setLink(link);
        ownerDto.setIdCard(idCard);
        return getAccountBMOImpl.queryOwnerAccount(accountDto, ownerDto);
    }
@@ -158,6 +162,8 @@
    @RequestMapping(value = "/queryAccountDetail", method = RequestMethod.GET)
    public ResponseEntity<String> queryAccountDetail(@RequestHeader(value = "store-id", required = false) String storeId,
                                                     @RequestParam(value = "acctId", required = false) String acctId,
                                                     @RequestParam(value = "detailType", required = false) String detailType,
                                                     @RequestParam(value = "orderId", required = false) String orderId,
                                                     @RequestParam(value = "page") int page,
                                                     @RequestParam(value = "row") int row) {
        AccountDetailDto accountDto = new AccountDetailDto();
@@ -165,6 +171,8 @@
        accountDto.setRow(row);
        accountDto.setObjId(storeId);
        accountDto.setAcctId(acctId);
        accountDto.setDetailType(detailType);
        accountDto.setOrderId(orderId);
        return getAccountBMOImpl.getDetail(accountDto);
    }
@@ -181,7 +189,7 @@
        Assert.hasKeyAndValue(reqJson, "communityId", "小区ID不能为空");
        Assert.hasKeyAndValue(reqJson, "ownerId", "业主不能为空");
        Assert.hasKeyAndValue(reqJson, "amount", "金额不能为空");
        Assert.hasKeyAndValue(reqJson, "acctType", "账户类型不能为空");
        AccountDetailPo accountDetailPo = new AccountDetailPo();
        accountDetailPo.setRemark(reqJson.getString("remark"));
        accountDetailPo.setObjId(reqJson.getString("ownerId"));