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
a1990569
Commit
a1990569
authored
3 years ago
by
Shen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. 添加活动状态枚举类
2. 优化静态资源访问 3. 用户注册身份证信息非必填 4. 添加服务根据前端返回机构id添加绑定机构
parent
0df4f6ae
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
97 additions
and
28 deletions
+97
-28
SwaggerConfig.java
...in/src/main/java/io/hmit/common/config/SwaggerConfig.java
+1
-1
WebMvcConfig.java
...in/java/io/hmit/modules/security/config/WebMvcConfig.java
+5
-2
PensionServiceController.java
...les/serviceOrder/controller/PensionServiceController.java
+12
-0
PensionServiceDTO.java
...a/io/hmit/modules/serviceOrder/dto/PensionServiceDTO.java
+3
-0
application.yml
hmit-admin/src/main/resources/application.yml
+3
-2
WebMvcConfig.java
hmit-api/src/main/java/io/hmit/config/WebMvcConfig.java
+5
-2
PensionOrderController.java
...dules/serviceOrder/controller/PensionOrderController.java
+6
-4
PensionOrderServiceImpl.java
...es/serviceOrder/service/impl/PensionOrderServiceImpl.java
+15
-3
UserServiceImpl.java
...i/src/main/java/io/hmit/service/impl/UserServiceImpl.java
+17
-13
application.yml
hmit-api/src/main/resources/application.yml
+2
-1
EventEnum.java
...-common/src/main/java/io/hmit/common/enums/EventEnum.java
+28
-0
No files found.
hmit-admin/src/main/java/io/hmit/common/config/SwaggerConfig.java
View file @
a1990569
...
...
@@ -33,7 +33,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注解的类,生成接口文档
...
...
This diff is collapsed.
Click to expand it.
hmit-admin/src/main/java/io/hmit/modules/security/config/WebMvcConfig.java
View file @
a1990569
...
...
@@ -5,6 +5,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import
com.fasterxml.jackson.databind.module.SimpleModule
;
import
com.fasterxml.jackson.databind.ser.std.ToStringSerializer
;
import
io.hmit.common.utils.DateUtils
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.http.converter.ByteArrayHttpMessageConverter
;
...
...
@@ -24,11 +25,13 @@ import java.util.TimeZone;
@Configuration
public
class
WebMvcConfig
implements
WebMvcConfigurer
{
@Value
(
"${QR.download-path}"
)
private
String
QRPath
;
@Override
public
void
addResourceHandlers
(
ResourceHandlerRegistry
registry
)
{
registry
.
addResourceHandler
(
"/swagger2/**"
).
addResourceLocations
(
"classpath:/swagger2/"
);
registry
.
addResourceHandler
(
"/static/**"
).
addResourceLocations
(
"file:/home/websoft/java_jar/pension_service/myfile/"
);
// registry.addResourceHandler("/static/**").addResourceLocations("file:D:/upload/pension/");
registry
.
addResourceHandler
(
"/static/**"
).
addResourceLocations
(
"file:"
+
QRPath
);
}
@Override
...
...
This diff is collapsed.
Click to expand it.
hmit-admin/src/main/java/io/hmit/modules/serviceOrder/controller/PensionServiceController.java
View file @
a1990569
...
...
@@ -10,9 +10,12 @@ 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.security.user.SecurityUser
;
import
io.hmit.modules.serviceOrder.dto.PensionOrganizationServiceDTO
;
import
io.hmit.modules.serviceOrder.dto.PensionServiceDTO
;
import
io.hmit.modules.serviceOrder.dto.PensionServiceDocumentDTO
;
import
io.hmit.modules.serviceOrder.excel.PensionServiceExcel
;
import
io.hmit.modules.serviceOrder.service.PensionOrganizationServiceService
;
import
io.hmit.modules.serviceOrder.service.PensionServiceDocumentService
;
import
io.hmit.modules.serviceOrder.service.PensionServiceService
;
import
io.swagger.annotations.Api
;
...
...
@@ -45,6 +48,9 @@ public class PensionServiceController {
@Autowired
private
PensionServiceDocumentService
pensionServiceDocumentService
;
@Autowired
private
PensionOrganizationServiceService
pensionOrganizationServiceService
;
@GetMapping
(
"page"
)
@ApiOperation
(
"分页"
)
@ApiImplicitParams
({
...
...
@@ -107,6 +113,12 @@ public class PensionServiceController {
pensionServiceService
.
save
(
dto
);
PensionOrganizationServiceDTO
pensionOrganizationServiceDTO
=
new
PensionOrganizationServiceDTO
();
pensionOrganizationServiceDTO
.
setServiceId
(
dto
.
getId
());
pensionOrganizationServiceDTO
.
setOrganizationId
(
dto
.
getServiceOrgId
());
pensionOrganizationServiceDTO
.
setCreator
(
SecurityUser
.
getUserId
());
pensionOrganizationServiceService
.
save
(
pensionOrganizationServiceDTO
);
//保存服务详情页面的轮播图
List
<
PensionServiceDocumentDTO
>
pensionServiceDocumentDTOList
=
dto
.
getPensionServiceDocumentDTOList
();
if
(
pensionServiceDocumentDTOList
!=
null
){
...
...
This diff is collapsed.
Click to expand it.
hmit-admin/src/main/java/io/hmit/modules/serviceOrder/dto/PensionServiceDTO.java
View file @
a1990569
...
...
@@ -36,6 +36,9 @@ public class PensionServiceDTO extends TreeNode<PensionServiceDTO> implements Se
@ApiModelProperty
(
value
=
"服务父类id"
)
private
Long
pid
;
@ApiModelProperty
(
value
=
"服务机构"
)
private
Long
serviceOrgId
;
@ApiModelProperty
(
value
=
"排序"
)
private
Integer
sort
;
...
...
This diff is collapsed.
Click to expand it.
hmit-admin/src/main/resources/application.yml
View file @
a1990569
...
...
@@ -72,6 +72,7 @@ mybatis-plus:
call-setters-on-nulls
:
true
jdbc-type-for-null
:
'
null'
QR
:
# download-path: D:/upload/pension/
download-path
:
D:/upload/pension/
# download-path: /home/websoft/java_jar/pension_service/myfile/
# download-path: /home/resourse/bsqzc/ D:/123/ /home/websoft/java_jar/pension_service/myfile/
download-path
:
/home/websoft/java_jar/pension_service/myfile/
#此处修改需要在io.hmit.modules.security.config.WebMvcConfig 修改静态资源位置
\ No newline at end of file
This diff is collapsed.
Click to expand it.
hmit-api/src/main/java/io/hmit/config/WebMvcConfig.java
View file @
a1990569
...
...
@@ -8,6 +8,7 @@ import io.hmit.common.utils.DateUtils;
import
io.hmit.interceptor.AuthorizationInterceptor
;
import
io.hmit.resolver.LoginUserHandlerMethodArgumentResolver
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.http.converter.ByteArrayHttpMessageConverter
;
...
...
@@ -33,11 +34,13 @@ import java.util.TimeZone;
@Configuration
public
class
WebMvcConfig
implements
WebMvcConfigurer
{
@Value
(
"${QR.download-path}"
)
private
String
QRPath
;
@Override
public
void
addResourceHandlers
(
ResourceHandlerRegistry
registry
)
{
registry
.
addResourceHandler
(
"/swagger2/**"
).
addResourceLocations
(
"classpath:/swagger2/"
);
registry
.
addResourceHandler
(
"/static/**"
).
addResourceLocations
(
"file:/home/websoft/java_jar/pension_service/myfile/"
);
// registry.addResourceHandler("/static/**").addResourceLocations("file:D:/123/");
registry
.
addResourceHandler
(
"/static/**"
).
addResourceLocations
(
"file:"
+
QRPath
);
}
@Autowired
...
...
This diff is collapsed.
Click to expand it.
hmit-api/src/main/java/io/hmit/modules/serviceOrder/controller/PensionOrderController.java
View file @
a1990569
...
...
@@ -388,12 +388,14 @@ public class PensionOrderController {
*/
@Login
@GetMapping
(
"organizationHandle"
)
@ApiOperation
(
value
=
"机构处理(机构)"
,
notes
=
"传参为1(派单)时,
recipient_id必传
;传参为3(取消)时,cancel_reason必传;"
)
@ApiOperation
(
value
=
"机构处理(机构)"
,
notes
=
"传参为1(派单)时,
需要recipient_id和appointment_time
;传参为3(取消)时,cancel_reason必传;"
)
@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"
)
,
@ApiImplicitParam
(
name
=
"cancel_reason"
,
value
=
"订单取消原因"
,
paramType
=
"query"
,
dataType
=
"String"
)
@ApiImplicitParam
(
name
=
"status"
,
value
=
"处理状态: 5接单 1派单 3取消 4机构完成"
,
paramType
=
"query"
,
required
=
true
,
dataType
=
"int"
)
,
@ApiImplicitParam
(
name
=
"recipientId"
,
value
=
"接单服务人员ID"
,
paramType
=
"query"
,
dataType
=
"long"
)
,
@ApiImplicitParam
(
name
=
"appointmentTime"
,
value
=
"预约时间"
,
paramType
=
"query"
,
dataType
=
"Date"
)
,
@ApiImplicitParam
(
name
=
"cancelReason"
,
value
=
"订单取消原因"
,
paramType
=
"query"
,
dataType
=
"String"
),
@ApiImplicitParam
(
name
=
"remark"
,
value
=
"备注"
,
paramType
=
"query"
,
defaultValue
=
"null"
,
dataType
=
"String"
)
})
public
Result
organizationHandle
(
@ApiIgnore
@LoginUser
UserEntity
user
,
@ApiIgnore
@RequestParam
Map
<
String
,
Object
>
params
){
...
...
This diff is collapsed.
Click to expand it.
hmit-api/src/main/java/io/hmit/modules/serviceOrder/service/impl/PensionOrderServiceImpl.java
View file @
a1990569
...
...
@@ -18,6 +18,7 @@ import org.apache.commons.lang3.StringUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.stream.Collectors
;
...
...
@@ -176,17 +177,22 @@ public class PensionOrderServiceImpl extends CrudServiceImpl<PensionOrderDao, Pe
//userId 可用于校验是否属于本机构的订单,暂未使用
Long
orderId
=
Long
.
parseLong
(
params
.
get
(
"id"
).
toString
());
PensionOrderEntity
pensionOrderEntity
=
pensionOrderDao
.
selectById
(
orderId
);
Integer
status
=
Integer
.
parseInt
(
params
.
get
(
"status"
).
toString
());
pensionOrderEntity
.
setRemark
(
null
!=
params
.
get
(
"remark"
)
?
params
.
get
(
"remark"
).
toString
()
:
""
);
int
status
=
Integer
.
parseInt
(
params
.
get
(
"status"
).
toString
());
if
(
status
==
5
)
{
//接单
if
(
pensionOrderEntity
.
getStatus
()
==
0
)
{
pensionOrderEntity
.
setStatus
(
5
);
pensionOrderEntity
.
setStatusName
(
Constant
.
OrderStatus
.
HAND_OUT
.
getMessage
());
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
try
{
pensionOrderEntity
.
setAppointmentTime
(
sdf
.
parse
(
params
.
get
(
"appointmentTime"
).
toString
()));
}
catch
(
Exception
ignored
){}
update
(
ConvertUtils
.
sourceToTarget
(
pensionOrderEntity
,
PensionOrderDTO
.
class
));
}
else
{
return
false
;
}
}
else
if
(
status
==
1
){
//派单
Long
recipient_id
=
Long
.
parseLong
(
params
.
get
(
"recipient
_i
d"
).
toString
());
Long
recipient_id
=
Long
.
parseLong
(
params
.
get
(
"recipient
I
d"
).
toString
());
if
(
pensionOrderEntity
.
getStatus
()
==
5
||
pensionOrderEntity
.
getStatus
()
==
0
)
{
pensionOrderEntity
.
setStatus
(
1
);
pensionOrderEntity
.
setStatusName
(
Constant
.
OrderStatus
.
ORDER
.
getMessage
());
...
...
@@ -203,11 +209,17 @@ public class PensionOrderServiceImpl extends CrudServiceImpl<PensionOrderDao, Pe
if
(
pensionOrderEntity
.
getStatus
()
!=
2
&&
pensionOrderEntity
.
getStatus
()
!=
4
)
{
pensionOrderEntity
.
setStatus
(
3
);
pensionOrderEntity
.
setStatusName
(
Constant
.
OrderStatus
.
CANCEL
.
getMessage
());
pensionOrderEntity
.
setCancelReason
(
params
.
get
(
"cancel
_r
eason"
).
toString
());
pensionOrderEntity
.
setCancelReason
(
params
.
get
(
"cancel
R
eason"
).
toString
());
update
(
ConvertUtils
.
sourceToTarget
(
pensionOrderEntity
,
PensionOrderDTO
.
class
));
}
else
{
return
false
;
}
}
else
if
(
status
==
4
)
{
if
(
pensionOrderEntity
.
getStatus
()
==
Constant
.
OrderStatus
.
ORDER
.
geStatus
())
{
pensionOrderEntity
.
setStatus
(
Constant
.
OrderStatus
.
WAIT_EVALUATE
.
geStatus
());
pensionOrderEntity
.
setStatusName
(
Constant
.
OrderStatus
.
WAIT_EVALUATE
.
getMessage
());
update
(
ConvertUtils
.
sourceToTarget
(
pensionOrderEntity
,
PensionOrderDTO
.
class
));
}
}
return
true
;
}
...
...
This diff is collapsed.
Click to expand it.
hmit-api/src/main/java/io/hmit/service/impl/UserServiceImpl.java
View file @
a1990569
...
...
@@ -157,7 +157,9 @@ public class UserServiceImpl extends BaseServiceImpl<UserDao, UserEntity> implem
userEntity
=
new
UserEntity
();
userEntity
.
setUsername
(
dto
.
getUsername
());
userEntity
.
setMobile
(
dto
.
getMobile
());
if
(
null
!=
userEntity
.
getPassword
())
{
userEntity
.
setPassword
(
DigestUtils
.
sha256Hex
(
dto
.
getIdCardNo
().
toString
()));
}
userEntity
.
setAddress
(
dto
.
getAddress
());
userEntity
.
setAddressArea
(
dto
.
getAddressArea
());
userEntity
.
setCommunityId
(
dto
.
getCommunityId
());
...
...
@@ -165,6 +167,7 @@ public class UserServiceImpl extends BaseServiceImpl<UserDao, UserEntity> implem
userEntity
.
setIdCardNo
(
dto
.
getIdCardNo
());
userEntity
.
setCommunityName
(
dto
.
getCommunityName
());
userEntity
.
setHealthStatus
(
"良好"
);
//TODO
if
(
null
!=
dto
.
getIdCardNo
())
{
String
year
=
dto
.
getIdCardNo
().
toString
().
substring
(
6
,
10
);
String
month
=
dto
.
getIdCardNo
().
toString
().
substring
(
10
,
12
);
String
day
=
dto
.
getIdCardNo
().
toString
().
substring
(
12
,
14
);
...
...
@@ -178,6 +181,7 @@ public class UserServiceImpl extends BaseServiceImpl<UserDao, UserEntity> implem
}
userEntity
.
setBirthday
(
date
);
userEntity
.
setGender
(
Integer
.
parseInt
(
dto
.
getIdCardNo
().
toString
().
substring
(
16
,
17
))
%
2
==
1
?
"男"
:
"女"
);
}
userEntity
.
setOpenid
(
dto
.
getOpenid
());
insert
(
userEntity
);
UserEntity
byOpenId
=
getByOpenId
(
dto
.
getOpenid
());
...
...
This diff is collapsed.
Click to expand it.
hmit-api/src/main/resources/application.yml
View file @
a1990569
...
...
@@ -77,5 +77,6 @@ QR:
wechat
:
mpAppId
:
wx6e3288074243a47f
mpAppSecret
:
603d6ebf4db906bdb24eb9a1c0cbb444
mpAppSecret
:
f7b1120a49de078dd1be0080832ad42f
# mpAppSecret: 603d6ebf4db906bdb24eb9a1c0cbb444
templateId
:
_7PQQku6jHU4yE42NZIbX9cyvRWeeMSAGKhhs0uzWYM
\ No newline at end of file
This diff is collapsed.
Click to expand it.
hmit-common/src/main/java/io/hmit/common/enums/EventEnum.java
0 → 100644
View file @
a1990569
package
io
.
hmit
.
common
.
enums
;
import
lombok.Getter
;
/**
* @Description : 活动状态枚举类
* @Author : Shen Yuanfeng
* @Date : 2021/5/12 15:35
*/
@Getter
public
enum
EventEnum
{
NEW
(
0
,
"未发布(草稿)"
),
SUCCESS
(
1
,
"已发布(可报名)"
),
CANCEL
(
2
,
"结束报名"
),
COMPLETE
(
3
,
"活动结束"
),
SIGNED
(
4
,
"隐藏"
),
;
private
Integer
code
;
private
String
msg
;
EventEnum
(
Integer
code
,
String
msg
)
{
this
.
code
=
code
;
this
.
msg
=
msg
;
}
}
This diff is collapsed.
Click to expand it.
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