Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
pension
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
mengmeng
pension
Commits
e6af3329
Commit
e6af3329
authored
Mar 11, 2021
by
mlchun
Browse files
Options
Browse Files
Download
Plain Diff
Merge branches 'Shen' and 'master' of 119.3.70.207:xie/pension into Shen
parents
8e73aaf6
da012d88
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
273 additions
and
16 deletions
+273
-16
ShiroConfig.java
...ain/java/io/hmit/modules/security/config/ShiroConfig.java
+2
-1
NewsController.java
.../hmit/modules/serviceOrder/controller/NewsController.java
+2
-1
PensionOrderController.java
...dules/serviceOrder/controller/PensionOrderController.java
+61
-0
PensionOrderDao.java
...ava/io/hmit/modules/serviceOrder/dao/PensionOrderDao.java
+7
-2
PensionOrganizationServiceDao.java
...dules/serviceOrder/dao/PensionOrganizationServiceDao.java
+10
-2
UserDao.java
...c/main/java/io/hmit/modules/serviceOrder/dao/UserDao.java
+6
-2
NewsDTO.java
...c/main/java/io/hmit/modules/serviceOrder/dto/NewsDTO.java
+2
-0
NewsEntity.java
.../java/io/hmit/modules/serviceOrder/entity/NewsEntity.java
+5
-1
PensionOrderService.java
...mit/modules/serviceOrder/service/PensionOrderService.java
+8
-1
PensionOrganizationService.java
...ules/serviceOrder/service/PensionOrganizationService.java
+4
-1
UserService.java
...ava/io/hmit/modules/serviceOrder/service/UserService.java
+5
-0
NewsServiceImpl.java
...it/modules/serviceOrder/service/impl/NewsServiceImpl.java
+3
-1
PensionOrderServiceImpl.java
...es/serviceOrder/service/impl/PensionOrderServiceImpl.java
+93
-0
PensionOrganizationServiceImpl.java
...iceOrder/service/impl/PensionOrganizationServiceImpl.java
+11
-1
UserServiceImpl.java
...it/modules/serviceOrder/service/impl/UserServiceImpl.java
+23
-0
NewsDao.xml
...-admin/src/main/resources/mapper/serviceOrder/NewsDao.xml
+2
-1
PensionOrderDao.xml
...rc/main/resources/mapper/serviceOrder/PensionOrderDao.xml
+13
-1
PensionOrganizationServiceDao.xml
...ces/mapper/serviceOrder/PensionOrganizationServiceDao.xml
+6
-1
UserDao.xml
...-admin/src/main/resources/mapper/serviceOrder/UserDao.xml
+10
-0
No files found.
hmit-admin/src/main/java/io/hmit/modules/security/config/ShiroConfig.java
View file @
e6af3329
...
@@ -71,6 +71,7 @@ public class ShiroConfig {
...
@@ -71,6 +71,7 @@ public class ShiroConfig {
filterMap
.
put
(
"/modeler.html"
,
"anon"
);
filterMap
.
put
(
"/modeler.html"
,
"anon"
);
filterMap
.
put
(
"/captcha"
,
"anon"
);
filterMap
.
put
(
"/captcha"
,
"anon"
);
filterMap
.
put
(
"/favicon.ico"
,
"anon"
);
filterMap
.
put
(
"/favicon.ico"
,
"anon"
);
// filterMap.put("/**", "anon");
filterMap
.
put
(
"/**"
,
"oauth2"
);
filterMap
.
put
(
"/**"
,
"oauth2"
);
shiroFilter
.
setFilterChainDefinitionMap
(
filterMap
);
shiroFilter
.
setFilterChainDefinitionMap
(
filterMap
);
...
@@ -89,4 +90,4 @@ public class ShiroConfig {
...
@@ -89,4 +90,4 @@ public class ShiroConfig {
advisor
.
setSecurityManager
(
securityManager
);
advisor
.
setSecurityManager
(
securityManager
);
return
advisor
;
return
advisor
;
}
}
}
}
\ No newline at end of file
hmit-admin/src/main/java/io/hmit/modules/serviceOrder/controller/NewsController.java
View file @
e6af3329
...
@@ -52,7 +52,8 @@ public class NewsController {
...
@@ -52,7 +52,8 @@ public class NewsController {
@ApiImplicitParam
(
name
=
Constant
.
PAGE
,
value
=
"当前页码,从1开始"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
)
,
@ApiImplicitParam
(
name
=
Constant
.
PAGE
,
value
=
"当前页码,从1开始"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
)
,
@ApiImplicitParam
(
name
=
Constant
.
LIMIT
,
value
=
"每页显示记录数"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
)
,
@ApiImplicitParam
(
name
=
Constant
.
LIMIT
,
value
=
"每页显示记录数"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
)
,
@ApiImplicitParam
(
name
=
Constant
.
ORDER_FIELD
,
value
=
"排序字段"
,
paramType
=
"query"
,
dataType
=
"String"
)
,
@ApiImplicitParam
(
name
=
Constant
.
ORDER_FIELD
,
value
=
"排序字段"
,
paramType
=
"query"
,
dataType
=
"String"
)
,
@ApiImplicitParam
(
name
=
Constant
.
ORDER
,
value
=
"排序方式,可选值(asc、desc)"
,
paramType
=
"query"
,
dataType
=
"String"
)
@ApiImplicitParam
(
name
=
Constant
.
ORDER
,
value
=
"排序方式,可选值(asc、desc)"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"status"
,
value
=
"状态,0未审核,1审核通过,2审核不通过"
,
paramType
=
"query"
,
dataType
=
"String"
)
})
})
@RequiresPermissions
(
"serviceOrder:news:page"
)
@RequiresPermissions
(
"serviceOrder:news:page"
)
public
Result
<
PageData
<
NewsDTO
>>
page
(
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
){
public
Result
<
PageData
<
NewsDTO
>>
page
(
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
){
...
...
hmit-admin/src/main/java/io/hmit/modules/serviceOrder/controller/PensionOrderController.java
View file @
e6af3329
...
@@ -10,9 +10,12 @@ import io.hmit.common.validator.ValidatorUtils;
...
@@ -10,9 +10,12 @@ import io.hmit.common.validator.ValidatorUtils;
import
io.hmit.common.validator.group.AddGroup
;
import
io.hmit.common.validator.group.AddGroup
;
import
io.hmit.common.validator.group.DefaultGroup
;
import
io.hmit.common.validator.group.DefaultGroup
;
import
io.hmit.common.validator.group.UpdateGroup
;
import
io.hmit.common.validator.group.UpdateGroup
;
import
io.hmit.modules.security.user.SecurityUser
;
import
io.hmit.modules.serviceOrder.dto.PensionOrderDTO
;
import
io.hmit.modules.serviceOrder.dto.PensionOrderDTO
;
import
io.hmit.modules.serviceOrder.entity.UserEntity
;
import
io.hmit.modules.serviceOrder.excel.PensionOrderExcel
;
import
io.hmit.modules.serviceOrder.excel.PensionOrderExcel
;
import
io.hmit.modules.serviceOrder.service.PensionOrderService
;
import
io.hmit.modules.serviceOrder.service.PensionOrderService
;
import
io.hmit.modules.serviceOrder.service.UserService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiImplicitParams
;
...
@@ -23,6 +26,7 @@ import org.springframework.web.bind.annotation.*;
...
@@ -23,6 +26,7 @@ import org.springframework.web.bind.annotation.*;
import
springfox.documentation.annotations.ApiIgnore
;
import
springfox.documentation.annotations.ApiIgnore
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
java.security.Security
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -39,6 +43,8 @@ import java.util.Map;
...
@@ -39,6 +43,8 @@ import java.util.Map;
public
class
PensionOrderController
{
public
class
PensionOrderController
{
@Autowired
@Autowired
private
PensionOrderService
pensionOrderService
;
private
PensionOrderService
pensionOrderService
;
@Autowired
private
UserService
userService
;
@GetMapping
(
"page"
)
@GetMapping
(
"page"
)
@ApiOperation
(
"分页"
)
@ApiOperation
(
"分页"
)
...
@@ -65,6 +71,24 @@ public class PensionOrderController {
...
@@ -65,6 +71,24 @@ public class PensionOrderController {
return
new
Result
<
PensionOrderDTO
>().
ok
(
data
);
return
new
Result
<
PensionOrderDTO
>().
ok
(
data
);
}
}
/**
* 机构订单接口
*/
@GetMapping
(
"organization"
)
@ApiOperation
(
value
=
"根据状态返回订单列表(机构)"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
Constant
.
PAGE
,
value
=
"当前页码,从1开始"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
)
,
@ApiImplicitParam
(
name
=
Constant
.
LIMIT
,
value
=
"每页显示记录数"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
)
,
@ApiImplicitParam
(
name
=
"status"
,
value
=
"订单状态: 0未接单 1已派发 2已完成 3已取消 5已接单未派发"
,
paramType
=
"query"
,
dataType
=
"int"
)
,
@ApiImplicitParam
(
name
=
Constant
.
ORDER_FIELD
,
value
=
"排序字段"
,
paramType
=
"query"
,
dataType
=
"String"
)
,
@ApiImplicitParam
(
name
=
Constant
.
ORDER
,
value
=
"排序方式,可选值(asc、desc)"
,
paramType
=
"query"
,
dataType
=
"String"
)
})
public
Result
<
PageData
<
PensionOrderDTO
>>
organization
(
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
){
//登录->查询登录人员所属机构ID->机构ID查询服务ID(List)->服务ID + 状态查询订单(List)
PageData
<
PensionOrderDTO
>
page
=
pensionOrderService
.
getOrganizationOrder
(
params
,
SecurityUser
.
getUserId
());
return
new
Result
<
PageData
<
PensionOrderDTO
>>().
ok
(
page
);
}
@PostMapping
@PostMapping
@ApiOperation
(
"保存"
)
@ApiOperation
(
"保存"
)
@LogOperation
(
"保存"
)
@LogOperation
(
"保存"
)
...
@@ -114,4 +138,41 @@ public class PensionOrderController {
...
@@ -114,4 +138,41 @@ public class PensionOrderController {
ExcelUtils
.
exportExcelToTarget
(
response
,
null
,
list
,
PensionOrderExcel
.
class
);
ExcelUtils
.
exportExcelToTarget
(
response
,
null
,
list
,
PensionOrderExcel
.
class
);
}
}
/**
* 机构处理
*/
@GetMapping
(
"organizationHandle"
)
@ApiOperation
(
value
=
"机构处理(机构)"
,
notes
=
"传参为1(派单)时,recipient_id必传"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"id"
,
value
=
"订单ID"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"long"
)
,
@ApiImplicitParam
(
name
=
"status"
,
value
=
"处理状态: 5接单 1派单 3取消"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
)
,
@ApiImplicitParam
(
name
=
"recipient_id"
,
value
=
"接单服务人员ID"
,
paramType
=
"query"
,
dataType
=
"long"
)
})
public
Result
organizationHandle
(
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
){
// Boolean result = pensionOrderService.organizationHandle(params, SecurityUser.getUserId());
Boolean
result
=
pensionOrderService
.
organizationHandle
(
params
,
1L
);
if
(!
result
)
{
return
new
Result
().
error
();
}
return
new
Result
();
}
/**
* 本机构全部人员
*/
@GetMapping
(
"organizationStaff"
)
@ApiOperation
(
value
=
"本机构全部人员(机构)"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
Constant
.
PAGE
,
value
=
"当前页码,从1开始"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
)
,
@ApiImplicitParam
(
name
=
Constant
.
LIMIT
,
value
=
"每页显示记录数"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
)
,
@ApiImplicitParam
(
name
=
Constant
.
ORDER_FIELD
,
value
=
"排序字段"
,
paramType
=
"query"
,
dataType
=
"String"
)
,
@ApiImplicitParam
(
name
=
Constant
.
ORDER
,
value
=
"排序方式,可选值(asc、desc)"
,
paramType
=
"query"
,
dataType
=
"String"
)
})
public
Result
<
PageData
<
UserEntity
>>
organizationStaff
(
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
){
PageData
<
UserEntity
>
page
=
userService
.
getOrganizationAllUsers
(
params
,
SecurityUser
.
getUserId
());
return
new
Result
<
PageData
<
UserEntity
>>().
ok
(
page
);
}
}
}
hmit-admin/src/main/java/io/hmit/modules/serviceOrder/dao/PensionOrderDao.java
View file @
e6af3329
package
io
.
hmit
.
modules
.
serviceOrder
.
dao
;
package
io
.
hmit
.
modules
.
serviceOrder
.
dao
;
import
io.hmit.common.dao.BaseDao
;
import
io.hmit.common.dao.BaseDao
;
import
io.hmit.modules.serviceOrder.dto.PensionOrderDTO
;
import
io.hmit.modules.serviceOrder.entity.PensionOrderEntity
;
import
io.hmit.modules.serviceOrder.entity.PensionOrderEntity
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
java.util.List
;
/**
/**
* 订单表
* 订单表
*
*
...
@@ -12,5 +15,7 @@ import org.apache.ibatis.annotations.Mapper;
...
@@ -12,5 +15,7 @@ import org.apache.ibatis.annotations.Mapper;
*/
*/
@Mapper
@Mapper
public
interface
PensionOrderDao
extends
BaseDao
<
PensionOrderEntity
>
{
public
interface
PensionOrderDao
extends
BaseDao
<
PensionOrderEntity
>
{
}
List
<
PensionOrderDTO
>
getAllOrderByServiceId
(
Long
serviceId
,
Integer
status
);
\ No newline at end of file
}
hmit-admin/src/main/java/io/hmit/modules/serviceOrder/dao/PensionOrganizationServiceDao.java
View file @
e6af3329
...
@@ -4,6 +4,8 @@ import io.hmit.common.dao.BaseDao;
...
@@ -4,6 +4,8 @@ import io.hmit.common.dao.BaseDao;
import
io.hmit.modules.serviceOrder.entity.PensionOrganizationServiceEntity
;
import
io.hmit.modules.serviceOrder.entity.PensionOrganizationServiceEntity
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
java.util.List
;
/**
/**
* 机构服务关系
* 机构服务关系
*
*
...
@@ -12,5 +14,11 @@ import org.apache.ibatis.annotations.Mapper;
...
@@ -12,5 +14,11 @@ import org.apache.ibatis.annotations.Mapper;
*/
*/
@Mapper
@Mapper
public
interface
PensionOrganizationServiceDao
extends
BaseDao
<
PensionOrganizationServiceEntity
>
{
public
interface
PensionOrganizationServiceDao
extends
BaseDao
<
PensionOrganizationServiceEntity
>
{
/**
}
* 根据用户Id查询出机构的全部服务ID
\ No newline at end of file
* @param userId
* @return
*/
List
<
Long
>
findServiceIdListByServiceUserId
(
Long
userId
);
}
hmit-admin/src/main/java/io/hmit/modules/serviceOrder/dao/UserDao.java
View file @
e6af3329
...
@@ -4,6 +4,8 @@ import io.hmit.common.dao.BaseDao;
...
@@ -4,6 +4,8 @@ import io.hmit.common.dao.BaseDao;
import
io.hmit.modules.serviceOrder.entity.UserEntity
;
import
io.hmit.modules.serviceOrder.entity.UserEntity
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
java.util.List
;
/**
/**
* 用户
* 用户
*
*
...
@@ -12,5 +14,7 @@ import org.apache.ibatis.annotations.Mapper;
...
@@ -12,5 +14,7 @@ import org.apache.ibatis.annotations.Mapper;
*/
*/
@Mapper
@Mapper
public
interface
UserDao
extends
BaseDao
<
UserEntity
>
{
public
interface
UserDao
extends
BaseDao
<
UserEntity
>
{
UserEntity
getUserByUserId
(
Long
userId
);
}
List
<
Long
>
getAllOrganizationStaff
(
Long
userId
);
\ No newline at end of file
}
hmit-admin/src/main/java/io/hmit/modules/serviceOrder/dto/NewsDTO.java
View file @
e6af3329
...
@@ -47,6 +47,8 @@ public class NewsDTO implements Serializable {
...
@@ -47,6 +47,8 @@ public class NewsDTO implements Serializable {
@ApiModelProperty
(
value
=
"更新时间"
)
@ApiModelProperty
(
value
=
"更新时间"
)
private
Date
updateDate
;
private
Date
updateDate
;
@ApiModelProperty
(
value
=
"状态"
)
private
Integer
status
;
// 附件
// 附件
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
...
...
hmit-admin/src/main/java/io/hmit/modules/serviceOrder/entity/NewsEntity.java
View file @
e6af3329
...
@@ -2,6 +2,7 @@ package io.hmit.modules.serviceOrder.entity;
...
@@ -2,6 +2,7 @@ package io.hmit.modules.serviceOrder.entity;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.hmit.common.entity.BaseEntity
;
import
io.hmit.common.entity.BaseEntity
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
...
@@ -39,8 +40,11 @@ public class NewsEntity extends BaseEntity {
...
@@ -39,8 +40,11 @@ public class NewsEntity extends BaseEntity {
* 更新者
* 更新者
*/
*/
private
Long
updater
;
private
Long
updater
;
private
Integer
status
;
/**
/**
* 更新时间
* 更新时间
*/
*/
private
Date
updateDate
;
private
Date
updateDate
;
}
}
\ No newline at end of file
hmit-admin/src/main/java/io/hmit/modules/serviceOrder/service/PensionOrderService.java
View file @
e6af3329
package
io
.
hmit
.
modules
.
serviceOrder
.
service
;
package
io
.
hmit
.
modules
.
serviceOrder
.
service
;
import
io.hmit.common.page.PageData
;
import
io.hmit.common.service.CrudService
;
import
io.hmit.common.service.CrudService
;
import
io.hmit.modules.serviceOrder.dto.PensionOrderDTO
;
import
io.hmit.modules.serviceOrder.dto.PensionOrderDTO
;
import
io.hmit.modules.serviceOrder.entity.PensionOrderEntity
;
import
io.hmit.modules.serviceOrder.entity.PensionOrderEntity
;
import
java.util.Map
;
/**
/**
* 订单表
* 订单表
*
*
...
@@ -12,4 +15,8 @@ import io.hmit.modules.serviceOrder.entity.PensionOrderEntity;
...
@@ -12,4 +15,8 @@ import io.hmit.modules.serviceOrder.entity.PensionOrderEntity;
*/
*/
public
interface
PensionOrderService
extends
CrudService
<
PensionOrderEntity
,
PensionOrderDTO
>
{
public
interface
PensionOrderService
extends
CrudService
<
PensionOrderEntity
,
PensionOrderDTO
>
{
}
//查询机构订单
\ No newline at end of file
PageData
<
PensionOrderDTO
>
getOrganizationOrder
(
Map
<
String
,
Object
>
params
,
Long
userId
);
Boolean
organizationHandle
(
Map
<
String
,
Object
>
params
,
Long
userId
);
}
hmit-admin/src/main/java/io/hmit/modules/serviceOrder/service/PensionOrganizationService.java
View file @
e6af3329
...
@@ -4,6 +4,8 @@ import io.hmit.common.service.CrudService;
...
@@ -4,6 +4,8 @@ import io.hmit.common.service.CrudService;
import
io.hmit.modules.serviceOrder.dto.PensionOrganizationDTO
;
import
io.hmit.modules.serviceOrder.dto.PensionOrganizationDTO
;
import
io.hmit.modules.serviceOrder.entity.PensionOrganizationEntity
;
import
io.hmit.modules.serviceOrder.entity.PensionOrganizationEntity
;
import
java.util.List
;
/**
/**
* 机构表
* 机构表
*
*
...
@@ -12,4 +14,5 @@ import io.hmit.modules.serviceOrder.entity.PensionOrganizationEntity;
...
@@ -12,4 +14,5 @@ import io.hmit.modules.serviceOrder.entity.PensionOrganizationEntity;
*/
*/
public
interface
PensionOrganizationService
extends
CrudService
<
PensionOrganizationEntity
,
PensionOrganizationDTO
>
{
public
interface
PensionOrganizationService
extends
CrudService
<
PensionOrganizationEntity
,
PensionOrganizationDTO
>
{
}
List
<
Long
>
findServiceIdListByServiceUserId
(
Long
userId
);
\ No newline at end of file
}
hmit-admin/src/main/java/io/hmit/modules/serviceOrder/service/UserService.java
View file @
e6af3329
package
io
.
hmit
.
modules
.
serviceOrder
.
service
;
package
io
.
hmit
.
modules
.
serviceOrder
.
service
;
import
io.hmit.common.page.PageData
;
import
io.hmit.common.service.CrudService
;
import
io.hmit.common.service.CrudService
;
import
io.hmit.modules.serviceOrder.dto.UserDTO
;
import
io.hmit.modules.serviceOrder.dto.UserDTO
;
import
io.hmit.modules.serviceOrder.entity.UserEntity
;
import
io.hmit.modules.serviceOrder.entity.UserEntity
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* 用户
* 用户
...
@@ -16,4 +18,7 @@ public interface UserService extends CrudService<UserEntity, UserDTO> {
...
@@ -16,4 +18,7 @@ public interface UserService extends CrudService<UserEntity, UserDTO> {
void
saveOrUpdateUserRole
(
Long
userId
,
List
<
Long
>
roleIdList
);
void
saveOrUpdateUserRole
(
Long
userId
,
List
<
Long
>
roleIdList
);
UserEntity
getUserByUserId
(
Long
userId
);
PageData
<
UserEntity
>
getOrganizationAllUsers
(
Map
<
String
,
Object
>
params
,
Long
userId
);
}
}
hmit-admin/src/main/java/io/hmit/modules/serviceOrder/service/impl/NewsServiceImpl.java
View file @
e6af3329
...
@@ -23,12 +23,14 @@ public class NewsServiceImpl extends CrudServiceImpl<NewsDao, NewsEntity, NewsDT
...
@@ -23,12 +23,14 @@ public class NewsServiceImpl extends CrudServiceImpl<NewsDao, NewsEntity, NewsDT
@Override
@Override
public
QueryWrapper
<
NewsEntity
>
getWrapper
(
Map
<
String
,
Object
>
params
){
public
QueryWrapper
<
NewsEntity
>
getWrapper
(
Map
<
String
,
Object
>
params
){
String
id
=
(
String
)
params
.
get
(
"id"
);
String
id
=
(
String
)
params
.
get
(
"id"
);
String
status
=
(
String
)
params
.
get
(
"status"
);
QueryWrapper
<
NewsEntity
>
wrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
NewsEntity
>
wrapper
=
new
QueryWrapper
<>();
wrapper
.
eq
(
StringUtils
.
isNotBlank
(
id
),
"id"
,
id
);
wrapper
.
eq
(
StringUtils
.
isNotBlank
(
id
),
"id"
,
id
);
wrapper
.
eq
(
StringUtils
.
isNotBlank
(
status
),
"status"
,
status
);
return
wrapper
;
return
wrapper
;
}
}
}
}
\ No newline at end of file
hmit-admin/src/main/java/io/hmit/modules/serviceOrder/service/impl/PensionOrderServiceImpl.java
View file @
e6af3329
package
io
.
hmit
.
modules
.
serviceOrder
.
service
.
impl
;
package
io
.
hmit
.
modules
.
serviceOrder
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
io.hmit.common.constant.Constant
;
import
io.hmit.common.page.PageData
;
import
io.hmit.common.service.impl.CrudServiceImpl
;
import
io.hmit.common.service.impl.CrudServiceImpl
;
import
io.hmit.common.utils.ConvertUtils
;
import
io.hmit.modules.serviceOrder.dao.PensionOrderDao
;
import
io.hmit.modules.serviceOrder.dao.PensionOrderDao
;
import
io.hmit.modules.serviceOrder.dto.PensionOrderDTO
;
import
io.hmit.modules.serviceOrder.dto.PensionOrderDTO
;
import
io.hmit.modules.serviceOrder.entity.PensionOrderEntity
;
import
io.hmit.modules.serviceOrder.entity.PensionOrderEntity
;
import
io.hmit.modules.serviceOrder.entity.UserEntity
;
import
io.hmit.modules.serviceOrder.service.PensionOrderService
;
import
io.hmit.modules.serviceOrder.service.PensionOrderService
;
import
io.hmit.modules.serviceOrder.service.PensionOrderServiceService
;
import
io.hmit.modules.serviceOrder.service.PensionOrganizationService
;
import
io.hmit.modules.serviceOrder.service.UserService
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
/**
/**
...
@@ -20,6 +32,19 @@ import java.util.Map;
...
@@ -20,6 +32,19 @@ import java.util.Map;
@Service
@Service
public
class
PensionOrderServiceImpl
extends
CrudServiceImpl
<
PensionOrderDao
,
PensionOrderEntity
,
PensionOrderDTO
>
implements
PensionOrderService
{
public
class
PensionOrderServiceImpl
extends
CrudServiceImpl
<
PensionOrderDao
,
PensionOrderEntity
,
PensionOrderDTO
>
implements
PensionOrderService
{
@Autowired
private
PensionOrderDao
pensionOrderDao
;
@Autowired
private
PensionOrderServiceService
pensionOrderServiceService
;
@Autowired
private
PensionOrganizationService
pensionOrganizationService
;
@Autowired
private
UserService
userService
;
@Override
@Override
public
QueryWrapper
<
PensionOrderEntity
>
getWrapper
(
Map
<
String
,
Object
>
params
){
public
QueryWrapper
<
PensionOrderEntity
>
getWrapper
(
Map
<
String
,
Object
>
params
){
String
id
=
(
String
)
params
.
get
(
"id"
);
String
id
=
(
String
)
params
.
get
(
"id"
);
...
@@ -33,4 +58,72 @@ public class PensionOrderServiceImpl extends CrudServiceImpl<PensionOrderDao, Pe
...
@@ -33,4 +58,72 @@ public class PensionOrderServiceImpl extends CrudServiceImpl<PensionOrderDao, Pe
}
}
@Override
public
PageData
<
PensionOrderDTO
>
getOrganizationOrder
(
Map
<
String
,
Object
>
params
,
Long
userId
)
{
//登录->查询登录人员所属机构ID->机构ID查询服务ID(List)->服务ID + 状态查询订单(List)
// IPage<PensionOrderEntity> page = getPage(params, Constant.CREATE_DATE, false);
List
<
Long
>
serviceIds
=
pensionOrganizationService
.
findServiceIdListByServiceUserId
(
userId
);
Integer
status
=
null
;
if
(
null
!=
params
.
get
(
"status"
)
&&
!
""
.
equals
(
params
.
get
(
"status"
)))
{
status
=
Integer
.
parseInt
(
params
.
get
(
"status"
).
toString
());
}
List
<
PensionOrderDTO
>
result
=
new
ArrayList
<>();
for
(
Long
id
:
serviceIds
)
{
List
<
PensionOrderDTO
>
list
=
pensionOrderDao
.
getAllOrderByServiceId
(
id
,
status
);
result
.
addAll
(
list
);
}
// page.setTotal(result.size());
Integer
pageNum
=
Integer
.
parseInt
(
params
.
get
(
"page"
).
toString
());
Integer
pageSize
=
Integer
.
parseInt
(
params
.
get
(
"limit"
).
toString
());
Integer
count
=
result
.
size
();
Integer
pageNo
=
(
pageNum
-
1
)
*
pageSize
;
List
<
PensionOrderDTO
>
list2
;
if
(
pageNo
+
pageSize
>
count
)
{
list2
=
result
.
subList
(
pageNo
,
count
);
}
else
{
list2
=
result
.
subList
(
pageNo
,
pageNo
+
pageSize
);
}
return
getPageData
(
list2
,
result
.
size
(),
PensionOrderDTO
.
class
);
}
@Override
public
Boolean
organizationHandle
(
Map
<
String
,
Object
>
params
,
Long
userId
)
{
//userId 可用于校验是否属于本机构的订单,暂未使用
Long
orderId
=
Long
.
parseLong
(
params
.
get
(
"id"
).
toString
());
PensionOrderEntity
pensionOrderEntity
=
pensionOrderDao
.
selectById
(
orderId
);
Integer
status
=
Integer
.
parseInt
(
params
.
get
(
"status"
).
toString
());
if
(
status
==
5
)
{
//接单
if
(
pensionOrderEntity
.
getStatus
()
==
0
)
{
pensionOrderEntity
.
setStatus
(
5
);
pensionOrderEntity
.
setStatusName
(
Constant
.
OrderStatus
.
HAND_OUT
.
getMessage
());
update
(
ConvertUtils
.
sourceToTarget
(
pensionOrderEntity
,
PensionOrderDTO
.
class
));
}
else
{
return
false
;
}
}
else
if
(
status
==
1
){
//派单
Long
recipient_id
=
Long
.
parseLong
(
params
.
get
(
"recipient_id"
).
toString
());
if
(
pensionOrderEntity
.
getStatus
()
==
5
)
{
pensionOrderEntity
.
setStatus
(
1
);
pensionOrderEntity
.
setStatusName
(
Constant
.
OrderStatus
.
ORDER
.
getMessage
());
UserEntity
recipient
=
userService
.
getUserByUserId
(
recipient_id
);
pensionOrderEntity
.
setOrderRecipientId
(
recipient_id
);
pensionOrderEntity
.
setOrderRecipientName
(
recipient
.
getUsername
());
pensionOrderEntity
.
setOrderRecipientPhone
(
recipient
.
getMobile
());
pensionOrderEntity
.
setOrderRecipientTime
(
new
Date
());
update
(
ConvertUtils
.
sourceToTarget
(
pensionOrderEntity
,
PensionOrderDTO
.
class
));
}
else
{
return
false
;
}
}
else
if
(
status
==
3
)
{
if
(
pensionOrderEntity
.
getStatus
()
!=
2
&&
pensionOrderEntity
.
getStatus
()
!=
4
)
{
pensionOrderEntity
.
setStatus
(
3
);
pensionOrderEntity
.
setStatusName
(
Constant
.
OrderStatus
.
CANCEL
.
getMessage
());
pensionOrderEntity
.
setCancelReason
(
params
.
get
(
"cancel_reason"
).
toString
());
update
(
ConvertUtils
.
sourceToTarget
(
pensionOrderEntity
,
PensionOrderDTO
.
class
));
}
else
{
return
false
;
}
}
return
true
;
}
}
}
hmit-admin/src/main/java/io/hmit/modules/serviceOrder/service/impl/PensionOrganizationServiceImpl.java
View file @
e6af3329
...
@@ -3,12 +3,15 @@ package io.hmit.modules.serviceOrder.service.impl;
...
@@ -3,12 +3,15 @@ package io.hmit.modules.serviceOrder.service.impl;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
io.hmit.common.service.impl.CrudServiceImpl
;
import
io.hmit.common.service.impl.CrudServiceImpl
;
import
io.hmit.modules.serviceOrder.dao.PensionOrganizationDao
;
import
io.hmit.modules.serviceOrder.dao.PensionOrganizationDao
;
import
io.hmit.modules.serviceOrder.dao.PensionOrganizationServiceDao
;
import
io.hmit.modules.serviceOrder.dto.PensionOrganizationDTO
;
import
io.hmit.modules.serviceOrder.dto.PensionOrganizationDTO
;
import
io.hmit.modules.serviceOrder.entity.PensionOrganizationEntity
;
import
io.hmit.modules.serviceOrder.entity.PensionOrganizationEntity
;
import
io.hmit.modules.serviceOrder.service.PensionOrganizationService
;
import
io.hmit.modules.serviceOrder.service.PensionOrganizationService
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
/**
/**
...
@@ -20,6 +23,9 @@ import java.util.Map;
...
@@ -20,6 +23,9 @@ import java.util.Map;
@Service
@Service
public
class
PensionOrganizationServiceImpl
extends
CrudServiceImpl
<
PensionOrganizationDao
,
PensionOrganizationEntity
,
PensionOrganizationDTO
>
implements
PensionOrganizationService
{
public
class
PensionOrganizationServiceImpl
extends
CrudServiceImpl
<
PensionOrganizationDao
,
PensionOrganizationEntity
,
PensionOrganizationDTO
>
implements
PensionOrganizationService
{
@Autowired
private
PensionOrganizationServiceDao
pensionOrganizationServiceDao
;
@Override
@Override
public
QueryWrapper
<
PensionOrganizationEntity
>
getWrapper
(
Map
<
String
,
Object
>
params
){
public
QueryWrapper
<
PensionOrganizationEntity
>
getWrapper
(
Map
<
String
,
Object
>
params
){
String
id
=
(
String
)
params
.
get
(
"id"
);
String
id
=
(
String
)
params
.
get
(
"id"
);
...
@@ -31,4 +37,8 @@ public class PensionOrganizationServiceImpl extends CrudServiceImpl<PensionOrgan
...
@@ -31,4 +37,8 @@ public class PensionOrganizationServiceImpl extends CrudServiceImpl<PensionOrgan
}
}
}
@Override
\ No newline at end of file
public
List
<
Long
>
findServiceIdListByServiceUserId
(
Long
userId
)
{
return
pensionOrganizationServiceDao
.
findServiceIdListByServiceUserId
(
userId
);
}
}
hmit-admin/src/main/java/io/hmit/modules/serviceOrder/service/impl/UserServiceImpl.java
View file @
e6af3329
package
io
.
hmit
.
modules
.
serviceOrder
.
service
.
impl
;
package
io
.
hmit
.
modules
.
serviceOrder
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
io.hmit.common.constant.Constant
;
import
io.hmit.common.page.PageData
;
import
io.hmit.common.service.impl.CrudServiceImpl
;
import
io.hmit.common.service.impl.CrudServiceImpl
;
import
io.hmit.modules.serviceOrder.dao.UserDao
;
import
io.hmit.modules.serviceOrder.dao.UserDao
;
import
io.hmit.modules.serviceOrder.dto.UserDTO
;
import
io.hmit.modules.serviceOrder.dto.UserDTO
;
...
@@ -11,6 +14,7 @@ import org.apache.commons.lang3.StringUtils;
...
@@ -11,6 +14,7 @@ import org.apache.commons.lang3.StringUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -40,4 +44,23 @@ public class UserServiceImpl extends CrudServiceImpl<UserDao, UserEntity, UserDT
...
@@ -40,4 +44,23 @@ public class UserServiceImpl extends CrudServiceImpl<UserDao, UserEntity, UserDT
public
void
saveOrUpdateUserRole
(
Long
userId
,
List
<
Long
>
roleIdList
)
{
public
void
saveOrUpdateUserRole
(
Long
userId
,
List
<
Long
>
roleIdList
)
{
roleUserService
.
saveOrUpdate
(
userId
,
roleIdList
);
roleUserService
.
saveOrUpdate
(
userId
,
roleIdList
);
}
}
@Override
public
UserEntity
getUserByUserId
(
Long
userId
)
{
return
baseDao
.
getUserByUserId
(
userId
);
}
@Override
public
PageData
<
UserEntity
>
getOrganizationAllUsers
(
Map
<
String
,
Object
>
params
,
Long
userId
)
{
IPage
<
UserEntity
>
page
=
getPage
(
params
,
Constant
.
CREATE_DATE
,
false
);
List
<
Long
>
serviceIds
=
baseDao
.
getAllOrganizationStaff
(
userId
);
List
<
UserEntity
>
list
=
new
ArrayList
<>();
for
(
Long
id
:
serviceIds
)
{
UserEntity
userEntity
=
baseDao
.
selectById
(
id
);
list
.
add
(
userEntity
);
}
page
.
setTotal
(
list
.
size
());
return
getPageData
(
list
,
page
.
getTotal
(),
UserEntity
.
class
);
}
}
}
hmit-admin/src/main/resources/mapper/serviceOrder/NewsDao.xml
View file @
e6af3329
...
@@ -13,7 +13,8 @@
...
@@ -13,7 +13,8 @@
<result
property=
"createDate"
column=
"create_date"
/>
<result
property=
"createDate"
column=
"create_date"
/>
<result
property=
"updater"
column=
"updater"
/>
<result
property=
"updater"
column=
"updater"
/>
<result
property=
"updateDate"
column=
"update_date"
/>
<result
property=
"updateDate"
column=
"update_date"
/>
<result
property=
"status"
column=
"status"
/>
</resultMap>
</resultMap>
</mapper>
</mapper>
\ No newline at end of file
hmit-admin/src/main/resources/mapper/serviceOrder/PensionOrderDao.xml
View file @
e6af3329
...
@@ -28,5 +28,17 @@
...
@@ -28,5 +28,17 @@
<result
property=
"updateDate"
column=
"update_date"
/>
<result
property=
"updateDate"
column=
"update_date"
/>
</resultMap>
</resultMap>
<select
id=
"getAllOrderByServiceId"
resultType=
"io.hmit.modules.serviceOrder.dto.PensionOrderDTO"
>
SELECT po.id, po.order_num, po.status, po.status_name, po.address, po.service_id, po.service_name,
po.appointment_person, po.appointment_phone, po.appointment_time, po.remark,
po.order_recipient_id, po.order_recipient_name, po.order_recipient_time, po.order_recipient_phone,
po.act_price, po.community_name, po.community_id, po.dept_id,
po.creator, po.creator_name, po.creator_tel, po.create_date,
ps.icon
FROM pension_order po, pension_service ps
WHERE po.service_id = ps.id AND po.service_id = #{serviceId}
<if
test=
"status != null"
>
AND po.status = #{status}
</if>
</select>
</mapper>
</mapper>
hmit-admin/src/main/resources/mapper/serviceOrder/PensionOrganizationServiceDao.xml
View file @
e6af3329
...
@@ -11,5 +11,10 @@
...
@@ -11,5 +11,10 @@
<result
property=
"createDate"
column=
"create_date"
/>
<result
property=
"createDate"
column=
"create_date"
/>
</resultMap>
</resultMap>
<select
id=
"findServiceIdListByServiceUserId"
resultType=
"Long"
>
SELECT pos.service_id FROM pension_organization_user pou, pension_organization_service pos,tb_user tu
WHERE pou.organization_id = pos.organization_id and tu.id= pou.user_id and tu.user_id= #{userId}
</select>
</mapper>
\ No newline at end of file
</mapper>
hmit-admin/src/main/resources/mapper/serviceOrder/UserDao.xml
View file @
e6af3329
...
@@ -17,5 +17,15 @@
...
@@ -17,5 +17,15 @@
<result
property=
"address"
column=
"address"
/>
<result
property=
"address"
column=
"address"
/>
</resultMap>
</resultMap>
<select
id=
"getUserByUserId"
resultType=
"io.hmit.modules.serviceOrder.entity.UserEntity"
>
select * from tb_user where id = #{value}
</select>
<select
id=
"getAllOrganizationStaff"
resultType=
"Long"
>
SELECT user_id FROM pension_organization_user
WHERE organization_id = (SELECT pou.organization_id FROM pension_organization_user pou,tb_user tu
WHERE pou.user_id = tu.id and tu.user_id = #{userId});
</select>
</mapper>
</mapper>
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