Przeglądaj źródła

修改查询房屋信息代码

wuxw 7 lat temu
rodzic
commit
844d5a1790

+ 8 - 6
Api/src/main/java/com/java110/api/listener/fee/QueryFeeListener.java

@@ -100,6 +100,7 @@ public class QueryFeeListener extends AbstractServiceApiDataFlowListener {
         //查询 房屋信息
         RoomDto roomDto = new RoomDto();
         roomDto.setRoomId(feeDto.getPayerObjId());
+        roomDto.setCommunityId(feeDto.getCommunityId());
         List<RoomDto> roomDtos = roomInnerServiceSMOImpl.queryRooms(roomDto);
 
         if (roomDtos == null || roomDtos.size() != 1) {
@@ -107,11 +108,12 @@ public class QueryFeeListener extends AbstractServiceApiDataFlowListener {
         }
 
         roomDto = roomDtos.get(0);
-        apiFeeVo.setRoomId(roomDto.getRoomId());
-        apiFeeVo.setRoomNum(roomDto.getRoomNum());
+        /*apiFeeVo.setRoomId(roomDto.getRoomId());
+        apiFeeVo.setRoomNum(roomDto.getRoomNum());*/
+        apiFeeVo = BeanConvertUtil.covertBean(roomDto,apiFeeVo);
 
         //查询单元信息
-        UnitDto unitDto = new UnitDto();
+        /*UnitDto unitDto = new UnitDto();
         unitDto.setUnitId(roomDto.getUnitId());
         List<UnitDto> unitDtos = unitInnerServiceSMOImpl.queryUnits(unitDto);
 
@@ -122,9 +124,9 @@ public class QueryFeeListener extends AbstractServiceApiDataFlowListener {
         unitDto = unitDtos.get(0);
 
         apiFeeVo.setUnitId(unitDto.getUnitId());
-        apiFeeVo.setUnitNum(unitDto.getUnitNum());
+        apiFeeVo.setUnitNum(unitDto.getUnitNum());*/
 
-        //查询 小区楼信息
+       /* //查询 小区楼信息
         FloorDto floorDto = new FloorDto();
         floorDto.setFloorId(unitDto.getFloorId());
         List<FloorDto> floorDtos = floorInnerServiceSMOImpl.queryFloors(floorDto);
@@ -135,7 +137,7 @@ public class QueryFeeListener extends AbstractServiceApiDataFlowListener {
 
         floorDto = floorDtos.get(0);
         apiFeeVo.setFloorNum(floorDto.getFloorNum());
-        apiFeeVo.setFloorId(floorDto.getFloorId());
+        apiFeeVo.setFloorId(floorDto.getFloorId());*/
 
         // 业主信息
         OwnerRoomRelDto ownerRoomRelDto = new OwnerRoomRelDto();

+ 1 - 0
WebService/src/main/resources/components/property-fee/propertyFee.html

@@ -2,6 +2,7 @@
     <vc:create name="viewMainFee"
                feeName="物业费"
                feeTypeCd="888800010001"
+               payName="propertyPay"
     ></vc:create>
     <div class="row">
         <div class="col-lg-12">

+ 48 - 0
WebService/src/main/resources/components/property-pay/propertyPay.html

@@ -0,0 +1,48 @@
+<div id = "propertyPayModel" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true" >
+    <div class="modal-dialog modal-lg">
+        <div class="modal-content">
+            <div class="modal-body">
+                <h3 class="m-t-none m-b ">缴费信息</h3>
+                <div class="ibox-content">
+                    <div>
+                        <div>
+                            <div class="form-group row">
+                                <label class="col-sm-2 col-form-label">缴费周期</label>
+                                <div class="col-sm-10">
+                                    <select class="custom-select" v-model="propertyPayInfo.cycles">
+                                        <option selected  disabled value="">必填,请选择缴费周期</option>
+                                        <option value="1">1个月</option>
+                                        <option value="2">2个月</option>
+                                        <option value="3">3个月</option>
+                                        <option value="4">4个月</option>
+                                        <option value="5">5个月</option>
+                                        <option value="6">6个月</option>
+                                        <option value="12">一年</option>
+                                        <option value="24">两年</option>
+                                    </select>
+                                </div>
+                            </div>
+                            <div class="form-group row">
+                                <label class="col-sm-2 col-form-label">应收金额</label>
+                                <div class="col-sm-10"><input v-model="propertyPayInfo.receivableAmount" type="number" readonly class="form-control"></div>
+                            </div>
+                            <div class="form-group row">
+                                <label class="col-sm-2 col-form-label">实收金额</label>
+                                <div class="col-sm-10"><input v-model="propertyPayInfo.receivedAmount" type="number"  class="form-control"></div>
+                            </div>
+
+                            <div class="form-group row">
+                                <label class="col-sm-2 col-form-label">备注</label>
+                                <div class="col-sm-10"><input v-model="propertyPayInfo.remark" type="text" placeholder="请填写备注信息" class="form-control"></div>
+                            </div>
+                            <div class="ibox-content">
+                                <button class="btn btn-primary float-right" type="button" v-on:click="payFee()" ><i class="fa fa-check"></i>&nbsp;提交</button>
+                                <button type="button" class="btn btn-warning float-right" style="margin-right:20px;" data-dismiss="modal">取消</button>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>

+ 120 - 0
WebService/src/main/resources/components/property-pay/propertyPay.js

@@ -0,0 +1,120 @@
+(function(vc,vm){
+
+    vc.extends({
+        data:{
+            propertyPayInfo:{
+                cycles:'',
+                receivableAmount:'0.00',
+                receivedAmount:'0.00',
+                remark:'',
+                feeId:''
+            }
+        },
+         _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;
+            });
+        },
+        methods:{
+
+            payFeeValidate:function(){
+                        return vc.validate.validate({
+                            propertyPayInfo:vc.component.propertyPayInfo
+                        },{
+                            'propertyPayInfo.feeId':[
+                                {
+                                    limit:"required",
+                                    param:"",
+                                    errInfo:"费用ID不能为空"
+                                }
+                            ],
+                            'propertyPayInfo.cycles':[
+                                {
+                                    limit:"required",
+                                    param:"",
+                                    errInfo:"缴费周期不能为空"
+                                }
+                            ],
+                            'propertyPayInfo.receivableAmount':[
+                                {
+                                    limit:"required",
+                                    param:"",
+                                    errInfo:"应收金额不能为空"
+                                },
+                                {
+                                    limit:"money",
+                                    param:"",
+                                    errInfo:"应收金额不是有效的金额"
+                                }
+                            ],
+                            'propertyPayInfo.receivedAmount':[
+                                {
+                                    limit:"required",
+                                    param:"",
+                                    errInfo:"实收金额不能为空"
+                                },
+                                {
+                                    limit:"money",
+                                    param:"",
+                                    errInfo:"实收金额不是有效的金额"
+                                }
+                            ],
+
+                            'propertyPayInfo.remark':[
+                                {
+                                    limit:"maxLength",
+                                    param:"200",
+                                    errInfo:"备注长度不能超过200位"
+                                },
+                            ]
+
+                        });
+             },
+            payFee:function(){
+                if(!vc.component.payFeeValidate()){
+                    vc.message(vc.validate.errInfo);
+                    return ;
+                }
+
+                vc.http.post(
+                    'propertyPay',
+                    'payFee',
+                    JSON.stringify(vc.component.propertyPayInfo),
+                    {
+                        emulateJSON:true
+                     },
+                     function(json,res){
+                        //vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
+                        if(res.status == 200){
+                            //关闭model
+                            $('#propertyPayModel').modal('hide');
+                            vc.emit('propertyFee','listFeeDetail',propertyPayInfo);
+                            return ;
+                        }
+                        vc.message(json);
+                     },
+                     function(errInfo,error){
+                        console.log('请求失败处理');
+
+                        vc.message(errInfo);
+                     });
+            },
+            refreshPropertyPayInfo:function(){
+                vc.component.propertyPayInfo={
+                                             cycles:'',
+                                             receivableAmount:'0.00',
+                                             receivedAmount:'0.00',
+                                             remark:'',
+                                             feeId:''
+                                         };
+            }
+        }
+    });
+
+})(window.vc,window.vc.component);

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

@@ -7,8 +7,8 @@
                     <button type="button" class="btn btn-primary btn-sm" v-on:click="openSearchRoomModel()">
                         <i class="glyphicon glyphicon-search"></i> 选择房屋</button>
                     <button type="button" class="btn btn-primary btn-sm"
-                            v-if="mainFeeInfo.floorId != null && mainFeeInfo.floorId != ''"
-                            style="margin-left:10px" v-on:click="openAddRoomModel()">
+                            v-if="mainFeeInfo.feeId != null && mainFeeInfo.feeId != ''"
+                            style="margin-left:10px" v-on:click="openPayModel()">
                         <i class="glyphicon glyphicon-plus" ></i> 缴费</button>
                 </div>
             </div>
@@ -90,5 +90,5 @@
                emitLoadData="propertyFee"
                roomFlag="1"
     ></vc:create>
-    <!--<vc:create name="addRoom"></vc:create>-->
+    <vc:create name="propertyPay"></vc:create>
 </div>

+ 5 - 4
WebService/src/main/resources/components/view-main-fee/viewMainFee.js

@@ -6,7 +6,8 @@
     vc.extends({
         propTypes: {
             feeName:vc.propTypes.string,
-            feeTypeCd:vc.propTypes.string
+            feeTypeCd:vc.propTypes.string,
+            payName:vc.propTypes.string
         },
         data:{
             mainFeeInfo:{
@@ -37,9 +38,9 @@
             openSearchRoomModel:function(){
                 vc.emit('searchRoom','openSearchRoomModel',{});
             },
-            openAddRoomModel:function(){
-                vc.emit($props.openAddRoomModelName,'addRoomModel',{
-                    floorId:vc.component.floorInfo.floorId
+            openPayModel:function(){
+                vc.emit($props.payName,'openPayModel',{
+                    feeId:vc.component.mainFeeInfo.feeId
                 });
             },
             loadMainFeeInfo:function(_room){

+ 10 - 1
java110-bean/src/main/java/com/java110/dto/RoomDto.java

@@ -26,11 +26,12 @@ public class RoomDto extends PageDto implements Serializable {
     private String apartment;
     private String communityId;
     private String floorId;
+    private String floorNum;
     private String userName;
     private String ownerId;
 
-    private String state;
 
+    private String state;
     private String unitNum;
 
     private List<RoomAttrDto> roomAttrDto;
@@ -194,4 +195,12 @@ public class RoomDto extends PageDto implements Serializable {
     public void setOwnerId(String ownerId) {
         this.ownerId = ownerId;
     }
+
+    public String getFloorNum() {
+        return floorNum;
+    }
+
+    public void setFloorNum(String floorNum) {
+        this.floorNum = floorNum;
+    }
 }

+ 2 - 1
java110-db/src/main/resources/mapper/room/RoomServiceDaoImplMapper.xml

@@ -611,7 +611,8 @@ where 1 =1
     <select id="getRoomInfoByCommunityId" parameterType="Map" resultType="Map">
         SELECT  t.unit_price,t.unit_price unitPrice,t.section,t.status_cd,t.status_cd statusCd,t.remark,t.user_id,
         t.user_id userId,t.room_id,t.room_id roomId,t.layer,t.built_up_area,t.built_up_area builtUpArea,t.room_num,
-        t.room_num roomNum,t.unit_id,t.unit_id unitId,t.b_id,t.b_id bId,t.apartment,t.state,u.`unit_num` unitNum
+        t.room_num roomNum,t.unit_id,t.unit_id unitId,t.b_id,t.b_id bId,t.apartment,t.state,u.`unit_num` unitNum,
+        u.unit_id unitId,f.floor_id floorId,f.floor_num floorNum
         FROM building_room t,s_community c,s_community_member cm,building_unit u,f_floor f
         WHERE 1 =1
         AND t.`unit_id` = u.`unit_id`