Parcourir la source

运营开发完成资产相关功能,开始开发工单相关内容

wuxw il y a 1 an
Parent
commit
ef905363be
15 fichiers modifiés avec 486 ajouts et 5 suppressions
  1. 9 0
      java110-bean/src/main/java/com/java110/dto/repair/RepairDto.java
  2. 9 0
      java110-bean/src/main/java/com/java110/dto/repair/RepairSettingDto.java
  3. 2 2
      java110-db/src/main/resources/mapper/oa/WorkPoolV1ServiceDaoImplMapper.xml
  4. 16 0
      java110-db/src/main/resources/mapper/report/ReportCommunityServiceDaoImplMapper.xml
  5. 4 0
      java110-interface/src/main/java/com/java110/intf/report/IReportCommunityInnerServiceSMO.java
  6. 37 0
      service-community/src/main/java/com/java110/community/cmd/ownerRepair/ListAdminOwnerRepairsCmd.java
  7. 120 0
      service-community/src/main/java/com/java110/community/cmd/ownerRepair/ListAdminRepairStaffsCmd.java
  8. 1 0
      service-community/src/main/java/com/java110/community/cmd/ownerRepair/ListOwnerRepairsCmd.java
  9. 1 0
      service-community/src/main/java/com/java110/community/cmd/ownerRepair/ListRepairStaffsCmd.java
  10. 169 0
      service-report/src/main/java/com/java110/report/cmd/community/QueryCommunityRepairTreeCmd.java
  11. 2 0
      service-report/src/main/java/com/java110/report/dao/IReportCommunityServiceDao.java
  12. 9 0
      service-report/src/main/java/com/java110/report/dao/impl/ReportCommunityServiceDaoImpl.java
  13. 11 0
      service-report/src/main/java/com/java110/report/smo/impl/ReportCommunityInnerServiceSMOImpl.java
  14. 91 0
      service-store/src/main/java/com/java110/store/cmd/resourceStore/ListAdminStoreUseRecordsCmd.java
  15. 5 3
      service-store/src/main/java/com/java110/store/cmd/resourceStore/ListResourceStoreUseRecordCmd.java

+ 9 - 0
java110-bean/src/main/java/com/java110/dto/repair/RepairDto.java

@@ -63,6 +63,7 @@ public class RepairDto extends PageDto implements Serializable {
     private List<String> states;
     private String stateName;
     private String communityId;
+    private String communityName;
     private String roomId;
     private String[] roomIds;
     private String repairTypeName;
@@ -580,4 +581,12 @@ public class RepairDto extends PageDto implements Serializable {
     public void setNotifyWay(String notifyWay) {
         this.notifyWay = notifyWay;
     }
+
+    public String getCommunityName() {
+        return communityName;
+    }
+
+    public void setCommunityName(String communityName) {
+        this.communityName = communityName;
+    }
 }

+ 9 - 0
java110-bean/src/main/java/com/java110/dto/repair/RepairSettingDto.java

@@ -21,6 +21,7 @@ public class RepairSettingDto extends PageDto implements Serializable {
     private String repairType;
     private String remark;
     private String communityId;
+    private String communityName;
     private String repairWay;
     private String repairWayName;
     private String settingId;
@@ -180,4 +181,12 @@ public class RepairSettingDto extends PageDto implements Serializable {
     public void setNotifyWay(String notifyWay) {
         this.notifyWay = notifyWay;
     }
+
+    public String getCommunityName() {
+        return communityName;
+    }
+
+    public void setCommunityName(String communityName) {
+        this.communityName = communityName;
+    }
 }

+ 2 - 2
java110-db/src/main/resources/mapper/oa/WorkPoolV1ServiceDaoImplMapper.xml

@@ -231,7 +231,7 @@
             and t.wt_id= #{wtId}
         </if>
         <if test="states != null">
-            and t.state in
+            and wtk.state in
             <foreach collection="states" item="item" open="(" close=")" separator=",">
                 #{item}
             </foreach>
@@ -296,7 +296,7 @@
             and t.wt_id= #{wtId}
         </if>
         <if test="states != null">
-            and t.state in
+            and wtk.state in
             <foreach collection="states" item="item" open="(" close=")" separator=",">
                 #{item}
             </foreach>

+ 16 - 0
java110-db/src/main/resources/mapper/report/ReportCommunityServiceDaoImplMapper.xml

@@ -311,6 +311,22 @@
         order by t.num
     </select>
 
+    <!-- 查询报修数-->
+    <select id="queryCommunityRepairTree" parameterType="Map" resultType="Map">
+        select s.community_id communityId,s.name communityName,t.repair_type repairType,t.repair_type_name repairTypeName
+        from r_repair_setting t
+        left join s_community s on t.community_id = s.community_id and s.status_cd = '0'
+        where t.status_cd = '0'
+        and s.status_cd = '0'
+        <if test="communityIds !=null ">
+            and s.community_id in
+            <foreach collection="communityIds" item="item" open="(" close=")" separator=",">
+                #{item}
+            </foreach>
+        </if>
+        order by t.repair_type_name
+    </select>
+
     <select id="queryHisOwnerCarCount" parameterType="Map" resultType="Map">
         select count(1) count
         from business_owner_car t

+ 4 - 0
java110-interface/src/main/java/com/java110/intf/report/IReportCommunityInnerServiceSMO.java

@@ -3,6 +3,7 @@ package com.java110.intf.report;
 import com.java110.config.feign.FeignConfiguration;
 import com.java110.dto.fee.FeeConfigDto;
 import com.java110.dto.parking.ParkingAreaDto;
+import com.java110.dto.repair.RepairSettingDto;
 import com.java110.dto.room.RoomDto;
 import com.java110.dto.fee.FeeDto;
 import com.java110.dto.owner.OwnerCarDto;
@@ -109,4 +110,7 @@ public interface IReportCommunityInnerServiceSMO {
 
     @RequestMapping(value = "/queryCommunityParkingTree", method = RequestMethod.POST)
     List<ParkingAreaDto> queryCommunityParkingTree(@RequestBody ParkingAreaDto parkingAreaDto);
+
+    @RequestMapping(value = "/queryCommunityRepairTree", method = RequestMethod.POST)
+    List<RepairSettingDto> queryCommunityRepairTree(@RequestBody RepairSettingDto repairSettingDto);
 }

+ 37 - 0
service-community/src/main/java/com/java110/community/cmd/ownerRepair/ListAdminOwnerRepairsCmd.java

@@ -5,11 +5,13 @@ import com.java110.core.annotation.Java110Cmd;
 import com.java110.core.context.ICmdDataFlowContext;
 import com.java110.core.event.cmd.Cmd;
 import com.java110.core.event.cmd.CmdEvent;
+import com.java110.dto.community.CommunityDto;
 import com.java110.dto.file.FileRelDto;
 import com.java110.dto.owner.OwnerDto;
 import com.java110.dto.repair.RepairDto;
 import com.java110.dto.repair.RepairUserDto;
 import com.java110.intf.common.IFileRelInnerServiceSMO;
+import com.java110.intf.community.ICommunityV1InnerServiceSMO;
 import com.java110.intf.community.IRepairInnerServiceSMO;
 import com.java110.intf.community.IRepairUserInnerServiceSMO;
 import com.java110.intf.user.IOwnerV1InnerServiceSMO;
@@ -46,6 +48,9 @@ public class ListAdminOwnerRepairsCmd extends Cmd {
     @Autowired
     private IOwnerV1InnerServiceSMO ownerV1InnerServiceSMOImpl;
 
+    @Autowired
+    private ICommunityV1InnerServiceSMO communityV1InnerServiceSMOImpl;
+
     @Override
     public void validate(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException {
         super.validatePageInfo(reqJson);
@@ -100,6 +105,8 @@ public class ListAdminOwnerRepairsCmd extends Cmd {
                 ownerRepairs.add(repairDto);
             }
             refreshRepair(ownerRepairs);
+
+            refreshCommunityName(ownerRepairs);
         } else {
             ownerRepairs = new ArrayList<>();
         }
@@ -107,6 +114,36 @@ public class ListAdminOwnerRepairsCmd extends Cmd {
         context.setResponseEntity(responseEntity);
     }
 
+    private void refreshCommunityName(List<RepairDto> ownerRepairs) {
+
+        if(ListUtil.isNull(ownerRepairs)){
+            return;
+        }
+
+        List<String> communityIds = new ArrayList<>();
+        for (RepairDto repairDto : ownerRepairs) {
+            communityIds.add(repairDto.getCommunityId());
+        }
+
+        if(ListUtil.isNull(communityIds)){
+            return ;
+        }
+        CommunityDto communityDto = new CommunityDto();
+        communityDto.setCommunityIds(communityIds.toArray(new String[communityIds.size()]));
+        List<CommunityDto> communityDtos = communityV1InnerServiceSMOImpl.queryCommunitys(communityDto);
+        if(ListUtil.isNull(communityDtos)){
+            return;
+        }
+        for (RepairDto tmpRepairDto : ownerRepairs) {
+            for (CommunityDto tCommunityDto : communityDtos) {
+                if (!tmpRepairDto.getCommunityId().equals(tCommunityDto.getCommunityId())) {
+                    continue;
+                }
+                tmpRepairDto.setCommunityName(tCommunityDto.getName());
+            }
+        }
+    }
+
     private void ifHasTime(RepairDto ownerRepairDto) {
 
         if (StringUtil.isEmpty(ownerRepairDto.getEndTime())) {

+ 120 - 0
service-community/src/main/java/com/java110/community/cmd/ownerRepair/ListAdminRepairStaffsCmd.java

@@ -0,0 +1,120 @@
+package com.java110.community.cmd.ownerRepair;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.annotation.Java110Cmd;
+import com.java110.core.context.ICmdDataFlowContext;
+import com.java110.core.event.cmd.Cmd;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.dto.file.FileRelDto;
+import com.java110.dto.repair.RepairUserDto;
+import com.java110.intf.common.IFileRelInnerServiceSMO;
+import com.java110.intf.community.IRepairInnerServiceSMO;
+import com.java110.intf.community.IRepairUserInnerServiceSMO;
+import com.java110.utils.cache.MappingCache;
+import com.java110.utils.constant.MappingConstant;
+import com.java110.utils.exception.CmdException;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.utils.util.DateUtil;
+import com.java110.vo.ResultVo;
+import com.java110.vo.api.junkRequirement.PhotoVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+
+import java.text.ParseException;
+import java.util.ArrayList;
+import java.util.List;
+
+@Java110Cmd(serviceCode = "ownerRepair.listAdminRepairStaffs")
+public class ListAdminRepairStaffsCmd extends Cmd {
+
+    @Autowired
+    private IRepairInnerServiceSMO repairInnerServiceSMOImpl;
+
+    @Autowired
+    private IRepairUserInnerServiceSMO repairUserInnerServiceSMOImpl;
+
+    @Autowired
+    private IFileRelInnerServiceSMO fileRelInnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException {
+        super.validatePageInfo(reqJson);
+        super.validateAdmin(context);
+    }
+
+    @Override
+    public void doCmd(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException, ParseException {
+        RepairUserDto repairUserDto = BeanConvertUtil.covertBean(reqJson, RepairUserDto.class);
+
+        int count = repairUserInnerServiceSMOImpl.queryRepairUsersCount(repairUserDto);
+
+        List<RepairUserDto> repairUserDtos = null;
+        if (count > 0) {
+            repairUserDtos = repairUserInnerServiceSMOImpl.queryRepairUsers(repairUserDto);
+            refreshRepairUser(repairUserDtos);
+        } else {
+            repairUserDtos = new ArrayList<>();
+        }
+
+        ResponseEntity<String> responseEntity = ResultVo.createResponseEntity((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, repairUserDtos);
+
+        context.setResponseEntity(responseEntity);
+    }
+
+    private void refreshRepairUser(List<RepairUserDto> repairUserDtos) {
+        long duration = 0;
+        for (RepairUserDto repairUserDto : repairUserDtos) {
+            if (repairUserDto.getEndTime() == null) {
+                duration = DateUtil.getCurrentDate().getTime() - repairUserDto.getStartTime().getTime();
+            } else {
+                duration = repairUserDto.getEndTime().getTime() - repairUserDto.getStartTime().getTime();
+            }
+            repairUserDto.setDuration(getCostTime(duration));
+        }
+
+        //刷入图片信息
+        List<PhotoVo> photoVos = null;  //业主上传维修图片
+        PhotoVo photoVo = null;
+
+        String imgUrl = MappingCache.getValue(MappingConstant.FILE_DOMAIN,"IMG_PATH");
+
+        for (RepairUserDto repairUserDto : repairUserDtos) {
+            FileRelDto fileRelDto = new FileRelDto();
+            fileRelDto.setObjId(repairUserDto.getRepairId());
+            List<FileRelDto> fileRelDtos = fileRelInnerServiceSMOImpl.queryFileRels(fileRelDto);
+            photoVos = new ArrayList<>();
+            for (FileRelDto tmpFileRelDto : fileRelDtos) {
+                if (tmpFileRelDto.getRelTypeCd().equals("14000")) {  //维修图片
+                    photoVo = new PhotoVo();
+                    if(!tmpFileRelDto.getFileRealName().startsWith("http")){
+                        photoVo.setUrl(imgUrl+tmpFileRelDto.getFileRealName());
+                    }else{
+                        photoVo.setUrl(tmpFileRelDto.getFileRealName());
+                    }
+                    photoVo.setUrl(tmpFileRelDto.getFileRealName());
+                    photoVo.setRelTypeCd(tmpFileRelDto.getRelTypeCd());
+                    photoVos.add(photoVo);
+                } else {
+                    continue;
+                }
+            }
+            repairUserDto.setPhotoVos(photoVos);
+        }
+    }
+
+
+    public String getCostTime(Long time) {
+        if (time == null) {
+            return "00:00";
+        }
+        long hours = time / (1000 * 60 * 60);
+        long minutes = (time - hours * (1000 * 60 * 60)) / (1000 * 60);
+        String diffTime = "";
+        if (minutes < 10) {
+            diffTime = hours + ":0" + minutes;
+        } else {
+            diffTime = hours + ":" + minutes;
+        }
+        return diffTime;
+    }
+}

+ 1 - 0
service-community/src/main/java/com/java110/community/cmd/ownerRepair/ListOwnerRepairsCmd.java

@@ -48,6 +48,7 @@ public class ListOwnerRepairsCmd extends Cmd {
     @Override
     public void validate(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException {
         super.validatePageInfo(reqJson);
+        super.validateProperty(context);
         Assert.hasKeyAndValue(reqJson, "communityId", "必填,请填写小区信息");
     }
 

+ 1 - 0
service-community/src/main/java/com/java110/community/cmd/ownerRepair/ListRepairStaffsCmd.java

@@ -39,6 +39,7 @@ public class ListRepairStaffsCmd extends Cmd {
     @Override
     public void validate(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException {
         super.validatePageInfo(reqJson);
+        super.validateProperty(context);
     }
 
     @Override

+ 169 - 0
service-report/src/main/java/com/java110/report/cmd/community/QueryCommunityRepairTreeCmd.java

@@ -0,0 +1,169 @@
+package com.java110.report.cmd.community;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.annotation.Java110Cmd;
+import com.java110.core.context.ICmdDataFlowContext;
+import com.java110.core.event.cmd.Cmd;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.dto.dict.DictDto;
+import com.java110.dto.repair.RepairSettingDto;
+import com.java110.intf.dev.IDictV1InnerServiceSMO;
+import com.java110.intf.report.IReportCommunityInnerServiceSMO;
+import com.java110.utils.exception.CmdException;
+import com.java110.utils.util.ListUtil;
+import com.java110.utils.util.StringUtil;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import java.text.ParseException;
+import java.util.List;
+
+/**
+ * 查询小区报修树形结构
+ */
+@Java110Cmd(serviceCode = "community.queryCommunityRepairTree")
+public class QueryCommunityRepairTreeCmd extends Cmd {
+
+    @Autowired
+    private IReportCommunityInnerServiceSMO reportCommunityInnerServiceSMOImpl;
+
+    @Autowired
+    private IDictV1InnerServiceSMO dictV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException, ParseException {
+        // must be administrator
+        super.validateAdmin(context);
+    }
+
+    @Override
+    public void doCmd(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException, ParseException {
+
+        List<RepairSettingDto> repairSettingDtos = null;
+
+        RepairSettingDto repairSettingDto = new RepairSettingDto();
+
+
+        repairSettingDtos = reportCommunityInnerServiceSMOImpl.queryCommunityRepairTree(repairSettingDto);
+        JSONArray communitys = new JSONArray();
+        if (ListUtil.isNull(repairSettingDtos)) {
+            context.setResponseEntity(ResultVo.createResponseEntity(communitys));
+            return;
+        }
+
+        JSONObject communityInfo = null;
+        for (RepairSettingDto tmpRepairSettingDto : repairSettingDtos) {
+            if (!hasInCommunity(tmpRepairSettingDto, communitys)) {
+                communityInfo = new JSONObject();
+                communityInfo.put("id", "c_" + tmpRepairSettingDto.getCommunityId());
+                communityInfo.put("communityId", tmpRepairSettingDto.getCommunityId());
+                communityInfo.put("text", tmpRepairSettingDto.getCommunityName());
+                communityInfo.put("icon", "/img/org.png");
+                communityInfo.put("children", new JSONArray());
+                communitys.add(communityInfo);
+            }
+        }
+
+        DictDto dictDto = new DictDto();
+        dictDto.setTableName("r_repair_pool");
+        dictDto.setTableColumns("state");
+        List<DictDto> dictDtos = dictV1InnerServiceSMOImpl.queryDicts(dictDto);
+
+        JSONObject community = null;
+        for (int cIndex = 0; cIndex < communitys.size(); cIndex++) {
+            community = communitys.getJSONObject(cIndex);
+            // find floor data in unitDtos
+            findRepairSetting(community, repairSettingDtos, dictDtos);
+        }
+        context.setResponseEntity(ResultVo.createResponseEntity(communitys));
+
+
+    }
+
+    /**
+     * find community floor data
+     *
+     * @param community       current community
+     * @param repairSettingDtos all units data
+     */
+    private void findRepairSetting(JSONObject community, List<RepairSettingDto> repairSettingDtos, List<DictDto> dictDtos) {
+        JSONArray parkings = community.getJSONArray("children");
+        JSONObject parkingInfo = null;
+        for (RepairSettingDto tmpRepairSettingDto : repairSettingDtos) {
+            if (!hasInRepairSetting(tmpRepairSettingDto, parkings)) {
+                parkingInfo = new JSONObject();
+                parkingInfo.put("id", "r_" + tmpRepairSettingDto.getRepairType());
+                parkingInfo.put("repairType", tmpRepairSettingDto.getRepairType());
+                parkingInfo.put("communityId", community.getString("communityId"));
+                parkingInfo.put("text", tmpRepairSettingDto.getRepairTypeName());
+                parkingInfo.put("icon", "/img/floor.png");
+                parkingInfo.put("children", new JSONArray());
+                parkings.add(parkingInfo);
+            }
+        }
+
+
+        JSONObject parking = null;
+        for (int cIndex = 0; cIndex < parkings.size(); cIndex++) {
+            parking = parkings.getJSONObject(cIndex);
+            // find floor data in unitDtos
+            findState(parking, repairSettingDtos, dictDtos);
+        }
+    }
+
+    private void findState(JSONObject parking, List<RepairSettingDto> repairSettingDtos, List<DictDto> dictDtos) {
+        JSONArray states = parking.getJSONArray("children");
+        JSONObject stateInfo = null;
+        for (DictDto tmpDictDto : dictDtos) {
+            stateInfo = new JSONObject();
+            stateInfo.put("id", "s_" + GenerateCodeFactory.getUUID());
+            stateInfo.put("state", tmpDictDto.getStatusCd());
+            stateInfo.put("repairType", parking.getString("repairType"));
+            stateInfo.put("communityId", parking.getString("communityId"));
+            stateInfo.put("text", tmpDictDto.getName());
+            stateInfo.put("icon", "/img/unit.png");
+            states.add(stateInfo);
+        }
+
+    }
+
+
+    private boolean hasInRepairSetting(RepairSettingDto tmpRepairSettingDto, JSONArray parkings) {
+        JSONObject parkingArea = null;
+        for (int cIndex = 0; cIndex < parkings.size(); cIndex++) {
+            parkingArea = parkings.getJSONObject(cIndex);
+            if (!parkingArea.containsKey("repairType")) {
+                continue;
+            }
+            if (StringUtil.isEmpty(parkingArea.getString("repairType"))) {
+                continue;
+            }
+            if (parkingArea.getString("repairType").equals(tmpRepairSettingDto.getRepairType())) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+
+    private boolean hasInCommunity(RepairSettingDto tmpRepairSettingDto, JSONArray communitys) {
+        JSONObject community = null;
+        for (int cIndex = 0; cIndex < communitys.size(); cIndex++) {
+            community = communitys.getJSONObject(cIndex);
+            if (!community.containsKey("communityId")) {
+                continue;
+            }
+            if (StringUtil.isEmpty(community.getString("communityId"))) {
+                continue;
+            }
+            if (community.getString("communityId").equals(tmpRepairSettingDto.getCommunityId())) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+
+}

+ 2 - 0
service-report/src/main/java/com/java110/report/dao/IReportCommunityServiceDao.java

@@ -116,4 +116,6 @@ public interface IReportCommunityServiceDao {
 
 
     List<Map> queryCommunityParkingTree(Map info);
+
+    List<Map> queryCommunityRepairTree(Map info);
 }

+ 9 - 0
service-report/src/main/java/com/java110/report/dao/impl/ReportCommunityServiceDaoImpl.java

@@ -146,6 +146,15 @@ public class ReportCommunityServiceDaoImpl extends BaseServiceDao implements IRe
         return infos;
     }
 
+    @Override
+    public List<Map> queryCommunityRepairTree(Map info) {
+        logger.debug("查询queryCommunityRepairTree信息 入参 info : {}", JSONObject.toJSONString(info));
+
+        List<Map> infos = sqlSessionTemplate.selectList("reportCommunityServiceDaoImpl.queryCommunityRepairTree", info);
+
+        return infos;
+    }
+
     @Override
     public int queryHisOwnerCarCount(Map info) {
         logger.debug("查询车辆管理数据 入参 info : {}", info);

+ 11 - 0
service-report/src/main/java/com/java110/report/smo/impl/ReportCommunityInnerServiceSMOImpl.java

@@ -5,6 +5,7 @@ import com.java110.core.base.smo.BaseServiceSMO;
 import com.java110.dto.PageDto;
 import com.java110.dto.fee.FeeConfigDto;
 import com.java110.dto.parking.ParkingAreaDto;
+import com.java110.dto.repair.RepairSettingDto;
 import com.java110.dto.room.RoomDto;
 import com.java110.dto.fee.FeeDto;
 import com.java110.dto.owner.OwnerAttrDto;
@@ -90,6 +91,16 @@ public class ReportCommunityInnerServiceSMOImpl extends BaseServiceSMO implement
         return parkingAreaDtos;
     }
 
+    @Override
+    public List<RepairSettingDto> queryCommunityRepairTree(@RequestBody RepairSettingDto repairSettingDto) {
+        //校验是否传了 分页信息
+        List<RepairSettingDto> repairSettingDtos = BeanConvertUtil.covertBeanList(
+                reportCommunityServiceDaoImpl.queryCommunityRepairTree(BeanConvertUtil.beanCovertMap(repairSettingDto)),
+                RepairSettingDto.class);
+
+        return repairSettingDtos;
+    }
+
     @Override
     public int queryHisOwnerCarCount(@RequestBody OwnerCarDto ownerCarDto) {
         return reportCommunityServiceDaoImpl.queryHisOwnerCarCount(BeanConvertUtil.beanCovertMap(ownerCarDto));

+ 91 - 0
service-store/src/main/java/com/java110/store/cmd/resourceStore/ListAdminStoreUseRecordsCmd.java

@@ -0,0 +1,91 @@
+/*
+ * Copyright 2017-2020 吴学文 and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.store.cmd.resourceStore;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.annotation.Java110Cmd;
+import com.java110.core.context.ICmdDataFlowContext;
+import com.java110.core.event.cmd.Cmd;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.dto.privilege.BasePrivilegeDto;
+import com.java110.dto.resource.ResourceStoreUseRecordDto;
+import com.java110.intf.community.IMenuInnerServiceSMO;
+import com.java110.intf.store.IResourceStoreUseRecordInnerServiceSMO;
+import com.java110.utils.exception.CmdException;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.utils.util.ListUtil;
+import com.java110.vo.ResultVo;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 类表述:查询
+ * 服务编码:resourceStoreUseRecord.listResourceStoreUseRecord
+ * 请求路劲:/app/resourceStoreUseRecord.ListResourceStoreUseRecord
+ * add by 吴学文 at 2022-08-08 14:39:58 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+@Java110Cmd(serviceCode = "resourceStore.listAdminStoreUseRecords")
+public class ListAdminStoreUseRecordsCmd extends Cmd {
+
+    private static Logger logger = LoggerFactory.getLogger(ListAdminStoreUseRecordsCmd.class);
+
+    @Autowired
+    private IResourceStoreUseRecordInnerServiceSMO resourceStoreUseRecordInnerServiceSMOImpl;
+
+    @Autowired
+    private IMenuInnerServiceSMO menuInnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        super.validatePageInfo(reqJson);
+        super.validateProperty(cmdDataFlowContext);
+    }
+
+    @Override
+    public void doCmd(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException {
+
+        ResourceStoreUseRecordDto resourceStoreUseRecordDto = BeanConvertUtil.covertBean(reqJson, ResourceStoreUseRecordDto.class);
+
+        //查询物品所有使用记录权限
+
+        int count = resourceStoreUseRecordInnerServiceSMOImpl.queryResourceStoreUseRecordsCount(resourceStoreUseRecordDto);
+
+        List<ResourceStoreUseRecordDto> resourceStoreUseRecordDtos = null;
+
+        if (count > 0) {
+            resourceStoreUseRecordDtos = resourceStoreUseRecordInnerServiceSMOImpl.queryResourceStoreUseRecords(resourceStoreUseRecordDto);
+        } else {
+            resourceStoreUseRecordDtos = new ArrayList<>();
+        }
+
+        ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, resourceStoreUseRecordDtos);
+
+        ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
+
+        context.setResponseEntity(responseEntity);
+    }
+}

+ 5 - 3
service-store/src/main/java/com/java110/store/cmd/resourceStore/ListResourceStoreUseRecordCmd.java

@@ -25,6 +25,7 @@ import com.java110.intf.community.IMenuInnerServiceSMO;
 import com.java110.intf.store.IResourceStoreUseRecordInnerServiceSMO;
 import com.java110.utils.exception.CmdException;
 import com.java110.utils.util.BeanConvertUtil;
+import com.java110.utils.util.ListUtil;
 import com.java110.vo.ResultVo;
 import org.springframework.beans.factory.annotation.Autowired;
 import com.java110.dto.resource.ResourceStoreUseRecordDto;
@@ -49,9 +50,9 @@ import org.slf4j.LoggerFactory;
  * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
  */
 @Java110Cmd(serviceCode = "resourceStore.listResourceStoreUseRecords")
-public class ListResourceStoreUseRecordCmd extends Cmd {
+public class ListResourceStoreUseRecordsCmd extends Cmd {
 
-    private static Logger logger = LoggerFactory.getLogger(ListResourceStoreUseRecordCmd.class);
+    private static Logger logger = LoggerFactory.getLogger(ListResourceStoreUseRecordsCmd.class);
 
     @Autowired
     private IResourceStoreUseRecordInnerServiceSMO resourceStoreUseRecordInnerServiceSMOImpl;
@@ -62,6 +63,7 @@ public class ListResourceStoreUseRecordCmd extends Cmd {
     @Override
     public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
         super.validatePageInfo(reqJson);
+        super.validateProperty(cmdDataFlowContext);
     }
 
     @Override
@@ -74,7 +76,7 @@ public class ListResourceStoreUseRecordCmd extends Cmd {
         basePrivilegeDto.setResource("/allResourceStoreUseRecord");
         basePrivilegeDto.setUserId(reqJson.getString("userId"));
         List<Map> privileges = menuInnerServiceSMOImpl.checkUserHasResource(basePrivilegeDto);
-        if (privileges.size() == 0) {
+        if (ListUtil.isNull(privileges)) {
             resourceStoreUseRecordDto.setUserId(reqJson.getString("userId"));
             resourceStoreUseRecordDto.setUserName(reqJson.getString("userName"));
         } else {