Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
property-management
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘帅
property-management
Commits
20be465a
Commit
20be465a
authored
Jun 04, 2025
by
刘帅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.增加报修状态统计接口
parent
791db583
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
4 deletions
+51
-4
ApiWxRepairsController.java
...t/web/controller/business/api/ApiWxRepairsController.java
+9
-0
IWxRepairsService.java
...ropertyManagement/business/service/IWxRepairsService.java
+6
-0
WxRepairsServiceImpl.java
...anagement/business/service/impl/WxRepairsServiceImpl.java
+36
-4
No files found.
propertyManagement-admin/src/main/java/com/propertyManagement/web/controller/business/api/ApiWxRepairsController.java
View file @
20be465a
...
@@ -20,6 +20,7 @@ import javax.validation.constraints.NotNull;
...
@@ -20,6 +20,7 @@ import javax.validation.constraints.NotNull;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* 报修
* 报修
...
@@ -46,6 +47,14 @@ public class ApiWxRepairsController extends BaseController {
...
@@ -46,6 +47,14 @@ public class ApiWxRepairsController extends BaseController {
return
R
.
ok
(
iWxRepairsService
.
queryList
(
bo
));
return
R
.
ok
(
iWxRepairsService
.
queryList
(
bo
));
}
}
/**
* 查询用户报修状态统计
*/
@GetMapping
(
"/userCountAll"
)
public
R
<
Map
<
Integer
,
Long
>>
userCountAll
()
{
return
R
.
ok
(
iWxRepairsService
.
countAll
());
}
/**
/**
* 查询维修报修列表
* 查询维修报修列表
*/
*/
...
...
propertyManagement-business/src/main/java/com/propertyManagement/business/service/IWxRepairsService.java
View file @
20be465a
...
@@ -8,6 +8,7 @@ import com.propertyManagement.common.core.domain.PageQuery;
...
@@ -8,6 +8,7 @@ import com.propertyManagement.common.core.domain.PageQuery;
import
java.util.Collection
;
import
java.util.Collection
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* 报修Service接口
* 报修Service接口
...
@@ -32,6 +33,11 @@ public interface IWxRepairsService {
...
@@ -32,6 +33,11 @@ public interface IWxRepairsService {
*/
*/
List
<
WxRepairsVo
>
queryList
(
WxRepairsBo
bo
);
List
<
WxRepairsVo
>
queryList
(
WxRepairsBo
bo
);
/**
* 查询用户报修状态统计
*/
Map
<
Integer
,
Long
>
countAll
();
/**
/**
* 小程序新增报修
* 小程序新增报修
*/
*/
...
...
propertyManagement-business/src/main/java/com/propertyManagement/business/service/impl/WxRepairsServiceImpl.java
View file @
20be465a
...
@@ -9,6 +9,7 @@ import com.propertyManagement.business.mapper.WxAccountMapper;
...
@@ -9,6 +9,7 @@ import com.propertyManagement.business.mapper.WxAccountMapper;
import
com.propertyManagement.business.support.util.AuthUtil
;
import
com.propertyManagement.business.support.util.AuthUtil
;
import
com.propertyManagement.common.core.domain.BaseEntity
;
import
com.propertyManagement.common.core.domain.BaseEntity
;
import
com.propertyManagement.common.enums.AccountType
;
import
com.propertyManagement.common.enums.AccountType
;
import
com.propertyManagement.common.enums.RepairsState
;
import
com.propertyManagement.common.utils.StringUtils
;
import
com.propertyManagement.common.utils.StringUtils
;
import
com.propertyManagement.common.core.page.TableDataInfo
;
import
com.propertyManagement.common.core.page.TableDataInfo
;
import
com.propertyManagement.common.core.domain.PageQuery
;
import
com.propertyManagement.common.core.domain.PageQuery
;
...
@@ -24,10 +25,7 @@ import com.propertyManagement.business.mapper.WxRepairsMapper;
...
@@ -24,10 +25,7 @@ import com.propertyManagement.business.mapper.WxRepairsMapper;
import
com.propertyManagement.business.service.IWxRepairsService
;
import
com.propertyManagement.business.service.IWxRepairsService
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.Date
;
import
java.util.*
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Collection
;
/**
/**
* 报修Service业务层处理
* 报修Service业务层处理
...
@@ -69,6 +67,40 @@ public class WxRepairsServiceImpl implements IWxRepairsService {
...
@@ -69,6 +67,40 @@ public class WxRepairsServiceImpl implements IWxRepairsService {
return
baseMapper
.
selectVoList
(
lqw
);
return
baseMapper
.
selectVoList
(
lqw
);
}
}
/**
* 查询用户报修状态统计
*/
@Override
public
Map
<
Integer
,
Long
>
countAll
()
{
Map
<
Integer
,
Long
>
map
=
new
LinkedHashMap
<>();
LoginWxUser
wxUser
=
AuthUtil
.
getWxUser
();
LambdaQueryWrapper
<
WxRepairs
>
lambdaQueryWrapper
=
Wrappers
.
lambdaQuery
();
lambdaQueryWrapper
.
eq
(
WxRepairs:
:
getUserId
,
wxUser
.
getId
())
.
eq
(
WxRepairs:
:
getCommunityId
,
wxUser
.
getCommunityId
())
.
eq
(
WxRepairs:
:
getState
,
RepairsState
.
ONE
.
getCode
());
map
.
put
(
RepairsState
.
ONE
.
getCode
(),
baseMapper
.
selectCount
(
lambdaQueryWrapper
));
lambdaQueryWrapper
.
clear
();
lambdaQueryWrapper
.
eq
(
WxRepairs:
:
getUserId
,
wxUser
.
getId
())
.
eq
(
WxRepairs:
:
getCommunityId
,
wxUser
.
getCommunityId
())
.
eq
(
WxRepairs:
:
getState
,
RepairsState
.
TWO
.
getCode
());
map
.
put
(
RepairsState
.
TWO
.
getCode
(),
baseMapper
.
selectCount
(
lambdaQueryWrapper
));
lambdaQueryWrapper
.
clear
();
lambdaQueryWrapper
.
eq
(
WxRepairs:
:
getUserId
,
wxUser
.
getId
())
.
eq
(
WxRepairs:
:
getCommunityId
,
wxUser
.
getCommunityId
())
.
eq
(
WxRepairs:
:
getState
,
RepairsState
.
THREE
.
getCode
());
map
.
put
(
RepairsState
.
THREE
.
getCode
(),
baseMapper
.
selectCount
(
lambdaQueryWrapper
));
lambdaQueryWrapper
.
clear
();
lambdaQueryWrapper
.
eq
(
WxRepairs:
:
getUserId
,
wxUser
.
getId
())
.
eq
(
WxRepairs:
:
getCommunityId
,
wxUser
.
getCommunityId
())
.
eq
(
WxRepairs:
:
getState
,
RepairsState
.
FOUR
.
getCode
());
map
.
put
(
RepairsState
.
FOUR
.
getCode
(),
baseMapper
.
selectCount
(
lambdaQueryWrapper
));
return
map
;
}
private
LambdaQueryWrapper
<
WxRepairs
>
buildQueryWrapper
(
WxRepairsBo
bo
)
{
private
LambdaQueryWrapper
<
WxRepairs
>
buildQueryWrapper
(
WxRepairsBo
bo
)
{
Map
<
String
,
Object
>
params
=
bo
.
getParams
();
Map
<
String
,
Object
>
params
=
bo
.
getParams
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment