Ver código fonte

修改查询业主信息时bug

wuxw 7 anos atrás
pai
commit
502f177174

+ 3 - 2
Api/src/main/java/com/java110/api/listener/fee/QueryFeeListener.java

@@ -144,14 +144,15 @@ public class QueryFeeListener extends AbstractServiceApiDataFlowListener {
         ownerRoomRelDto.setRoomId(roomDto.getRoomId());
         List<OwnerRoomRelDto> ownerRoomRelDtos = ownerRoomRelInnerServiceSMOImpl.queryOwnerRoomRels(ownerRoomRelDto);
         if (ownerRoomRelDtos == null || ownerRoomRelDtos.size() != 1) {
-            throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_ERROR, "数据错误,未找到房屋和业主关系信息 roomId" + roomDto.getRoomId());
+            throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_ERROR, "数据错误,未找到房屋和业主关系信息 roomId=" + roomDto.getRoomId());
         }
         OwnerDto ownerDto = new OwnerDto();
         ownerDto.setOwnerId(ownerRoomRelDtos.get(0).getOwnerId());
+        ownerDto.setCommunityId(feeDto.getCommunityId());
         List<OwnerDto> ownerDtos = ownerInnerServiceSMOImpl.queryOwners(ownerDto);
 
         if (ownerDtos == null || ownerDtos.size() != 1) {
-            throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_ERROR, "数据错误,未找到业主信息 ownerId" + ownerRoomRelDtos.get(0).getOwnerId());
+            throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_ERROR, "数据错误,未找到业主信息 ownerId=" + ownerRoomRelDtos.get(0).getOwnerId());
         }
         ownerDto = ownerDtos.get(0);
         apiFeeVo.setOwnerId(ownerDto.getOwnerId());

+ 4 - 0
UserService/src/main/java/com/java110/user/smo/impl/OwnerInnerServiceSMOImpl.java

@@ -14,6 +14,7 @@ import com.java110.dto.PageDto;
 import com.java110.dto.UserDto;
 import com.java110.user.dao.IOwnerServiceDao;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.util.StringUtils;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RestController;
 
@@ -50,6 +51,9 @@ public class OwnerInnerServiceSMOImpl extends BaseServiceSMO implements IOwnerIn
         //调用 小区服务查询 小区成员业主信息
         CommunityMemberDto communityMemberDto = BeanConvertUtil.covertBean(ownerDto, CommunityMemberDto.class);
         communityMemberDto.setMemberTypeCd(CommunityMemberTypeConstant.OWNER);
+        if(StringUtils.isEmpty(communityMemberDto.getMemberId())&& !StringUtils.isEmpty(ownerDto.getOwnerId())){
+            communityMemberDto.setMemberId(ownerDto.getOwnerId());
+        }
         List<CommunityMemberDto> communityMemberDtos = communityInnerServiceSMOImpl.getCommunityMembers(communityMemberDto);
 
         if (communityMemberDtos == null || communityMemberDtos.size() < 1) {

+ 35 - 0
WebService/src/main/java/com/java110/web/components/fee/PropertyPayComponent.java

@@ -0,0 +1,35 @@
+package com.java110.web.components.fee;
+
+import com.java110.core.context.IPageData;
+import com.java110.web.smo.IFeeServiceSMO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Component;
+
+/**
+ * @ClassName ViewPropertyFeeConfigComponent
+ * @Description 展示物业费信息
+ * @Author wuxw
+ * @Date 2019/6/1 14:33
+ * @Version 1.0
+ * add by wuxw 2019/6/1
+ **/
+@Component("propertyPay")
+public class PropertyPayComponent {
+
+    @Autowired
+    private IFeeServiceSMO feeServiceSMOImpl;
+
+    public ResponseEntity<String> loadPropertyConfigData(IPageData pd) {
+        return feeServiceSMOImpl.loadPropertyConfigFee(pd);
+    }
+
+
+    public IFeeServiceSMO getFeeServiceSMOImpl() {
+        return feeServiceSMOImpl;
+    }
+
+    public void setFeeServiceSMOImpl(IFeeServiceSMO feeServiceSMOImpl) {
+        this.feeServiceSMOImpl = feeServiceSMOImpl;
+    }
+}

+ 48 - 3
WebService/src/main/resources/components/property-pay/propertyPay.js

@@ -7,15 +7,28 @@
                 receivableAmount:'0.00',
                 receivedAmount:'0.00',
                 remark:'',
-                feeId:''
+                feeId:'',
+                builtUpArea:'',
+                squarePrice:'',
+                additionalAmount:''
             }
         },
+        watch:{
+            "propertyPayInfo.cycles":{//深度监听,可监听到对象、数组的变化
+                handler(val, oldVal){
+                    vc.component.propertyPayInfo.receivableAmount = builtUpArea* squarePrice + additionalAmount;
+                    vc.component.propertyPayInfo.receivedAmount = builtUpArea* squarePrice + additionalAmount;
+                },
+                deep:true
+            }
+         },
          _initMethod:function(){
 
          },
          _initEvent:function(){
              vc.on('propertyPay','openPayModel',function(_params){
                 vc.component.refreshPropertyPayInfo();
+
                 $('#propertyPayModel').modal('show');
                 vc.component.propertyPayInfo.feeId = _params.feeId;
                 vc.component.addRoomInfo.communityId = vc.getCurrentCommunity().communityId;
@@ -111,9 +124,41 @@
                                              receivableAmount:'0.00',
                                              receivedAmount:'0.00',
                                              remark:'',
-                                             feeId:''
+                                             builtUpArea:'',
+                                             feeId:'',
+                                             squarePrice:'',
+                                             additionalAmount:''
                                          };
-            }
+                vc.component.loadPropertyConfigFee();
+
+            },
+            //加载配置数据
+            loadPropertyConfigFee:function(){
+                var param = {
+                    params:{
+                        communityId:vc.getCurrentCommunity().communityId,
+                        configId:''
+                    }
+                };
+                vc.http.get(
+                    'propertyPay',
+                    'loadPropertyConfigData',
+                     param,
+                     function(json,res){
+                        //vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
+                        if(res.status == 200){
+                            //关闭model
+                            vc.copyObject(JSON.parse(json), vc.component.propertyPayInfo);
+                            return ;
+                        }
+                        vc.message(json);
+                     },
+                     function(errInfo,error){
+                        console.log('请求失败处理');
+
+                        vc.message(errInfo);
+                     });
+                }
         }
     });
 

+ 8 - 2
WebService/src/main/resources/components/view-main-fee/viewMainFee.html

@@ -61,13 +61,19 @@
                     </div>
                     <div class="col-sm-3">
                         <div class="form-group">
-                            <label class="col-form-label" >费用开始时间:</label>
-                            <label class="">{{mainFeeInfo.startTime}}</label>
+                            <label class="col-form-label" >建筑面积:</label>
+                            <label class="">{{mainFeeInfo.builtUpArea}} 平方米</label>
                         </div>
                     </div>
 
                 </div>
                 <div class="row">
+                    <div class="col-sm-3">
+                        <div class="form-group">
+                            <label class="col-form-label" >费用开始时间:</label>
+                            <label class="">{{mainFeeInfo.startTime}}</label>
+                        </div>
+                    </div>
                     <div class="col-sm-3">
                         <div class="form-group">
                             <label class="col-form-label" >费用到期时间:</label>

+ 1 - 0
WebService/src/main/resources/components/view-main-fee/viewMainFee.js

@@ -16,6 +16,7 @@
                 floorNum:"",
                 roomId:"",
                 roomNum:"",
+                builtUpArea:"",
                 ownerId:"",
                 ownerName:"",
                 link:"",

+ 9 - 0
java110-bean/src/main/java/com/java110/vo/api/ApiFeeVo.java

@@ -24,6 +24,7 @@ public class ApiFeeVo {
    private String startTime;
    private String endTime;
    private String amount;
+   private String builtUpArea;
 
 
     public String getFeeId() {
@@ -129,4 +130,12 @@ public class ApiFeeVo {
     public void setFloorId(String floorId) {
         this.floorId = floorId;
     }
+
+    public String getBuiltUpArea() {
+        return builtUpArea;
+    }
+
+    public void setBuiltUpArea(String builtUpArea) {
+        this.builtUpArea = builtUpArea;
+    }
 }