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
c24f1b73
Commit
c24f1b73
authored
Mar 11, 2021
by
lings
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into lings
parents
c5c63e51
35871824
Show whitespace changes
Inline
Side-by-side
Showing
48 changed files
with
1490 additions
and
79 deletions
+1490
-79
PensionOrganizationController.java
...erviceOrder/controller/PensionOrganizationController.java
+116
-0
PensionOrganizationServiceController.java
...rder/controller/PensionOrganizationServiceController.java
+116
-0
PensionOrganizationDao.java
...hmit/modules/serviceOrder/dao/PensionOrganizationDao.java
+16
-0
PensionOrganizationServiceDao.java
...dules/serviceOrder/dao/PensionOrganizationServiceDao.java
+16
-0
PensionOrganizationDTO.java
...hmit/modules/serviceOrder/dto/PensionOrganizationDTO.java
+41
-0
PensionOrganizationServiceDTO.java
...dules/serviceOrder/dto/PensionOrganizationServiceDTO.java
+38
-0
PensionServiceDTO.java
...a/io/hmit/modules/serviceOrder/dto/PensionServiceDTO.java
+2
-2
PensionOrganizationEntity.java
...odules/serviceOrder/entity/PensionOrganizationEntity.java
+34
-0
PensionOrganizationServiceEntity.java
...serviceOrder/entity/PensionOrganizationServiceEntity.java
+30
-0
PensionServiceEntity.java
...mit/modules/serviceOrder/entity/PensionServiceEntity.java
+2
-2
PensionOrganizationExcel.java
.../modules/serviceOrder/excel/PensionOrganizationExcel.java
+29
-0
PensionOrganizationServiceExcel.java
...s/serviceOrder/excel/PensionOrganizationServiceExcel.java
+27
-0
PensionServiceExcel.java
.../hmit/modules/serviceOrder/excel/PensionServiceExcel.java
+3
-3
PensionOrganizationService.java
...ules/serviceOrder/service/PensionOrganizationService.java
+15
-0
PensionOrganizationServiceService.java
...rviceOrder/service/PensionOrganizationServiceService.java
+15
-0
PensionOrganizationServiceImpl.java
...iceOrder/service/impl/PensionOrganizationServiceImpl.java
+34
-0
PensionOrganizationServiceServiceImpl.java
...r/service/impl/PensionOrganizationServiceServiceImpl.java
+34
-0
PensionOrganizationDao.xml
.../resources/mapper/serviceOrder/PensionOrganizationDao.xml
+16
-0
PensionOrganizationServiceDao.xml
...ces/mapper/serviceOrder/PensionOrganizationServiceDao.xml
+15
-0
pom.xml
hmit-api/pom.xml
+18
-0
SwaggerConfig.java
hmit-api/src/main/java/io/hmit/config/SwaggerConfig.java
+1
-1
PensionOrderController.java
...dules/serviceOrder/controller/PensionOrderController.java
+99
-2
PensionOrderServiceController.java
...erviceOrder/controller/PensionOrderServiceController.java
+0
-2
PensionOrganizationController.java
...erviceOrder/controller/PensionOrganizationController.java
+92
-0
PensionOrganizationServiceController.java
...rder/controller/PensionOrganizationServiceController.java
+92
-0
PensionServiceController.java
...les/serviceOrder/controller/PensionServiceController.java
+34
-0
PensionOrderDao.java
...ava/io/hmit/modules/serviceOrder/dao/PensionOrderDao.java
+22
-0
PensionOrganizationDao.java
...hmit/modules/serviceOrder/dao/PensionOrganizationDao.java
+16
-0
PensionOrganizationServiceDao.java
...dules/serviceOrder/dao/PensionOrganizationServiceDao.java
+25
-0
PensionOrganizationDTO.java
...hmit/modules/serviceOrder/dto/PensionOrganizationDTO.java
+41
-0
PensionOrganizationServiceDTO.java
...dules/serviceOrder/dto/PensionOrganizationServiceDTO.java
+38
-0
PensionServiceDTO.java
...a/io/hmit/modules/serviceOrder/dto/PensionServiceDTO.java
+3
-19
PensionOrganizationEntity.java
...odules/serviceOrder/entity/PensionOrganizationEntity.java
+34
-0
PensionOrganizationServiceEntity.java
...serviceOrder/entity/PensionOrganizationServiceEntity.java
+30
-0
PensionServiceEntity.java
...mit/modules/serviceOrder/entity/PensionServiceEntity.java
+3
-2
PensionOrderService.java
...mit/modules/serviceOrder/service/PensionOrderService.java
+8
-0
PensionOrganizationService.java
...ules/serviceOrder/service/PensionOrganizationService.java
+19
-0
PensionOrganizationServiceService.java
...rviceOrder/service/PensionOrganizationServiceService.java
+15
-0
PensionServiceService.java
...t/modules/serviceOrder/service/PensionServiceService.java
+5
-1
PensionOrderServiceImpl.java
...es/serviceOrder/service/impl/PensionOrderServiceImpl.java
+49
-1
PensionOrganizationServiceImpl.java
...iceOrder/service/impl/PensionOrganizationServiceImpl.java
+44
-0
PensionOrganizationServiceServiceImpl.java
...r/service/impl/PensionOrganizationServiceServiceImpl.java
+34
-0
PensionServiceServiceImpl.java
.../serviceOrder/service/impl/PensionServiceServiceImpl.java
+26
-2
PensionServiceTypeServiceImpl.java
...viceOrder/service/impl/PensionServiceTypeServiceImpl.java
+2
-0
PensionOrderDao.xml
...rc/main/resources/mapper/serviceOrder/PensionOrderDao.xml
+95
-39
PensionOrganizationDao.xml
.../resources/mapper/serviceOrder/PensionOrganizationDao.xml
+16
-0
PensionOrganizationServiceDao.xml
...ces/mapper/serviceOrder/PensionOrganizationServiceDao.xml
+19
-0
Constant.java
...ommon/src/main/java/io/hmit/common/constant/Constant.java
+11
-3
No files found.
hmit-admin/src/main/java/io/hmit/modules/serviceOrder/controller/PensionOrganizationController.java
0 → 100644
View file @
c24f1b73
package
io
.
hmit
.
modules
.
serviceOrder
.
controller
;
import
io.hmit.common.annotation.LogOperation
;
import
io.hmit.common.constant.Constant
;
import
io.hmit.common.page.PageData
;
import
io.hmit.common.utils.ExcelUtils
;
import
io.hmit.common.utils.Result
;
import
io.hmit.common.validator.AssertUtils
;
import
io.hmit.common.validator.ValidatorUtils
;
import
io.hmit.common.validator.group.AddGroup
;
import
io.hmit.common.validator.group.DefaultGroup
;
import
io.hmit.common.validator.group.UpdateGroup
;
import
io.hmit.modules.serviceOrder.dto.PensionOrganizationDTO
;
import
io.hmit.modules.serviceOrder.excel.PensionOrganizationExcel
;
import
io.hmit.modules.serviceOrder.service.PensionOrganizationService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
springfox.documentation.annotations.ApiIgnore
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
import
java.util.Map
;
/**
* 机构表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-03-10
*/
@RestController
@RequestMapping
(
"serviceOrder/pensionorganization"
)
@Api
(
tags
=
"机构表"
)
public
class
PensionOrganizationController
{
@Autowired
private
PensionOrganizationService
pensionOrganizationService
;
@GetMapping
(
"page"
)
@ApiOperation
(
"分页"
)
@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"
)
})
@RequiresPermissions
(
"serviceOrder:pensionorganization:page"
)
public
Result
<
PageData
<
PensionOrganizationDTO
>>
page
(
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
){
PageData
<
PensionOrganizationDTO
>
page
=
pensionOrganizationService
.
page
(
params
);
return
new
Result
<
PageData
<
PensionOrganizationDTO
>>().
ok
(
page
);
}
@GetMapping
(
"{id}"
)
@ApiOperation
(
"信息"
)
@RequiresPermissions
(
"serviceOrder:pensionorganization:info"
)
public
Result
<
PensionOrganizationDTO
>
get
(
@PathVariable
(
"id"
)
Long
id
){
PensionOrganizationDTO
data
=
pensionOrganizationService
.
get
(
id
);
return
new
Result
<
PensionOrganizationDTO
>().
ok
(
data
);
}
@PostMapping
@ApiOperation
(
"保存"
)
@LogOperation
(
"保存"
)
@RequiresPermissions
(
"serviceOrder:pensionorganization:save"
)
public
Result
save
(
@RequestBody
PensionOrganizationDTO
dto
){
//校验数据
ValidatorUtils
.
validateEntity
(
dto
,
AddGroup
.
class
,
DefaultGroup
.
class
);
pensionOrganizationService
.
save
(
dto
);
return
new
Result
();
}
@PutMapping
@ApiOperation
(
"修改"
)
@LogOperation
(
"修改"
)
@RequiresPermissions
(
"serviceOrder:pensionorganization:update"
)
public
Result
update
(
@RequestBody
PensionOrganizationDTO
dto
){
//校验数据
ValidatorUtils
.
validateEntity
(
dto
,
UpdateGroup
.
class
,
DefaultGroup
.
class
);
pensionOrganizationService
.
update
(
dto
);
return
new
Result
();
}
@DeleteMapping
@ApiOperation
(
"删除"
)
@LogOperation
(
"删除"
)
@RequiresPermissions
(
"serviceOrder:pensionorganization:delete"
)
public
Result
delete
(
@RequestBody
Long
[]
ids
){
//校验数据
AssertUtils
.
isArrayEmpty
(
ids
,
"id"
);
pensionOrganizationService
.
delete
(
ids
);
return
new
Result
();
}
@GetMapping
(
"export"
)
@ApiOperation
(
"导出"
)
@LogOperation
(
"导出"
)
@RequiresPermissions
(
"serviceOrder:pensionorganization:export"
)
public
void
export
(
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
,
HttpServletResponse
response
)
throws
Exception
{
List
<
PensionOrganizationDTO
>
list
=
pensionOrganizationService
.
list
(
params
);
ExcelUtils
.
exportExcelToTarget
(
response
,
null
,
list
,
PensionOrganizationExcel
.
class
);
}
}
\ No newline at end of file
hmit-admin/src/main/java/io/hmit/modules/serviceOrder/controller/PensionOrganizationServiceController.java
0 → 100644
View file @
c24f1b73
package
io
.
hmit
.
modules
.
serviceOrder
.
controller
;
import
io.hmit.common.annotation.LogOperation
;
import
io.hmit.common.constant.Constant
;
import
io.hmit.common.page.PageData
;
import
io.hmit.common.utils.ExcelUtils
;
import
io.hmit.common.utils.Result
;
import
io.hmit.common.validator.AssertUtils
;
import
io.hmit.common.validator.ValidatorUtils
;
import
io.hmit.common.validator.group.AddGroup
;
import
io.hmit.common.validator.group.DefaultGroup
;
import
io.hmit.common.validator.group.UpdateGroup
;
import
io.hmit.modules.serviceOrder.dto.PensionOrganizationServiceDTO
;
import
io.hmit.modules.serviceOrder.excel.PensionOrganizationServiceExcel
;
import
io.hmit.modules.serviceOrder.service.PensionOrganizationServiceService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
springfox.documentation.annotations.ApiIgnore
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
import
java.util.Map
;
/**
* 机构服务关系
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-03-10
*/
@RestController
@RequestMapping
(
"serviceOrder/pensionorganizationservice"
)
@Api
(
tags
=
"机构服务关系"
)
public
class
PensionOrganizationServiceController
{
@Autowired
private
PensionOrganizationServiceService
pensionOrganizationServiceService
;
@GetMapping
(
"page"
)
@ApiOperation
(
"分页"
)
@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"
)
})
@RequiresPermissions
(
"serviceOrder:pensionorganizationservice:page"
)
public
Result
<
PageData
<
PensionOrganizationServiceDTO
>>
page
(
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
){
PageData
<
PensionOrganizationServiceDTO
>
page
=
pensionOrganizationServiceService
.
page
(
params
);
return
new
Result
<
PageData
<
PensionOrganizationServiceDTO
>>().
ok
(
page
);
}
@GetMapping
(
"{id}"
)
@ApiOperation
(
"信息"
)
@RequiresPermissions
(
"serviceOrder:pensionorganizationservice:info"
)
public
Result
<
PensionOrganizationServiceDTO
>
get
(
@PathVariable
(
"id"
)
Long
id
){
PensionOrganizationServiceDTO
data
=
pensionOrganizationServiceService
.
get
(
id
);
return
new
Result
<
PensionOrganizationServiceDTO
>().
ok
(
data
);
}
@PostMapping
@ApiOperation
(
"保存"
)
@LogOperation
(
"保存"
)
@RequiresPermissions
(
"serviceOrder:pensionorganizationservice:save"
)
public
Result
save
(
@RequestBody
PensionOrganizationServiceDTO
dto
){
//校验数据
ValidatorUtils
.
validateEntity
(
dto
,
AddGroup
.
class
,
DefaultGroup
.
class
);
pensionOrganizationServiceService
.
save
(
dto
);
return
new
Result
();
}
@PutMapping
@ApiOperation
(
"修改"
)
@LogOperation
(
"修改"
)
@RequiresPermissions
(
"serviceOrder:pensionorganizationservice:update"
)
public
Result
update
(
@RequestBody
PensionOrganizationServiceDTO
dto
){
//校验数据
ValidatorUtils
.
validateEntity
(
dto
,
UpdateGroup
.
class
,
DefaultGroup
.
class
);
pensionOrganizationServiceService
.
update
(
dto
);
return
new
Result
();
}
@DeleteMapping
@ApiOperation
(
"删除"
)
@LogOperation
(
"删除"
)
@RequiresPermissions
(
"serviceOrder:pensionorganizationservice:delete"
)
public
Result
delete
(
@RequestBody
Long
[]
ids
){
//校验数据
AssertUtils
.
isArrayEmpty
(
ids
,
"id"
);
pensionOrganizationServiceService
.
delete
(
ids
);
return
new
Result
();
}
@GetMapping
(
"export"
)
@ApiOperation
(
"导出"
)
@LogOperation
(
"导出"
)
@RequiresPermissions
(
"serviceOrder:pensionorganizationservice:export"
)
public
void
export
(
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
,
HttpServletResponse
response
)
throws
Exception
{
List
<
PensionOrganizationServiceDTO
>
list
=
pensionOrganizationServiceService
.
list
(
params
);
ExcelUtils
.
exportExcelToTarget
(
response
,
null
,
list
,
PensionOrganizationServiceExcel
.
class
);
}
}
\ No newline at end of file
hmit-admin/src/main/java/io/hmit/modules/serviceOrder/dao/PensionOrganizationDao.java
0 → 100644
View file @
c24f1b73
package
io
.
hmit
.
modules
.
serviceOrder
.
dao
;
import
io.hmit.common.dao.BaseDao
;
import
io.hmit.modules.serviceOrder.entity.PensionOrganizationEntity
;
import
org.apache.ibatis.annotations.Mapper
;
/**
* 机构表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-03-10
*/
@Mapper
public
interface
PensionOrganizationDao
extends
BaseDao
<
PensionOrganizationEntity
>
{
}
\ No newline at end of file
hmit-admin/src/main/java/io/hmit/modules/serviceOrder/dao/PensionOrganizationServiceDao.java
0 → 100644
View file @
c24f1b73
package
io
.
hmit
.
modules
.
serviceOrder
.
dao
;
import
io.hmit.common.dao.BaseDao
;
import
io.hmit.modules.serviceOrder.entity.PensionOrganizationServiceEntity
;
import
org.apache.ibatis.annotations.Mapper
;
/**
* 机构服务关系
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-03-10
*/
@Mapper
public
interface
PensionOrganizationServiceDao
extends
BaseDao
<
PensionOrganizationServiceEntity
>
{
}
\ No newline at end of file
hmit-admin/src/main/java/io/hmit/modules/serviceOrder/dto/PensionOrganizationDTO.java
0 → 100644
View file @
c24f1b73
package
io
.
hmit
.
modules
.
serviceOrder
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 机构表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-03-10
*/
@Data
@ApiModel
(
value
=
"机构表"
)
public
class
PensionOrganizationDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"id"
)
private
Long
id
;
@ApiModelProperty
(
value
=
"机构名称"
)
private
String
name
;
@ApiModelProperty
(
value
=
"机构图标"
)
private
String
icon
;
@ApiModelProperty
(
value
=
"机构描述"
)
private
String
description
;
@ApiModelProperty
(
value
=
"创建者"
)
private
Long
creator
;
@ApiModelProperty
(
value
=
"创建时间"
)
private
Date
createDate
;
}
\ No newline at end of file
hmit-admin/src/main/java/io/hmit/modules/serviceOrder/dto/PensionOrganizationServiceDTO.java
0 → 100644
View file @
c24f1b73
package
io
.
hmit
.
modules
.
serviceOrder
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 机构服务关系
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-03-10
*/
@Data
@ApiModel
(
value
=
"机构服务关系"
)
public
class
PensionOrganizationServiceDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"id"
)
private
Long
id
;
@ApiModelProperty
(
value
=
"机构ID"
)
private
Long
organizationId
;
@ApiModelProperty
(
value
=
"服务ID"
)
private
Long
serviceId
;
@ApiModelProperty
(
value
=
"创建者"
)
private
Long
creator
;
@ApiModelProperty
(
value
=
"创建时间"
)
private
Date
createDate
;
}
\ No newline at end of file
hmit-admin/src/main/java/io/hmit/modules/serviceOrder/dto/PensionServiceDTO.java
View file @
c24f1b73
...
...
@@ -37,8 +37,8 @@ public class PensionServiceDTO extends TreeNode<PensionServiceDTO> implements Se
@ApiModelProperty
(
value
=
"服务内容介绍"
)
private
String
serviceContent
;
@ApiModelProperty
(
value
=
"服务
类型
"
)
private
Long
serviceParentI
d
;
@ApiModelProperty
(
value
=
"服务
父类id
"
)
private
Long
pi
d
;
@ApiModelProperty
(
value
=
"排序"
)
private
Integer
sort
;
...
...
hmit-admin/src/main/java/io/hmit/modules/serviceOrder/entity/PensionOrganizationEntity.java
0 → 100644
View file @
c24f1b73
package
io
.
hmit
.
modules
.
serviceOrder
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.hmit.common.entity.BaseEntity
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
/**
* 机构表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-03-10
*/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
@TableName
(
"pension_organization"
)
public
class
PensionOrganizationEntity
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 机构名称
*/
private
String
name
;
/**
* 机构图标
*/
private
String
icon
;
/**
* 机构描述
*/
private
String
description
;
}
\ No newline at end of file
hmit-admin/src/main/java/io/hmit/modules/serviceOrder/entity/PensionOrganizationServiceEntity.java
0 → 100644
View file @
c24f1b73
package
io
.
hmit
.
modules
.
serviceOrder
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.hmit.common.entity.BaseEntity
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
/**
* 机构服务关系
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-03-10
*/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
@TableName
(
"pension_organization_service"
)
public
class
PensionOrganizationServiceEntity
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 机构ID
*/
private
Long
organizationId
;
/**
* 服务ID
*/
private
Long
serviceId
;
}
\ No newline at end of file
hmit-admin/src/main/java/io/hmit/modules/serviceOrder/entity/PensionServiceEntity.java
View file @
c24f1b73
...
...
@@ -29,9 +29,9 @@ public class PensionServiceEntity extends BaseEntity {
private
Long
pid
;
/**
* 服务
类型
* 服务
父类id
*/
private
Long
serviceParentI
d
;
private
Long
pi
d
;
/**
* 排序
*/
...
...
hmit-admin/src/main/java/io/hmit/modules/serviceOrder/excel/PensionOrganizationExcel.java
0 → 100644
View file @
c24f1b73
package
io
.
hmit
.
modules
.
serviceOrder
.
excel
;
import
cn.afterturn.easypoi.excel.annotation.Excel
;
import
lombok.Data
;
import
java.util.Date
;
/**
* 机构表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-03-10
*/
@Data
public
class
PensionOrganizationExcel
{
@Excel
(
name
=
"id"
)
private
Long
id
;
@Excel
(
name
=
"机构名称"
)
private
String
name
;
@Excel
(
name
=
"机构图标"
)
private
String
icon
;
@Excel
(
name
=
"机构描述"
)
private
String
description
;
@Excel
(
name
=
"创建者"
)
private
Long
creator
;
@Excel
(
name
=
"创建时间"
)
private
Date
createDate
;
}
\ No newline at end of file
hmit-admin/src/main/java/io/hmit/modules/serviceOrder/excel/PensionOrganizationServiceExcel.java
0 → 100644
View file @
c24f1b73
package
io
.
hmit
.
modules
.
serviceOrder
.
excel
;
import
cn.afterturn.easypoi.excel.annotation.Excel
;
import
lombok.Data
;
import
java.util.Date
;
/**
* 机构服务关系
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-03-10
*/
@Data
public
class
PensionOrganizationServiceExcel
{
@Excel
(
name
=
"id"
)
private
Long
id
;
@Excel
(
name
=
"机构ID"
)
private
Long
organizationId
;
@Excel
(
name
=
"服务ID"
)
private
Long
serviceId
;
@Excel
(
name
=
"创建者"
)
private
Long
creator
;
@Excel
(
name
=
"创建时间"
)
private
Date
createDate
;
}
\ No newline at end of file
hmit-admin/src/main/java/io/hmit/modules/serviceOrder/excel/PensionServiceExcel.java
View file @
c24f1b73
...
...
@@ -18,8 +18,8 @@ public class PensionServiceExcel {
private
Long
id
;
@Excel
(
name
=
"服务名称"
)
private
String
name
;
@Excel
(
name
=
"服务
类型
"
)
private
Long
serviceParentI
d
;
@Excel
(
name
=
"服务
父类id
"
)
private
Long
pi
d
;
@Excel
(
name
=
"排序"
)
private
Integer
sort
;
@Excel
(
name
=
"首页图标地址"
)
...
...
hmit-admin/src/main/java/io/hmit/modules/serviceOrder/service/PensionOrganizationService.java
0 → 100644
View file @
c24f1b73
package
io
.
hmit
.
modules
.
serviceOrder
.
service
;
import
io.hmit.common.service.CrudService
;
import
io.hmit.modules.serviceOrder.dto.PensionOrganizationDTO
;
import
io.hmit.modules.serviceOrder.entity.PensionOrganizationEntity
;
/**
* 机构表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-03-10
*/
public
interface
PensionOrganizationService
extends
CrudService
<
PensionOrganizationEntity
,
PensionOrganizationDTO
>
{
}
\ No newline at end of file
hmit-admin/src/main/java/io/hmit/modules/serviceOrder/service/PensionOrganizationServiceService.java
0 → 100644
View file @
c24f1b73
package
io
.
hmit
.
modules
.
serviceOrder
.
service
;
import
io.hmit.common.service.CrudService
;
import
io.hmit.modules.serviceOrder.dto.PensionOrganizationServiceDTO
;
import
io.hmit.modules.serviceOrder.entity.PensionOrganizationServiceEntity
;
/**
* 机构服务关系
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-03-10
*/
public
interface
PensionOrganizationServiceService
extends
CrudService
<
PensionOrganizationServiceEntity
,
PensionOrganizationServiceDTO
>
{
}
\ No newline at end of file
hmit-admin/src/main/java/io/hmit/modules/serviceOrder/service/impl/PensionOrganizationServiceImpl.java
0 → 100644
View file @
c24f1b73
package
io
.
hmit
.
modules
.
serviceOrder
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
io.hmit.common.service.impl.CrudServiceImpl
;
import
io.hmit.modules.serviceOrder.dao.PensionOrganizationDao
;
import
io.hmit.modules.serviceOrder.dto.PensionOrganizationDTO
;
import
io.hmit.modules.serviceOrder.entity.PensionOrganizationEntity
;
import
io.hmit.modules.serviceOrder.service.PensionOrganizationService
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Service
;
import
java.util.Map
;
/**
* 机构表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-03-10
*/
@Service
public
class
PensionOrganizationServiceImpl
extends
CrudServiceImpl
<
PensionOrganizationDao
,
PensionOrganizationEntity
,
PensionOrganizationDTO
>
implements
PensionOrganizationService
{
@Override
public
QueryWrapper
<
PensionOrganizationEntity
>
getWrapper
(
Map
<
String
,
Object
>
params
){
String
id
=
(
String
)
params
.
get
(
"id"
);
QueryWrapper
<
PensionOrganizationEntity
>
wrapper
=
new
QueryWrapper
<>();
wrapper
.
eq
(
StringUtils
.
isNotBlank
(
id
),
"id"
,
id
);
return
wrapper
;
}
}
\ No newline at end of file
hmit-admin/src/main/java/io/hmit/modules/serviceOrder/service/impl/PensionOrganizationServiceServiceImpl.java
0 → 100644
View file @
c24f1b73
package
io
.
hmit
.
modules
.
serviceOrder
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
io.hmit.common.service.impl.CrudServiceImpl
;
import
io.hmit.modules.serviceOrder.dao.PensionOrganizationServiceDao
;
import
io.hmit.modules.serviceOrder.dto.PensionOrganizationServiceDTO
;
import
io.hmit.modules.serviceOrder.entity.PensionOrganizationServiceEntity
;
import
io.hmit.modules.serviceOrder.service.PensionOrganizationServiceService
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Service
;
import
java.util.Map
;
/**
* 机构服务关系
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-03-10
*/
@Service
public
class
PensionOrganizationServiceServiceImpl
extends
CrudServiceImpl
<
PensionOrganizationServiceDao
,
PensionOrganizationServiceEntity
,
PensionOrganizationServiceDTO
>
implements
PensionOrganizationServiceService
{
@Override
public
QueryWrapper
<
PensionOrganizationServiceEntity
>
getWrapper
(
Map
<
String
,
Object
>
params
){
String
id
=
(
String
)
params
.
get
(
"id"
);
QueryWrapper
<
PensionOrganizationServiceEntity
>
wrapper
=
new
QueryWrapper
<>();
wrapper
.
eq
(
StringUtils
.
isNotBlank
(
id
),
"id"
,
id
);
return
wrapper
;
}
}
\ No newline at end of file
hmit-admin/src/main/resources/mapper/serviceOrder/PensionOrganizationDao.xml
0 → 100644
View file @
c24f1b73
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"io.hmit.modules.serviceOrder.dao.PensionOrganizationDao"
>
<resultMap
type=
"io.hmit.modules.serviceOrder.entity.PensionOrganizationEntity"
id=
"pensionOrganizationMap"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"name"
column=
"name"
/>
<result
property=
"icon"
column=
"icon"
/>
<result
property=
"description"
column=
"description"
/>
<result
property=
"creator"
column=
"creator"
/>
<result
property=
"createDate"
column=
"create_date"
/>
</resultMap>
</mapper>
\ No newline at end of file
hmit-admin/src/main/resources/mapper/serviceOrder/PensionOrganizationServiceDao.xml
0 → 100644
View file @
c24f1b73
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"io.hmit.modules.serviceOrder.dao.PensionOrganizationServiceDao"
>
<resultMap
type=
"io.hmit.modules.serviceOrder.entity.PensionOrganizationServiceEntity"
id=
"pensionOrganizationServiceMap"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"organizationId"
column=
"organization_id"
/>
<result
property=
"serviceId"
column=
"service_id"
/>
<result
property=
"creator"
column=
"creator"
/>
<result
property=
"createDate"
column=
"create_date"
/>
</resultMap>
</mapper>
\ No newline at end of file
hmit-api/pom.xml
View file @
c24f1b73
...
...
@@ -17,6 +17,24 @@
<artifactId>
hmit-common
</artifactId>
<version>
1.0.0
</version>
</dependency>
<dependency>
<groupId>
junit
</groupId>
<artifactId>
junit
</artifactId>
</dependency>
<dependency>
<groupId>
junit
</groupId>
<artifactId>
junit
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-test
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework
</groupId>
<artifactId>
spring-test
</artifactId>
<version>
${spring.version}
</version>
<scope>
compile
</scope>
</dependency>
</dependencies>
<build>
...
...
hmit-api/src/main/java/io/hmit/config/SwaggerConfig.java
View file @
c24f1b73
...
...
@@ -27,7 +27,7 @@ public class SwaggerConfig {
@Bean
public
Docket
createRestApi
()
{
return
new
Docket
(
DocumentationType
.
SWAGGER_2
)
.
host
(
"byyl.zjhmit.com"
)
//
.host("byyl.zjhmit.com")
.
apiInfo
(
apiInfo
())
.
select
()
//加了ApiOperation注解的类,才生成接口文档
...
...
hmit-api/src/main/java/io/hmit/modules/serviceOrder/controller/PensionOrderController.java
View file @
c24f1b73
package
io
.
hmit
.
modules
.
serviceOrder
.
controller
;
import
com.sun.xml.internal.bind.v2.TODO
;
import
io.hmit.annotation.Login
;
import
io.hmit.annotation.LoginUser
;
import
io.hmit.common.constant.Constant
;
...
...
@@ -18,7 +19,6 @@ import io.swagger.annotations.Api;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.models.auth.In
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
springfox.documentation.annotations.ApiIgnore
;
...
...
@@ -76,7 +76,7 @@ public class PensionOrderController {
@Login
@GetMapping
(
"getOrderPageByStatus"
)
@ApiOperation
(
value
=
"根据状态返回订单(志愿者)"
,
notes
=
"不能查看未接单订单"
)
@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"
)
,
...
...
@@ -120,6 +120,37 @@ public class PensionOrderController {
return
new
Result
<
PageData
<
PensionOrderDTO
>>().
ok
(
page
);
}
@Login
@GetMapping
(
"getAllOrderByCommunityUserIdPage"
)
@ApiOperation
(
"本社区全部订单(社工)"
)
@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
<
PensionOrderDTO
>>
getAllOrderByCommunityUserIdPage
(
@ApiIgnore
@LoginUser
UserEntity
user
,
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
){
PageData
<
PensionOrderDTO
>
page
=
pensionOrderService
.
getAllOrderByCommunityUserIdPage
(
params
,
user
.
getId
());
return
new
Result
<
PageData
<
PensionOrderDTO
>>().
ok
(
page
);
}
@Login
@GetMapping
(
"getElderAllOrderByCommunityUserIdPage"
)
@ApiOperation
(
"查询本社区某老人全部订单(社工)"
)
@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
=
"name"
,
value
=
"需要查询老人的名字"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"String"
)
,
@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
>>
getElderAllOrderByCommunityUserIdPage
(
@ApiIgnore
@LoginUser
UserEntity
user
,
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
){
PageData
<
PensionOrderDTO
>
page
=
pensionOrderService
.
getElderAllOrderByCommunityUserIdPage
(
params
,
user
.
getId
(),
params
.
get
(
"name"
).
toString
());
return
new
Result
<
PageData
<
PensionOrderDTO
>>().
ok
(
page
);
}
@Login
@GetMapping
(
"orderInfo/{id}"
)
@ApiOperation
(
"预约订单详情(志愿者)"
)
...
...
@@ -148,6 +179,72 @@ public class PensionOrderController {
return
new
Result
();
}
//新订单接口
/**
* 服务人员订单接口
*/
@Login
@GetMapping
(
"staff"
)
@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
=
"订单状态: 1待完成 2已完成 3已取消"
,
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
<
PensionOrderDTO
>>
staff
(
@ApiIgnore
@LoginUser
UserEntity
user
,
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
){
PageData
<
PensionOrderDTO
>
page
=
pensionOrderService
.
getOrderPageByStatus
(
params
,
user
.
getId
(),
Integer
.
parseInt
(
params
.
get
(
"status"
).
toString
()));
return
new
Result
<
PageData
<
PensionOrderDTO
>>().
ok
(
page
);
}
/**
* 机构订单接口
*/
@Login
@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
@LoginUser
UserEntity
user
,
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
){
//登录->查询登录人员所属机构ID->机构ID查询服务ID(List)->服务ID + 状态查询订单(List)
PageData
<
PensionOrderDTO
>
page
=
pensionOrderService
.
getOrganizationOrder
(
params
,
user
.
getId
());
return
new
Result
<
PageData
<
PensionOrderDTO
>>().
ok
(
page
);
}
/**
* 老人、子女订单接口
*/
@Login
@GetMapping
(
"elderFamily"
)
@ApiOperation
(
value
=
"全部/根据状态返回订单(老人/子女)"
,
notes
=
"老人、子女的待完成实际是机构处的已派发未接单+已接单"
)
@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未接单 6待完成 3已取消 4待评价 留空全部"
,
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
>>
elderFamily
(
@ApiIgnore
@LoginUser
UserEntity
user
,
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
){
Integer
status
=
null
;
if
(
null
!=
params
.
get
(
"status"
))
{
status
=
Integer
.
parseInt
(
params
.
get
(
"status"
).
toString
());
}
PageData
<
PensionOrderDTO
>
page
=
pensionOrderService
.
getElderAllOrderOrByStatusPage
(
params
,
user
.
getId
(),
status
);
return
new
Result
<
PageData
<
PensionOrderDTO
>>().
ok
(
page
);
}
//新订单接口
@GetMapping
(
"{id}"
)
@ApiOperation
(
"信息"
)
public
Result
<
PensionOrderDTO
>
get
(
@PathVariable
(
"id"
)
Long
id
){
...
...
hmit-api/src/main/java/io/hmit/modules/serviceOrder/controller/PensionOrderServiceController.java
View file @
c24f1b73
...
...
@@ -19,8 +19,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.web.bind.annotation.*
;
import
springfox.documentation.annotations.ApiIgnore
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
import
java.util.Map
;
...
...
hmit-api/src/main/java/io/hmit/modules/serviceOrder/controller/PensionOrganizationController.java
0 → 100644
View file @
c24f1b73
package
io
.
hmit
.
modules
.
serviceOrder
.
controller
;
import
io.hmit.common.constant.Constant
;
import
io.hmit.common.page.PageData
;
import
io.hmit.common.utils.Result
;
import
io.hmit.common.validator.AssertUtils
;
import
io.hmit.common.validator.ValidatorUtils
;
import
io.hmit.common.validator.group.AddGroup
;
import
io.hmit.common.validator.group.DefaultGroup
;
import
io.hmit.common.validator.group.UpdateGroup
;
import
io.hmit.modules.serviceOrder.dto.PensionOrganizationDTO
;
import
io.hmit.modules.serviceOrder.service.PensionOrganizationService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
springfox.documentation.annotations.ApiIgnore
;
import
java.util.Map
;
/**
* 机构表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-03-10
*/
@RestController
@RequestMapping
(
"serviceOrder/pensionorganization"
)
@Api
(
tags
=
"机构表"
)
public
class
PensionOrganizationController
{
@Autowired
private
PensionOrganizationService
pensionOrganizationService
;
@GetMapping
(
"page"
)
@ApiOperation
(
"分页"
)
@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
<
PensionOrganizationDTO
>>
page
(
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
){
PageData
<
PensionOrganizationDTO
>
page
=
pensionOrganizationService
.
page
(
params
);
return
new
Result
<
PageData
<
PensionOrganizationDTO
>>().
ok
(
page
);
}
@GetMapping
(
"{id}"
)
@ApiOperation
(
"信息"
)
public
Result
<
PensionOrganizationDTO
>
get
(
@PathVariable
(
"id"
)
Long
id
){
PensionOrganizationDTO
data
=
pensionOrganizationService
.
get
(
id
);
return
new
Result
<
PensionOrganizationDTO
>().
ok
(
data
);
}
@PostMapping
@ApiOperation
(
"保存"
)
public
Result
save
(
@RequestBody
PensionOrganizationDTO
dto
){
//校验数据
ValidatorUtils
.
validateEntity
(
dto
,
AddGroup
.
class
,
DefaultGroup
.
class
);
pensionOrganizationService
.
save
(
dto
);
return
new
Result
();
}
@PutMapping
@ApiOperation
(
"修改"
)
public
Result
update
(
@RequestBody
PensionOrganizationDTO
dto
){
//校验数据
ValidatorUtils
.
validateEntity
(
dto
,
UpdateGroup
.
class
,
DefaultGroup
.
class
);
pensionOrganizationService
.
update
(
dto
);
return
new
Result
();
}
@DeleteMapping
@ApiOperation
(
"删除"
)
public
Result
delete
(
@RequestBody
Long
[]
ids
){
//校验数据
AssertUtils
.
isArrayEmpty
(
ids
,
"id"
);
pensionOrganizationService
.
delete
(
ids
);
return
new
Result
();
}
}
\ No newline at end of file
hmit-api/src/main/java/io/hmit/modules/serviceOrder/controller/PensionOrganizationServiceController.java
0 → 100644
View file @
c24f1b73
package
io
.
hmit
.
modules
.
serviceOrder
.
controller
;
import
io.hmit.common.constant.Constant
;
import
io.hmit.common.page.PageData
;
import
io.hmit.common.utils.Result
;
import
io.hmit.common.validator.AssertUtils
;
import
io.hmit.common.validator.ValidatorUtils
;
import
io.hmit.common.validator.group.AddGroup
;
import
io.hmit.common.validator.group.DefaultGroup
;
import
io.hmit.common.validator.group.UpdateGroup
;
import
io.hmit.modules.serviceOrder.dto.PensionOrganizationServiceDTO
;
import
io.hmit.modules.serviceOrder.service.PensionOrganizationServiceService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
springfox.documentation.annotations.ApiIgnore
;
import
java.util.Map
;
/**
* 机构服务关系
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-03-10
*/
@RestController
@RequestMapping
(
"serviceOrder/pensionorganizationservice"
)
@Api
(
tags
=
"机构服务关系"
)
public
class
PensionOrganizationServiceController
{
@Autowired
private
PensionOrganizationServiceService
pensionOrganizationServiceService
;
@GetMapping
(
"page"
)
@ApiOperation
(
"分页"
)
@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
<
PensionOrganizationServiceDTO
>>
page
(
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
){
PageData
<
PensionOrganizationServiceDTO
>
page
=
pensionOrganizationServiceService
.
page
(
params
);
return
new
Result
<
PageData
<
PensionOrganizationServiceDTO
>>().
ok
(
page
);
}
@GetMapping
(
"{id}"
)
@ApiOperation
(
"信息"
)
public
Result
<
PensionOrganizationServiceDTO
>
get
(
@PathVariable
(
"id"
)
Long
id
){
PensionOrganizationServiceDTO
data
=
pensionOrganizationServiceService
.
get
(
id
);
return
new
Result
<
PensionOrganizationServiceDTO
>().
ok
(
data
);
}
@PostMapping
@ApiOperation
(
"保存"
)
public
Result
save
(
@RequestBody
PensionOrganizationServiceDTO
dto
){
//校验数据
ValidatorUtils
.
validateEntity
(
dto
,
AddGroup
.
class
,
DefaultGroup
.
class
);
pensionOrganizationServiceService
.
save
(
dto
);
return
new
Result
();
}
@PutMapping
@ApiOperation
(
"修改"
)
public
Result
update
(
@RequestBody
PensionOrganizationServiceDTO
dto
){
//校验数据
ValidatorUtils
.
validateEntity
(
dto
,
UpdateGroup
.
class
,
DefaultGroup
.
class
);
pensionOrganizationServiceService
.
update
(
dto
);
return
new
Result
();
}
@DeleteMapping
@ApiOperation
(
"删除"
)
public
Result
delete
(
@RequestBody
Long
[]
ids
){
//校验数据
AssertUtils
.
isArrayEmpty
(
ids
,
"id"
);
pensionOrganizationServiceService
.
delete
(
ids
);
return
new
Result
();
}
}
\ No newline at end of file
hmit-api/src/main/java/io/hmit/modules/serviceOrder/controller/PensionServiceController.java
View file @
c24f1b73
...
...
@@ -66,6 +66,39 @@ public class PensionServiceController {
}
@GetMapping
(
"getByServiceId/{serviceId}"
)
@ApiOperation
(
"根据服务获取详情页面"
)
public
Result
<
PensionServiceDTO
>
getByServiceId
(
@PathVariable
(
"serviceId"
)
Long
serviceId
){
PensionServiceDTO
data
=
pensionServiceService
.
get
(
serviceId
);
return
new
Result
<
PensionServiceDTO
>().
ok
(
data
);
}
@GetMapping
(
"getSecondListByServiceId"
)
@ApiOperation
(
"根据服务id获取二级列表--可查询免费"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"isFree"
,
value
=
"是否免费:1 是, 2 否"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"pid"
,
value
=
"服务大类ID"
,
paramType
=
"query"
,
dataType
=
"int"
)
})
public
Result
<
List
<
PensionServiceDTO
>>
getSecondListByServiceId
(
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
){
List
<
PensionServiceDTO
>
data
=
pensionServiceService
.
list
(
params
);
return
new
Result
<
List
<
PensionServiceDTO
>>().
ok
(
data
);
}
@GetMapping
(
"getServiceList"
)
@ApiOperation
(
"老人/子女服务大类--包含免费"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"isFree"
,
value
=
"是否免费:1 是, 2 否"
,
paramType
=
"query"
,
dataType
=
"String"
)
})
public
Result
<
List
<
PensionServiceDTO
>>
getServiceList
(
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
){
List
<
PensionServiceDTO
>
data
=
pensionServiceService
.
getFirstServiceList
(
params
);
return
new
Result
<
List
<
PensionServiceDTO
>>().
ok
(
data
);
}
/*
//V1 根据serviceType 获取服务大类
@GetMapping("getByServiceTypeId/{serviceTypeId}")
@ApiOperation("根据服务大类获取详情")
public Result<PensionServiceDTO> getByServiceTypeId(@PathVariable("serviceTypeId") Long serviceTypeId){
...
...
@@ -76,6 +109,7 @@ public class PensionServiceController {
return new Result<PensionServiceDTO>().ok(data.get(0));
}
*/
@PostMapping
@ApiOperation
(
"保存"
)
public
Result
save
(
@RequestBody
PensionServiceDTO
dto
){
...
...
hmit-api/src/main/java/io/hmit/modules/serviceOrder/dao/PensionOrderDao.java
View file @
c24f1b73
...
...
@@ -48,5 +48,27 @@ public interface PensionOrderDao extends BaseDao<PensionOrderEntity> {
*/
List
<
PensionOrderDTO
>
getElderAllOrderOrByStatusList
(
Map
<
String
,
Object
>
params
,
Long
creator
,
Integer
status
);
/**
* 社工:查询本社区全部订单(根据社区人员id查询所属社区内全部订单)
* @param page
* @param userId
* @return
*/
IPage
<
PensionOrderDTO
>
getAllOrderByCommunityUserIdPage
(
IPage
<
PensionOrderEntity
>
page
,
Long
userId
);
/**
* 社工:查询本社区某老人全部订单
* @param page
* @param userId
* @return
*/
IPage
<
PensionOrderDTO
>
getElderAllOrderByCommunityUserIdPage
(
IPage
<
PensionOrderEntity
>
page
,
Long
userId
,
String
appointmentPerson
);
/**
* 根据服务Id查询订单
* @param serviceId
* @return
*/
List
<
PensionOrderDTO
>
getAllOrderByServiceId
(
Long
serviceId
,
Integer
status
);
}
hmit-api/src/main/java/io/hmit/modules/serviceOrder/dao/PensionOrganizationDao.java
0 → 100644
View file @
c24f1b73
package
io
.
hmit
.
modules
.
serviceOrder
.
dao
;
import
io.hmit.common.dao.BaseDao
;
import
io.hmit.modules.serviceOrder.entity.PensionOrganizationEntity
;
import
org.apache.ibatis.annotations.Mapper
;
/**
* 机构表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-03-10
*/
@Mapper
public
interface
PensionOrganizationDao
extends
BaseDao
<
PensionOrganizationEntity
>
{
}
\ No newline at end of file
hmit-api/src/main/java/io/hmit/modules/serviceOrder/dao/PensionOrganizationServiceDao.java
0 → 100644
View file @
c24f1b73
package
io
.
hmit
.
modules
.
serviceOrder
.
dao
;
import
io.hmit.common.dao.BaseDao
;
import
io.hmit.modules.serviceOrder.entity.PensionOrganizationServiceEntity
;
import
org.apache.ibatis.annotations.Mapper
;
import
java.util.List
;
/**
* 机构服务关系
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-03-10
*/
@Mapper
public
interface
PensionOrganizationServiceDao
extends
BaseDao
<
PensionOrganizationServiceEntity
>
{
/**
* 根据用户Id查询出机构的全部服务ID
* @param userId
* @return
*/
List
<
Long
>
findServiceIdListByServiceUserId
(
Long
userId
);
}
\ No newline at end of file
hmit-api/src/main/java/io/hmit/modules/serviceOrder/dto/PensionOrganizationDTO.java
0 → 100644
View file @
c24f1b73
package
io
.
hmit
.
modules
.
serviceOrder
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 机构表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-03-10
*/
@Data
@ApiModel
(
value
=
"机构表"
)
public
class
PensionOrganizationDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"id"
)
private
Long
id
;
@ApiModelProperty
(
value
=
"机构名称"
)
private
String
name
;
@ApiModelProperty
(
value
=
"机构图标"
)
private
String
icon
;
@ApiModelProperty
(
value
=
"机构描述"
)
private
String
description
;
@ApiModelProperty
(
value
=
"创建者"
)
private
Long
creator
;
@ApiModelProperty
(
value
=
"创建时间"
)
private
Date
createDate
;
}
\ No newline at end of file
hmit-api/src/main/java/io/hmit/modules/serviceOrder/dto/PensionOrganizationServiceDTO.java
0 → 100644
View file @
c24f1b73
package
io
.
hmit
.
modules
.
serviceOrder
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 机构服务关系
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-03-10
*/
@Data
@ApiModel
(
value
=
"机构服务关系"
)
public
class
PensionOrganizationServiceDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"id"
)
private
Long
id
;
@ApiModelProperty
(
value
=
"机构ID"
)
private
Long
organizationId
;
@ApiModelProperty
(
value
=
"服务ID"
)
private
Long
serviceId
;
@ApiModelProperty
(
value
=
"创建者"
)
private
Long
creator
;
@ApiModelProperty
(
value
=
"创建时间"
)
private
Date
createDate
;
}
\ No newline at end of file
hmit-api/src/main/java/io/hmit/modules/serviceOrder/dto/PensionServiceDTO.java
View file @
c24f1b73
...
...
@@ -25,12 +25,12 @@ public class PensionServiceDTO implements Serializable {
@ApiModelProperty
(
value
=
"服务名称"
)
private
String
serviceName
;
@ApiModelProperty
(
value
=
"服务父类id"
)
private
Long
pid
;
@ApiModelProperty
(
value
=
"服务内容介绍"
)
private
String
serviceContent
;
@ApiModelProperty
(
value
=
"服务类型"
)
private
Long
serviceParentId
;
@ApiModelProperty
(
value
=
"排序"
)
private
Integer
sort
;
...
...
@@ -55,20 +55,4 @@ public class PensionServiceDTO implements Serializable {
@ApiModelProperty
(
value
=
"备注"
)
private
String
remark
;
@ApiModelProperty
(
value
=
"部门ID"
)
private
Long
deptId
;
@ApiModelProperty
(
value
=
"创建者"
)
private
Long
creator
;
@ApiModelProperty
(
value
=
"创建时间"
)
private
Date
createDate
;
@ApiModelProperty
(
value
=
"更新者"
)
private
Long
updater
;
@ApiModelProperty
(
value
=
"更新时间"
)
private
Date
updateDate
;
}
hmit-api/src/main/java/io/hmit/modules/serviceOrder/entity/PensionOrganizationEntity.java
0 → 100644
View file @
c24f1b73
package
io
.
hmit
.
modules
.
serviceOrder
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.hmit.common.entity.BaseEntity
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
/**
* 机构表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-03-10
*/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
@TableName
(
"pension_organization"
)
public
class
PensionOrganizationEntity
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 机构名称
*/
private
String
name
;
/**
* 机构图标
*/
private
String
icon
;
/**
* 机构描述
*/
private
String
description
;
}
\ No newline at end of file
hmit-api/src/main/java/io/hmit/modules/serviceOrder/entity/PensionOrganizationServiceEntity.java
0 → 100644
View file @
c24f1b73
package
io
.
hmit
.
modules
.
serviceOrder
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.hmit.common.entity.BaseEntity
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
/**
* 机构服务关系
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-03-10
*/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
@TableName
(
"pension_organization_service"
)
public
class
PensionOrganizationServiceEntity
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 机构ID
*/
private
Long
organizationId
;
/**
* 服务ID
*/
private
Long
serviceId
;
}
\ No newline at end of file
hmit-api/src/main/java/io/hmit/modules/serviceOrder/entity/PensionServiceEntity.java
View file @
c24f1b73
...
...
@@ -27,9 +27,10 @@ public class PensionServiceEntity extends BaseEntity {
// @Property(value = "name")
private
String
serviceName
;
/**
* 服务父类
ID
* 服务父类
id
*/
private
Long
serviceParentId
;
private
Long
pid
;
/**
* 排序
*/
...
...
hmit-api/src/main/java/io/hmit/modules/serviceOrder/service/PensionOrderService.java
View file @
c24f1b73
...
...
@@ -39,4 +39,12 @@ public interface PensionOrderService extends CrudService<PensionOrderEntity, Pen
//老人全部订单或根据订单状态查询
PageData
<
PensionOrderDTO
>
getElderAllOrderOrByStatusPage
(
Map
<
String
,
Object
>
params
,
Long
creator
,
Integer
status
);
//社工:查询本社区全部订单(根据社区人员id查询所属社区内全部订单)
PageData
<
PensionOrderDTO
>
getAllOrderByCommunityUserIdPage
(
Map
<
String
,
Object
>
params
,
Long
userId
);
//社工:查询本社区某老人全部订单(模糊查询)
PageData
<
PensionOrderDTO
>
getElderAllOrderByCommunityUserIdPage
(
Map
<
String
,
Object
>
params
,
Long
userId
,
String
appointmentPerson
);
//查询机构订单
PageData
<
PensionOrderDTO
>
getOrganizationOrder
(
Map
<
String
,
Object
>
params
,
Long
userId
);
}
hmit-api/src/main/java/io/hmit/modules/serviceOrder/service/PensionOrganizationService.java
0 → 100644
View file @
c24f1b73
package
io
.
hmit
.
modules
.
serviceOrder
.
service
;
import
io.hmit.common.service.CrudService
;
import
io.hmit.modules.serviceOrder.dto.PensionOrganizationDTO
;
import
io.hmit.modules.serviceOrder.entity.PensionOrganizationEntity
;
import
java.util.List
;
/**
* 机构表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-03-10
*/
public
interface
PensionOrganizationService
extends
CrudService
<
PensionOrganizationEntity
,
PensionOrganizationDTO
>
{
List
<
Long
>
findServiceIdListByServiceUserId
(
Long
userId
);
}
\ No newline at end of file
hmit-api/src/main/java/io/hmit/modules/serviceOrder/service/PensionOrganizationServiceService.java
0 → 100644
View file @
c24f1b73
package
io
.
hmit
.
modules
.
serviceOrder
.
service
;
import
io.hmit.common.service.CrudService
;
import
io.hmit.modules.serviceOrder.dto.PensionOrganizationServiceDTO
;
import
io.hmit.modules.serviceOrder.entity.PensionOrganizationServiceEntity
;
/**
* 机构服务关系
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-03-10
*/
public
interface
PensionOrganizationServiceService
extends
CrudService
<
PensionOrganizationServiceEntity
,
PensionOrganizationServiceDTO
>
{
}
\ No newline at end of file
hmit-api/src/main/java/io/hmit/modules/serviceOrder/service/PensionServiceService.java
View file @
c24f1b73
...
...
@@ -4,6 +4,9 @@ import io.hmit.common.service.CrudService;
import
io.hmit.modules.serviceOrder.dto.PensionServiceDTO
;
import
io.hmit.modules.serviceOrder.entity.PensionServiceEntity
;
import
java.util.List
;
import
java.util.Map
;
/**
* 服务表
*
...
...
@@ -12,4 +15,5 @@ import io.hmit.modules.serviceOrder.entity.PensionServiceEntity;
*/
public
interface
PensionServiceService
extends
CrudService
<
PensionServiceEntity
,
PensionServiceDTO
>
{
List
<
PensionServiceDTO
>
getFirstServiceList
(
Map
<
String
,
Object
>
params
);
}
hmit-api/src/main/java/io/hmit/modules/serviceOrder/service/impl/PensionOrderServiceImpl.java
View file @
c24f1b73
...
...
@@ -13,10 +13,12 @@ import io.hmit.modules.serviceOrder.dto.ReservationDTO;
import
io.hmit.modules.serviceOrder.entity.PensionOrderEntity
;
import
io.hmit.modules.serviceOrder.service.PensionOrderService
;
import
io.hmit.modules.serviceOrder.service.PensionOrderServiceService
;
import
io.hmit.modules.serviceOrder.service.PensionOrganizationService
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -45,6 +47,9 @@ public class PensionOrderServiceImpl extends CrudServiceImpl<PensionOrderDao, Pe
@Autowired
private
PensionOrderServiceService
pensionOrderServiceService
;
@Autowired
private
PensionOrganizationService
pensionOrganizationService
;
//查询全部订单
@Override
public
PageData
<
PensionOrderDTO
>
getAllOrderPage
(
Map
<
String
,
Object
>
params
,
Long
userId
)
{
...
...
@@ -102,8 +107,51 @@ public class PensionOrderServiceImpl extends CrudServiceImpl<PensionOrderDao, Pe
@Override
public
PageData
<
PensionOrderDTO
>
getElderAllOrderOrByStatusPage
(
Map
<
String
,
Object
>
params
,
Long
creator
,
Integer
status
)
{
IPage
<
PensionOrderEntity
>
page
=
getPage
(
params
,
Constant
.
CREATE_DATE
,
false
);
List
<
PensionOrderDTO
>
list
=
pensionOrderDao
.
getElderAllOrderOrByStatusList
(
params
,
creator
,
status
);
List
<
PensionOrderDTO
>
list
=
new
ArrayList
<>();
if
(
null
==
status
)
{
list
=
pensionOrderDao
.
getElderAllOrderOrByStatusList
(
params
,
creator
,
status
);
}
else
if
(
status
!=
6
)
{
list
=
pensionOrderDao
.
getElderAllOrderOrByStatusList
(
params
,
creator
,
status
);
}
else
{
List
<
PensionOrderDTO
>
list1
=
pensionOrderDao
.
getElderAllOrderOrByStatusList
(
params
,
creator
,
1
);
List
<
PensionOrderDTO
>
list2
=
pensionOrderDao
.
getElderAllOrderOrByStatusList
(
params
,
creator
,
5
);
list
.
addAll
(
list1
);
list
.
addAll
(
list2
);
}
page
.
setTotal
(
list
.
size
());
return
getPageData
(
list
,
page
.
getTotal
(),
PensionOrderDTO
.
class
);
}
@Override
public
PageData
<
PensionOrderDTO
>
getAllOrderByCommunityUserIdPage
(
Map
<
String
,
Object
>
params
,
Long
userId
)
{
IPage
<
PensionOrderEntity
>
page
=
getPage
(
params
,
Constant
.
CREATE_DATE
,
false
);
IPage
<
PensionOrderDTO
>
pensionOrderDTOIPage
=
pensionOrderDao
.
getAllOrderByCommunityUserIdPage
(
page
,
userId
);
return
getPageData
(
pensionOrderDTOIPage
,
PensionOrderDTO
.
class
);
}
@Override
public
PageData
<
PensionOrderDTO
>
getElderAllOrderByCommunityUserIdPage
(
Map
<
String
,
Object
>
params
,
Long
userId
,
String
appointmentPerson
)
{
IPage
<
PensionOrderEntity
>
page
=
getPage
(
params
,
Constant
.
CREATE_DATE
,
false
);
IPage
<
PensionOrderDTO
>
pensionOrderDTOIPage
=
pensionOrderDao
.
getElderAllOrderByCommunityUserIdPage
(
page
,
userId
,
appointmentPerson
);
return
getPageData
(
pensionOrderDTOIPage
,
PensionOrderDTO
.
class
);
}
@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"
))
{
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
());
return
getPageData
(
result
,
page
.
getTotal
(),
PensionOrderDTO
.
class
);
}
}
hmit-api/src/main/java/io/hmit/modules/serviceOrder/service/impl/PensionOrganizationServiceImpl.java
0 → 100644
View file @
c24f1b73
package
io
.
hmit
.
modules
.
serviceOrder
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
io.hmit.common.service.impl.CrudServiceImpl
;
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.entity.PensionOrganizationEntity
;
import
io.hmit.modules.serviceOrder.service.PensionOrganizationService
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.Map
;
/**
* 机构表
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-03-10
*/
@Service
public
class
PensionOrganizationServiceImpl
extends
CrudServiceImpl
<
PensionOrganizationDao
,
PensionOrganizationEntity
,
PensionOrganizationDTO
>
implements
PensionOrganizationService
{
@Override
public
QueryWrapper
<
PensionOrganizationEntity
>
getWrapper
(
Map
<
String
,
Object
>
params
){
String
id
=
(
String
)
params
.
get
(
"id"
);
QueryWrapper
<
PensionOrganizationEntity
>
wrapper
=
new
QueryWrapper
<>();
wrapper
.
eq
(
StringUtils
.
isNotBlank
(
id
),
"id"
,
id
);
return
wrapper
;
}
@Autowired
private
PensionOrganizationServiceDao
pensionOrganizationServiceDao
;
@Override
public
List
<
Long
>
findServiceIdListByServiceUserId
(
Long
userId
)
{
return
pensionOrganizationServiceDao
.
findServiceIdListByServiceUserId
(
userId
);
}
}
\ No newline at end of file
hmit-api/src/main/java/io/hmit/modules/serviceOrder/service/impl/PensionOrganizationServiceServiceImpl.java
0 → 100644
View file @
c24f1b73
package
io
.
hmit
.
modules
.
serviceOrder
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
io.hmit.common.service.impl.CrudServiceImpl
;
import
io.hmit.modules.serviceOrder.dao.PensionOrganizationServiceDao
;
import
io.hmit.modules.serviceOrder.dto.PensionOrganizationServiceDTO
;
import
io.hmit.modules.serviceOrder.entity.PensionOrganizationServiceEntity
;
import
io.hmit.modules.serviceOrder.service.PensionOrganizationServiceService
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Service
;
import
java.util.Map
;
/**
* 机构服务关系
*
* @author zsh 408538940@qq.com
* @since 1.0.0 2021-03-10
*/
@Service
public
class
PensionOrganizationServiceServiceImpl
extends
CrudServiceImpl
<
PensionOrganizationServiceDao
,
PensionOrganizationServiceEntity
,
PensionOrganizationServiceDTO
>
implements
PensionOrganizationServiceService
{
@Override
public
QueryWrapper
<
PensionOrganizationServiceEntity
>
getWrapper
(
Map
<
String
,
Object
>
params
){
String
id
=
(
String
)
params
.
get
(
"id"
);
QueryWrapper
<
PensionOrganizationServiceEntity
>
wrapper
=
new
QueryWrapper
<>();
wrapper
.
eq
(
StringUtils
.
isNotBlank
(
id
),
"id"
,
id
);
return
wrapper
;
}
}
\ No newline at end of file
hmit-api/src/main/java/io/hmit/modules/serviceOrder/service/impl/PensionServiceServiceImpl.java
View file @
c24f1b73
...
...
@@ -2,6 +2,7 @@ package io.hmit.modules.serviceOrder.service.impl;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
io.hmit.common.service.impl.CrudServiceImpl
;
import
io.hmit.common.utils.ConvertUtils
;
import
io.hmit.modules.serviceOrder.dao.PensionServiceDao
;
import
io.hmit.modules.serviceOrder.dto.PensionServiceDTO
;
import
io.hmit.modules.serviceOrder.entity.PensionServiceEntity
;
...
...
@@ -9,6 +10,8 @@ import io.hmit.modules.serviceOrder.service.PensionServiceService;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -24,17 +27,38 @@ public class PensionServiceServiceImpl extends CrudServiceImpl<PensionServiceDao
@Override
public
QueryWrapper
<
PensionServiceEntity
>
getWrapper
(
Map
<
String
,
Object
>
params
){
String
id
=
(
String
)
params
.
get
(
"id"
);
String
serviceTypeId
=
params
.
get
(
"serviceTypeId"
)
==
null
?
""
:
params
.
get
(
"serviceTypeI
d"
).
toString
();
String
pid
=
params
.
get
(
"pid"
)
==
null
?
""
:
params
.
get
(
"pi
d"
).
toString
();
String
isFree
=
(
String
)
params
.
get
(
"isFree"
);
QueryWrapper
<
PensionServiceEntity
>
wrapper
=
new
QueryWrapper
<>();
wrapper
.
eq
(
StringUtils
.
isNotBlank
(
id
),
"id"
,
id
);
wrapper
.
eq
(
StringUtils
.
isNotBlank
(
serviceTypeId
),
"service_type_id"
,
serviceTypeI
d
);
wrapper
.
eq
(
StringUtils
.
isNotBlank
(
pid
),
"pid"
,
pi
d
);
wrapper
.
eq
(
StringUtils
.
isNotBlank
(
isFree
),
"is_free"
,
isFree
);
return
wrapper
;
}
@Override
public
List
<
PensionServiceDTO
>
getFirstServiceList
(
Map
<
String
,
Object
>
params
)
{
String
isFree
=
(
String
)
params
.
get
(
"isFree"
);
List
<
PensionServiceEntity
>
pensionServiceLists
=
baseDao
.
selectList
(
new
QueryWrapper
<
PensionServiceEntity
>().
eq
(
"pid"
,
0
));
if
(!
""
.
equals
(
isFree
)
&&
isFree
!=
null
){
List
<
PensionServiceEntity
>
entityList
=
new
ArrayList
<>();
pensionServiceLists
.
stream
().
forEach
(
item
->{
Map
<
String
,
Object
>
pid
=
new
HashMap
<>();
pid
.
put
(
"pid"
,
item
.
getId
());
pid
.
put
(
"isFree"
,
isFree
);
if
(
list
(
pid
).
size
()>
0
){
entityList
.
add
(
item
);
}
});
return
ConvertUtils
.
sourceToTarget
(
entityList
,
PensionServiceDTO
.
class
)
;
}
return
ConvertUtils
.
sourceToTarget
(
pensionServiceLists
,
PensionServiceDTO
.
class
)
;
}
}
hmit-api/src/main/java/io/hmit/modules/serviceOrder/service/impl/PensionServiceTypeServiceImpl.java
View file @
c24f1b73
...
...
@@ -89,10 +89,12 @@ public class PensionServiceTypeServiceImpl extends CrudServiceImpl<PensionServic
// pensionServices.stream().collect(Collectors.groupingBy(PensionServiceEntity::getServiceTypeId))
List
<
PensionServiceTypeDTO
>
resultList
=
new
ArrayList
<>();
/*
for (PensionServiceEntity pensionService:pensionServices) {
PensionServiceTypeDTO pensionServiceTypeDTO = get(pensionService.getServiceParentId());
resultList.add(pensionServiceTypeDTO);
}
*/
return
resultList
;
}
}
hmit-api/src/main/resources/mapper/serviceOrder/PensionOrderDao.xml
View file @
c24f1b73
...
...
@@ -19,6 +19,9 @@
<result
property=
"orderRecipientName"
column=
"order_recipient_name"
/>
<result
property=
"orderRecipientTime"
column=
"order_recipient_time"
/>
<result
property=
"orderRecipientPhone"
column=
"order_recipient_phone"
/>
<result
property=
"actPrice"
column=
"act_price"
/>
<result
property=
"communityName"
column=
"community_name"
/>
<result
property=
"communityId"
column=
"community_id"
/>
<result
property=
"deptId"
column=
"dept_id"
/>
<result
property=
"creator"
column=
"creator"
/>
<result
property=
"creatorName"
column=
"creator_name"
/>
...
...
@@ -29,75 +32,128 @@
</resultMap>
<select
id=
"getOrderInfoByIdAndStatus"
resultType=
"io.hmit.modules.serviceOrder.entity.PensionOrderEntity"
>
SELECT * FROM pension_order WHERE pension_order.id = #{orderId} and pension_order.status = #{status}
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
FROM pension_order po
WHERE po.id = #{orderId} AND po.status = #{status}
</select>
<select
id=
"getOrderPageByStatusOrUserId"
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_phone, po.dept_id, po.creator, po.creator_name,
po.creator_tel, po.create_date, po.update_date, po.act_price, ps.icon
from pension_order po, pension_service ps
where po.service_id = ps.id
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
<if
test=
"status != null and status == 0"
>
<if
test=
"userId != null"
>
and order_recipient_id is null
AND po.order_recipient_id IS NULL
</if>
and
po.status = 0
AND
po.status = 0
</if>
<if
test=
"status != null and status != 0"
>
<if
test=
"userId != null"
>
and
order_recipient_id = #{userId}
AND po.
order_recipient_id = #{userId}
</if>
and
po.status = #{status}
AND
po.status = #{status}
</if>
<if
test=
"status == null and userId != null"
>
and
order_recipient_id = #{userId}
AND po.
order_recipient_id = #{userId}
</if>
</select>
<select
id=
"getOrderInfoByIdAndUserIdOrStatus"
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_phone, po.dept_id, po.creator, po.creator_name,
po.creator_tel, po.create_date, po.update_date, po.act_price, ps.icon
from pension_order po, pension_service ps
where po.service_id = ps.id and po.id = #{orderId}
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.id = #{orderId}
<if
test=
"userId != null"
>
and
po.order_recipient_id = #{userId}
AND
po.order_recipient_id = #{userId}
</if>
<if
test=
"status != null"
>
and
po.status = #{status}
AND
po.status = #{status}
</if>
</select>
<select
id=
"getTodayNoProceedOrderPage"
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_phone, po.dept_id, po.creator, po.creator_name,
po.creator_tel, po.create_date, po.update_date, po.act_price, ps.icon
from pension_order po, pension_service ps
where po.service_id = ps.id and TO_DAYS(appointment_time) = TO_DAYS(NOW()) and po.status = 0 and order_recipient_id IS NULL
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 TO_DAYS(appointment_time) = TO_DAYS(NOW()) AND po.status = 0 AND po.order_recipient_id IS NULL
</select>
<select
id=
"getElderTodayOrderPage"
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_phone, po.dept_id, po.creator, po.creator_name,
po.creator_tel, po.create_date, po.update_date, po.act_price, ps.icon
from pension_order po, pension_service ps
where po.service_id = ps.id and TO_DAYS(appointment_time) = TO_DAYS(NOW()) and po.creator = #{creator}
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 TO_DAYS(appointment_time) = TO_DAYS(NOW()) AND po.creator = #{creator}
</select>
<select
id=
"getElderAllOrderOrByStatusList"
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_phone, po.dept_id, po.creator, po.creator_name,
po.creator_tel, po.create_date, po.update_date, po.act_price, ps.icon
from pension_order po, pension_service ps
where po.service_id = ps.id and po.creator = #{creator}
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.creator = #{creator}
<if
test=
"status != null"
>
and po.status = #{status}
AND po.status = #{status}
</if>
</select>
<select
id=
"getAllOrderByCommunityUserIdPage"
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, tb_user tu
WHERE po.service_id = ps.id AND po.community_id = tu.community_id AND tu.id = #{userId}
</select>
<select
id=
"getElderAllOrderByCommunityUserIdPage"
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, tb_user tu
WHERE po.service_id = ps.id AND po.community_id = tu.community_id
AND tu.id = #{userId} AND po.appointment_person LIKE CONCAT('%', #{appointmentPerson}, '%')
</select>
<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>
...
...
hmit-api/src/main/resources/mapper/serviceOrder/PensionOrganizationDao.xml
0 → 100644
View file @
c24f1b73
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"io.hmit.modules.serviceOrder.dao.PensionOrganizationDao"
>
<resultMap
type=
"io.hmit.modules.serviceOrder.entity.PensionOrganizationEntity"
id=
"pensionOrganizationMap"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"name"
column=
"name"
/>
<result
property=
"icon"
column=
"icon"
/>
<result
property=
"description"
column=
"description"
/>
<result
property=
"creator"
column=
"creator"
/>
<result
property=
"createDate"
column=
"create_date"
/>
</resultMap>
</mapper>
\ No newline at end of file
hmit-api/src/main/resources/mapper/serviceOrder/PensionOrganizationServiceDao.xml
0 → 100644
View file @
c24f1b73
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"io.hmit.modules.serviceOrder.dao.PensionOrganizationServiceDao"
>
<resultMap
type=
"io.hmit.modules.serviceOrder.entity.PensionOrganizationServiceEntity"
id=
"pensionOrganizationServiceMap"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"organizationId"
column=
"organization_id"
/>
<result
property=
"serviceId"
column=
"service_id"
/>
<result
property=
"creator"
column=
"creator"
/>
<result
property=
"createDate"
column=
"create_date"
/>
</resultMap>
<select
id=
"findServiceIdListByServiceUserId"
resultType=
"Long"
>
SELECT pos.service_id FROM pension_organization_user pou, pension_organization_service pos
WHERE pou.organization_id = pos.organization_id and pou.user_id = #{userId}
</select>
</mapper>
\ No newline at end of file
hmit-common/src/main/java/io/hmit/common/constant/Constant.java
View file @
c24f1b73
...
...
@@ -188,9 +188,9 @@ public interface Constant {
BOOKED
(
0
,
"未接单"
),
/**
* 已接单
* 已
派发/待完成/已
接单
*/
ORDER
(
1
,
"已
接单
"
),
ORDER
(
1
,
"已
派发
"
),
/**
* 已完成
*/
...
...
@@ -198,7 +198,15 @@ public interface Constant {
/**
* 已取消
*/
CANCEL
(
3
,
"已取消"
);
CANCEL
(
3
,
"已取消"
),
/**
* 待评价
*/
WAIT_EVALUATE
(
4
,
"待评价"
),
/**
* 已接单未派发/待完成
*/
HAND_OUT
(
5
,
"已接单未派发"
);
private
int
status
;
...
...
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