Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
refined-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
refined-platform
Commits
514e8130
Commit
514e8130
authored
Apr 20, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加服务追踪
parent
e0ba2cd8
Changes
29
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
982 additions
and
640 deletions
+982
-640
refined-manager-ui/admin/.env
refined-manager-ui/admin/.env
+3
-0
refined-manager-ui/admin/.env.production
refined-manager-ui/admin/.env.production
+3
-0
refined-manager-ui/admin/src/assets/utils/ajax.js
refined-manager-ui/admin/src/assets/utils/ajax.js
+2
-35
refined-manager-ui/admin/src/components/HeaderSite.vue
refined-manager-ui/admin/src/components/HeaderSite.vue
+4
-5
refined-manager-ui/admin/src/views/appointment/config/list.vue
...ed-manager-ui/admin/src/views/appointment/config/list.vue
+113
-112
refined-manager-ui/admin/src/views/appointment/constraint/dialogshow.vue
...-ui/admin/src/views/appointment/constraint/dialogshow.vue
+109
-116
refined-manager-ui/admin/src/views/appointment/constraint/list.vue
...anager-ui/admin/src/views/appointment/constraint/list.vue
+6
-0
refined-manager-ui/admin/src/views/care/config/list.vue
refined-manager-ui/admin/src/views/care/config/list.vue
+4
-3
refined-manager-ui/admin/src/views/care/constraint/dialogshow.vue
...manager-ui/admin/src/views/care/constraint/dialogshow.vue
+1
-78
refined-manager-ui/admin/src/views/care/constraint/list.vue
refined-manager-ui/admin/src/views/care/constraint/list.vue
+169
-0
refined-manager-ui/admin/src/views/care/constraint/track/dialogshow.vue
...r-ui/admin/src/views/care/constraint/track/dialogshow.vue
+160
-111
refined-manager-ui/admin/src/views/care/constraint/track/list.vue
...manager-ui/admin/src/views/care/constraint/track/list.vue
+1
-2
refined-manager-ui/admin/src/views/care/constraint/trackDrawerShow.vue
...er-ui/admin/src/views/care/constraint/trackDrawerShow.vue
+99
-36
refined-manager-ui/admin/src/views/notice/dialogshow.vue
refined-manager-ui/admin/src/views/notice/dialogshow.vue
+10
-9
refined-manager-ui/admin/src/views/notice/list.vue
refined-manager-ui/admin/src/views/notice/list.vue
+7
-10
refined-manager-ui/admin/src/views/notice/view.vue
refined-manager-ui/admin/src/views/notice/view.vue
+9
-11
refined-manager/src/main/java/com/mortals/xhx/daemon/task/SyncSubmitAppointTaskImpl.java
...om/mortals/xhx/daemon/task/SyncSubmitAppointTaskImpl.java
+23
-19
refined-manager/src/main/java/com/mortals/xhx/module/appointment/service/AppointmentRecordsService.java
...module/appointment/service/AppointmentRecordsService.java
+8
-0
refined-manager/src/main/java/com/mortals/xhx/module/appointment/service/impl/AppointmentConfigServiceImpl.java
...ppointment/service/impl/AppointmentConfigServiceImpl.java
+20
-20
refined-manager/src/main/java/com/mortals/xhx/module/appointment/service/impl/AppointmentConstraintServiceImpl.java
...ntment/service/impl/AppointmentConstraintServiceImpl.java
+16
-7
refined-manager/src/main/java/com/mortals/xhx/module/appointment/service/impl/AppointmentRecordsServiceImpl.java
...pointment/service/impl/AppointmentRecordsServiceImpl.java
+80
-7
refined-manager/src/main/java/com/mortals/xhx/module/appointment/web/AppointmentConfigController.java
...x/module/appointment/web/AppointmentConfigController.java
+11
-2
refined-manager/src/main/java/com/mortals/xhx/module/care/model/CareConfigEntity.java
...a/com/mortals/xhx/module/care/model/CareConfigEntity.java
+2
-2
refined-manager/src/main/java/com/mortals/xhx/module/care/service/impl/CareConfigServiceImpl.java
...s/xhx/module/care/service/impl/CareConfigServiceImpl.java
+21
-20
refined-manager/src/main/java/com/mortals/xhx/module/care/service/impl/CareConstraintServiceImpl.java
...x/module/care/service/impl/CareConstraintServiceImpl.java
+30
-20
refined-manager/src/main/java/com/mortals/xhx/module/care/service/impl/CareConstraintTrackServiceImpl.java
...ule/care/service/impl/CareConstraintTrackServiceImpl.java
+22
-7
refined-manager/src/main/java/com/mortals/xhx/module/care/service/impl/CareRecordsServiceImpl.java
.../xhx/module/care/service/impl/CareRecordsServiceImpl.java
+26
-6
refined-manager/src/main/java/com/mortals/xhx/module/care/web/CareConfigController.java
...com/mortals/xhx/module/care/web/CareConfigController.java
+11
-1
refined-manager/src/main/java/com/mortals/xhx/module/notice/web/NoticeController.java
...a/com/mortals/xhx/module/notice/web/NoticeController.java
+12
-1
No files found.
refined-manager-ui/admin/.env
View file @
514e8130
...
@@ -12,3 +12,6 @@ VUE_APP_PORTAL_URL = /portal_home
...
@@ -12,3 +12,6 @@ VUE_APP_PORTAL_URL = /portal_home
VUE_APP_PORTAL_PORT = 21080
VUE_APP_PORTAL_PORT = 21080
# 站点请求地址
VUE_APP_SITETREE_URL = http://192.168.0.98:11078/base/site/siteTree
refined-manager-ui/admin/.env.production
View file @
514e8130
...
@@ -11,3 +11,6 @@ VUE_APP_WEBSOCKET_API =
...
@@ -11,3 +11,6 @@ VUE_APP_WEBSOCKET_API =
VUE_APP_PORTAL_URL = /portal_home
VUE_APP_PORTAL_URL = /portal_home
VUE_APP_PORTAL_PORT = 11089
VUE_APP_PORTAL_PORT = 11089
# 站点请求地址
VUE_APP_SITETREE_URL = /basics_api/base/site/siteTree
refined-manager-ui/admin/src/assets/utils/ajax.js
View file @
514e8130
...
@@ -10,38 +10,6 @@ const instance = axios.create({
...
@@ -10,38 +10,6 @@ const instance = axios.create({
post
:
{
post
:
{
'
Content-Type
'
:
'
application/json;charset=UTF-8
'
,
'
Content-Type
'
:
'
application/json;charset=UTF-8
'
,
'
dataType
'
:
'
json
'
,
'
dataType
'
:
'
json
'
,
}
}
},
},
transformResponse
:
[
data
=>
{
transformResponse
:
[
data
=>
{
...
@@ -64,12 +32,11 @@ instance.interceptors.request.use(config => {
...
@@ -64,12 +32,11 @@ instance.interceptors.request.use(config => {
// 动态修改请求地址
// 动态修改请求地址
console
.
log
(
config
.
url
)
if
(
config
.
url
.
startsWith
(
'
/
'
))
{
if
(
config
.
url
.
startsWith
(
'
/
'
))
{
// 字符串以 / 开头
// 字符串以 / 开头
config
.
url
=
`http://
${
hostname
}
:
${
port
}${
baseURL
}${
config
.
url
}
`
;
config
.
url
=
`http://
${
hostname
}
:
${
port
}${
baseURL
}${
config
.
url
}
`
;
}
else
{
config
.
url
=
`http://
${
hostname
}
:
${
port
}${
baseURL
}
/
${
config
.
url
}
`
;
// 字符串不以 / 开头
}
}
//config.url = `http://${hostname}:${port}${baseURL}/${config.url}`;
//config.url = `http://${hostname}:${port}${baseURL}/${config.url}`;
...
...
refined-manager-ui/admin/src/components/HeaderSite.vue
View file @
514e8130
...
@@ -43,9 +43,9 @@
...
@@ -43,9 +43,9 @@
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
//
import { getSiteTree } from "@/services/businessMatter";
//
import { getSiteTree } from "@/services/businessMatter";
import
session
from
"
@/assets/utils/session
"
;
import
session
from
"
@/assets/utils/session
"
;
//
import Cookie from "js-cookie";
//
import Cookie from "js-cookie";
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
...
@@ -107,13 +107,12 @@ export default {
...
@@ -107,13 +107,12 @@ export default {
// this.getwaitedListdata(id);
// this.getwaitedListdata(id);
},
},
getwaitedListdata
()
{
getwaitedListdata
()
{
console
.
log
(
111111111111111
)
let
url
=
let
url
=
process
.
env
.
VUE_APP_SITETREE_URL
==
"
undefined
"
process
.
env
.
VUE_APP_SITETREE_URL
==
"
undefined
"
?
"
http://192.168.0.98:11078/base/site/siteTree
"
?
"
http://192.168.0.98:11078/base/site/siteTree
"
:
process
.
env
.
VUE_APP_SITETREE_URL
;
:
process
.
env
.
VUE_APP_SITETREE_URL
;
console
.
log
(
url
)
this
.
$get
(
url
).
then
((
res
)
=>
{
this
.
$get
(
url
).
then
((
res
)
=>
{
const
{
siteTree
}
=
res
.
data
;
const
{
siteTree
}
=
res
.
data
;
this
.
sitelist
=
siteTree
;
this
.
sitelist
=
siteTree
;
...
...
refined-manager-ui/admin/src/views/appointment/config/list.vue
View file @
514e8130
<
template
>
<
template
>
<div
class=
"page"
>
<div
class=
"page"
>
<LayoutTable
:data=
"tableData"
:config=
"tableConfig"
>
<LayoutTable
:data=
"tableData"
:config=
"tableConfig"
>
</LayoutTable>
</LayoutTable>
<dialog-show
ref=
"dialogform"
@
ok=
"getData"
/>
<dialog-show
ref=
"dialogform"
@
ok=
"getData"
/>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
/** 表单弹出框模式需引入 */
/** 表单弹出框模式需引入 */
import
dialogShow
from
"
./dialogshow
"
;
import
dialogShow
from
"
./dialogshow
"
;
import
table
from
"
@/assets/mixins/table
"
;
import
table
from
"
@/assets/mixins/table
"
;
export
default
{
name
:
"
AppointmentConfigList
"
,
export
default
{
components
:
{
name
:
"
AppointmentConfigList
"
,
dialogShow
components
:
{
},
dialogShow
mixins
:
[
table
],
},
created
()
{
mixins
:
[
table
],
},
created
()
{
methods
:
{
},
renderTable
(
tableData
)
{
methods
:
{
return
(
renderTable
(
tableData
)
{
<
el
-
table
stripe
data
=
{
tableData
}
class
=
"
total-table
"
>
return
(
{
this
.
columnSet
.
map
((
item
)
=>
this
.
renderTableColumn
(
item
))}
<
el
-
table
stripe
data
=
{
tableData
}
class
=
"
total-table
"
>
<
/el-table
>
{
this
.
columnSet
.
map
((
item
)
=>
this
.
renderTableColumn
(
item
))}
);
<
/el-table
>
},
);
renderTableColumn
(
options
)
{
},
return
(
renderTableColumn
(
options
)
{
<
el
-
table
-
column
prop
=
{
options
.
prop
}
return
(
label
=
{
options
.
label
}
<
el
-
table
-
column
width
=
{
options
.
width
}
prop
=
{
options
.
prop
}
>
label
=
{
options
.
label
}
<
/el-table-column
>
width
=
{
options
.
width
}
);
formatter
=
{
options
.
formatter
}
},
>
/** 重写新增方法 */
<
/el-table-column
>
toAdd
(
row
)
{
);
this
.
$refs
.
dialogform
.
add
(
row
);
},
},
/** 重写新增方法 */
/** 重写编辑方法 */
toAdd
(
row
)
{
toEdit
(
row
)
{
this
.
$refs
.
dialogform
.
add
(
row
);
this
.
$refs
.
dialogform
.
edit
(
row
);
},
},
/** 重写编辑方法 */
/** 重写查看方法 */
toEdit
(
row
)
{
toView
(
row
)
{
this
.
$refs
.
dialogform
.
edit
(
row
);
this
.
$refs
.
dialogform
.
view
(
row
);
},
},
/** 重写查看方法 */
toView
(
row
)
{
this
.
$refs
.
dialogform
.
view
(
row
);
},
},
data
()
{
return
{
/** 子表列元素 */
columnSet
:
[
{
prop
:
"
serviceTimeStart
"
,
label
:
"
服务开始时间
"
,
width
:
200
,
formatter
:
this
.
formatterDate
},
{
prop
:
"
serviceTimeEnd
"
,
label
:
"
服务结束时间
"
,
width
:
200
,
formatter
:
this
.
formatterDate
},
{
prop
:
"
remark
"
,
label
:
"
备注
"
,
width
:
100
},
],
config
:
{
search
:
[],
columns
:
[
{
type
:
"
selection
"
,
width
:
60
},
{
type
:
"
index
"
,
label
:
"
序号
"
,
width
:
50
},
{
label
:
"
启用
"
,
prop
:
"
used
"
,
formatter
:
this
.
formatter
},
{
label
:
"
周一
"
,
prop
:
"
monday
"
,
formatter
:
this
.
formatter
},
},
{
label
:
"
周二
"
,
prop
:
"
tuesday
"
,
formatter
:
this
.
formatter
},
data
()
{
return
{
{
label
:
"
周三
"
,
prop
:
"
wednesday
"
,
formatter
:
this
.
formatter
},
/** 子表列元素 */
columnSet
:[
{
label
:
"
周四
"
,
prop
:
"
thursday
"
,
formatter
:
this
.
formatter
},
{
prop
:
"
aotoCheckCfgId
"
,
label
:
"
自动签到配置id
"
,
width
:
100
},
{
prop
:
"
serviceTimeStart
"
,
label
:
"
时间段时候开始时间
"
,
width
:
100
},
{
label
:
"
周五
"
,
prop
:
"
friday
"
,
formatter
:
this
.
formatter
},
{
prop
:
"
serviceTimeEnd
"
,
label
:
"
时间段结束时间
"
,
width
:
100
},
{
prop
:
"
remark
"
,
label
:
"
备注
"
,
width
:
100
},
{
label
:
"
周六
"
,
prop
:
"
saturday
"
,
formatter
:
this
.
formatter
},
],
config
:
{
{
label
:
"
周日
"
,
prop
:
"
sunday
"
,
formatter
:
this
.
formatter
},
search
:
[
],
{
label
:
"
最大人数
"
,
prop
:
"
maxServicePersonNum
"
},
columns
:
[
{
type
:
"
selection
"
,
width
:
60
},
{
label
:
"
累计预警
"
,
prop
:
"
alertServiceNum
"
},
{
type
:
"
index
"
,
label
:
"
序号
"
,
width
:
50
},
{
{
label
:
"
启用
"
,
prop
:
"
used
"
,
formatter
:
this
.
formatter
},
label
:
"
配置时间段
"
,
width
:
120
,
{
label
:
"
周一
"
,
prop
:
"
monday
"
,
formatter
:
this
.
formatter
},
prop
:
"
subColumns
"
,
formatter
:
(
row
)
=>
{
{
label
:
"
周二
"
,
prop
:
"
tuesday
"
,
formatter
:
this
.
formatter
},
let
widthsize
=
this
.
columnSet
.
reduce
((
pre
,
cur
)
=>
{
return
pre
+
Number
(
cur
.
width
);
{
label
:
"
周三
"
,
prop
:
"
wednesday
"
,
formatter
:
this
.
formatter
},
},
50
);
return
(
{
label
:
"
周四
"
,
prop
:
"
thursday
"
,
formatter
:
this
.
formatter
},
<
el
-
popover
placement
=
"
right
"
width
=
{
widthsize
}
trigger
=
"
click
"
>
{
this
.
renderTable
(
row
.
appointmentConfigTimesList
)}
{
label
:
"
周五
"
,
prop
:
"
friday
"
,
formatter
:
this
.
formatter
},
<
el
-
button
type
=
"
text
"
slot
=
"
reference
"
>
详细
<
/el-button
>
<
/el-popover
>
{
label
:
"
周六
"
,
prop
:
"
saturday
"
,
formatter
:
this
.
formatter
},
);
},
{
label
:
"
周日
"
,
prop
:
"
sunday
"
,
formatter
:
this
.
formatter
},
},
{
{
label
:
"
最大人数
"
,
prop
:
"
maxServicePersonNum
"
},
label
:
"
操作
"
,
width
:
240
,
{
label
:
"
累计预警
"
,
prop
:
"
alertServiceNum
"
},
formatter
:
row
=>
{
return
(
{
label
:
"
创建时间
"
,
prop
:
"
createUserTime
"
,
formatter
:
this
.
formatterDate
},
<
table
-
buttons
noAdd
row
=
{
row
}
onEdit
=
{
this
.
toEdit
}
onView
=
{
this
.
toView
}
onDel
=
{
this
.
toDel
}
/
>
{
label
:
"
配置时间段
"
,
);
width
:
120
,
}
prop
:
"
subColumns
"
,
}
formatter
:
(
row
)
=>
{
]
let
widthsize
=
this
.
columnSet
.
reduce
((
pre
,
cur
)
=>
{
}
return
pre
+
Number
(
cur
.
width
);
},
50
);
return
(
<
el
-
popover
placement
=
"
right
"
width
=
{
widthsize
}
trigger
=
"
click
"
>
{
this
.
renderTable
(
row
.
appointmentConfigTimesList
)}
<
el
-
button
type
=
"
text
"
slot
=
"
reference
"
>
详细
<
/el-button
>
<
/el-popover
>
);
},
},
{
label
:
"
操作
"
,
width
:
240
,
formatter
:
row
=>
{
return
(
<
table
-
buttons
noAdd
row
=
{
row
}
onEdit
=
{
this
.
toEdit
}
onView
=
{
this
.
toView
}
onDel
=
{
this
.
toDel
}
/
>
);
}
}
]
}
};
}
};
};
}
};
</
script
>
</
script
>
refined-manager-ui/admin/src/views/appointment/constraint/dialogshow.vue
View file @
514e8130
<
template
>
<
template
>
<!-- 弹出框表单 -->
<!-- 弹出框表单 -->
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"50%"
append-to-body
>
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"50%"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"120px"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"120px"
>
<el-row>
<el-row>
<Field
:span=
"20"
label=
"个人信息"
prop=
"personId"
v-model=
"form.personId"
style=
"width:100%"
type=
"select"
:enumData=
"dict.personId"
placeholder=
"请输入个人信息ID"
/>
<Field
:span=
"20"
label=
"姓名"
prop=
"personId"
v-model=
"form.name"
placeholder=
"请输入个人姓名"
/>
<Field
:span=
"20"
label=
"联系方式"
prop=
"contact"
v-model=
"form.contact"
placeholder=
"请输入联系方式"
/>
<Field
:span=
"20"
label=
"联系方式"
prop=
"contact"
v-model=
"form.contact"
placeholder=
"请输入联系方式"
/>
<Field
:span=
"20"
label=
"证件类型"
prop=
"idCardType"
v-model=
"form.idCardType"
type=
"radio"
:enumData=
"dict.idCardType"
placeholder=
"请输入证件类型"
/>
<Field
:span=
"20"
label=
"证件类型"
prop=
"idCardType"
v-model=
"form.idCardType"
type=
"radio"
:enumData=
"dict.idCardType"
placeholder=
"请输入证件类型"
/>
<Field
:span=
"20"
label=
"证件号码"
prop=
"idCardNo"
v-model=
"form.idCardNo"
placeholder=
"请输入证件号码"
/>
<Field
:span=
"20"
label=
"证件号码"
prop=
"idCardNo"
v-model=
"form.idCardNo"
placeholder=
"请输入证件号码"
/>
<!--
<Field
:span=
"20"
label=
"累计次数"
prop=
"accumulative"
v-model=
"form.accumulative"
placeholder=
"请输入累计次数"
/>
<Field
:span=
"20"
label=
"约束时间"
prop=
"constraintTime"
v-model=
"form.constraintTime"
type=
"date"
/>
<Field
:span=
"20"
label=
"创建方式"
prop=
"createMethod"
v-model=
"form.createMethod"
type=
"select"
:enumData=
"dict.createMethod"
placeholder=
"请选择创建方式"
/>
<Field
:span=
"20"
label=
"操作人员"
prop=
"operator"
v-model=
"form.operator"
placeholder=
"请输入操作人员"
/>
<Field
:span=
"20"
label=
"是否约束"
prop=
"constraint"
v-model=
"form.constraint"
type=
"select"
:enumData=
"dict.constraint"
placeholder=
"请选择是否约束"
/>
-->
</el-row>
</el-row>
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
v-if=
"pageInfo.type !== 'view'"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
type=
"primary"
v-if=
"pageInfo.type !== 'view'"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</div>
</el-dialog>
</el-dialog>
</
template
>
</
template
>
<
script
>
<
script
>
import
form
from
"
@/assets/mixins/formdialog
"
;
import
form
from
"
@/assets/mixins/formdialog
"
;
import
dialogShow
from
"
./dialogshow
"
;
import
dialogShow
from
"
./dialogshow
"
;
export
default
{
mixins
:
[
form
],
components
:
{
dialogShow
,
},
data
()
{
return
{
// 遮罩层
loading
:
true
,
// 弹出层标题
title
:
"
预约自动签到服务约束
"
,
// 是否显示弹出层
open
:
false
,
toString
:[
"
createMethod
"
,
"
constraint
"
,
"
idCardType
"
,
"
personId
"
,
],
// 表单校验
rules
:
{
}
};
},
methods
:
{
export
default
{
/** 编辑 */
mixins
:
[
form
],
edit
(
row
)
{
components
:
{
this
.
reset
()
dialogShow
,
this
.
query
=
{
id
:
row
.
id
};
},
this
.
urls
.
currUrl
=
"
appointment/constraint/edit
"
;
data
()
{
this
.
getData
();
return
{
this
.
pageInfo
.
type
=
"
edit
"
// 遮罩层
this
.
title
=
"
修改预约自动签到服务约束
"
;
loading
:
true
,
},
// 弹出层标题
/** 新增 */
title
:
"
预约自动签到服务约束
"
,
add
(
row
)
{
// 是否显示弹出层
this
.
reset
()
open
:
false
,
this
.
urls
.
currUrl
=
"
appointment/constraint/add
"
;
toString
:
[
this
.
getData
();
"
createMethod
"
,
this
.
pageInfo
.
type
=
"
add
"
"
constraint
"
,
this
.
title
=
"
新增预约自动签到服务约束
"
;
"
idCardType
"
,
},
"
personId
"
,
/** 查看*/
],
view
(
row
)
{
// 表单校验
this
.
reset
()
rules
:
{}
this
.
query
=
{
id
:
row
.
id
};
};
this
.
urls
.
currUrl
=
"
appointment/constraint/view
"
;
},
this
.
getData
();
this
.
pageInfo
.
type
=
"
view
"
this
.
title
=
"
预约自动签到服务约束详细
"
;
},
/**取消按钮 */
cancel
()
{
this
.
open
=
false
;
},
/**获取数据后弹框 */
afterRender
(
data
)
{
this
.
open
=
true
;
},
beforeSubmit
(
data
){
methods
:
{
data
.
name
=
this
.
dict
[
'
personId
'
][
data
.
personId
];
/** 编辑 */
return
data
;
edit
(
row
)
{
},
this
.
reset
()
this
.
query
=
{
id
:
row
.
id
};
this
.
urls
.
currUrl
=
"
appointment/constraint/edit
"
;
this
.
getData
();
this
.
pageInfo
.
type
=
"
edit
"
this
.
title
=
"
修改预约自动签到服务约束
"
;
},
/** 新增 */
add
(
row
)
{
this
.
reset
()
this
.
urls
.
currUrl
=
"
appointment/constraint/add
"
;
this
.
getData
();
this
.
pageInfo
.
type
=
"
add
"
this
.
title
=
"
新增预约自动签到服务约束
"
;
},
/** 查看*/
view
(
row
)
{
this
.
reset
()
this
.
query
=
{
id
:
row
.
id
};
this
.
urls
.
currUrl
=
"
appointment/constraint/view
"
;
this
.
getData
();
this
.
pageInfo
.
type
=
"
view
"
this
.
title
=
"
预约自动签到服务约束详细
"
;
},
/**取消按钮 */
cancel
()
{
this
.
open
=
false
;
},
/**获取数据后弹框 */
afterRender
(
data
)
{
this
.
open
=
true
;
},
after
Submit
(
data
)
{
before
Submit
(
data
)
{
this
.
open
=
false
;
data
.
name
=
this
.
dict
[
'
personId
'
][
data
.
personId
]
;
this
.
$emit
(
"
ok
"
)
;
return
data
;
},
},
// 表单重置
afterSubmit
(
data
)
{
reset
()
{
this
.
open
=
false
;
this
.
form
=
{
this
.
$emit
(
"
ok
"
);
siteId
:
null
,
},
siteName
:
""
,
personId
:
null
,
// 表单重置
name
:
""
,
reset
()
{
contact
:
""
,
this
.
form
=
{
idCardType
:
""
,
siteId
:
null
,
idCardNo
:
""
,
siteName
:
""
,
accumulative
:
0
,
personId
:
null
,
constraintTime
:
null
,
name
:
""
,
createMethod
:
null
,
contact
:
""
,
operator
:
""
,
idCardType
:
""
,
constraint
:
0
,
idCardNo
:
""
,
};
accumulative
:
0
,
this
.
resetForm
(
"
form
"
);
constraintTime
:
null
,
},
createMethod
:
null
,
resetForm
(
refName
)
{
operator
:
""
,
if
(
this
.
$refs
[
refName
])
{
constraint
:
0
,
this
.
$refs
[
refName
].
resetFields
();
};
}
this
.
resetForm
(
"
form
"
);
},
},
},
resetForm
(
refName
)
{
};
if
(
this
.
$refs
[
refName
])
{
this
.
$refs
[
refName
].
resetFields
();
}
},
},
};
</
script
>
</
script
>
refined-manager-ui/admin/src/views/appointment/constraint/list.vue
View file @
514e8130
...
@@ -66,6 +66,12 @@
...
@@ -66,6 +66,12 @@
return
{
return
{
config
:
{
config
:
{
search
:
[
search
:
[
{
name
:
"
name
"
,
type
:
"
text
"
,
label
:
"
姓名
"
,
fuzzy
:
true
}
],
],
columns
:
[
columns
:
[
{
type
:
"
selection
"
,
width
:
60
},
{
type
:
"
selection
"
,
width
:
60
},
...
...
refined-manager-ui/admin/src/views/care/config/list.vue
View file @
514e8130
...
@@ -34,6 +34,7 @@
...
@@ -34,6 +34,7 @@
prop
=
{
options
.
prop
}
prop
=
{
options
.
prop
}
label
=
{
options
.
label
}
label
=
{
options
.
label
}
width
=
{
options
.
width
}
width
=
{
options
.
width
}
formatter
=
{
options
.
formatter
}
>
>
<
/el-table-column
>
<
/el-table-column
>
);
);
...
@@ -56,13 +57,13 @@
...
@@ -56,13 +57,13 @@
return
{
return
{
/** 子表列元素 */
/** 子表列元素 */
columnSet
:[
columnSet
:[
{
prop
:
"
careCfgId
"
,
label
:
"
主动关怀配置id
"
,
width
:
100
},
{
prop
:
"
serviceTimeStart
"
,
label
:
"
服务开始时间
"
,
width
:
200
,
formatter
:
this
.
formatterDate
},
{
prop
:
"
serviceTimeStart
"
,
label
:
"
时间段时候开始时间
"
,
width
:
100
},
{
prop
:
"
serviceTimeEnd
"
,
label
:
"
服务结束时间
"
,
width
:
200
,
formatter
:
this
.
formatterDate
},
{
prop
:
"
serviceTimeEnd
"
,
label
:
"
时间段结束时间
"
,
width
:
100
},
{
prop
:
"
remark
"
,
label
:
"
备注
"
,
width
:
100
},
{
prop
:
"
remark
"
,
label
:
"
备注
"
,
width
:
100
},
],
],
config
:
{
config
:
{
search
:
[
search
:
[
],
],
columns
:
[
columns
:
[
{
type
:
"
selection
"
,
width
:
60
},
{
type
:
"
selection
"
,
width
:
60
},
...
...
refined-manager-ui/admin/src/views/care/constraint/dialogshow.vue
View file @
514e8130
...
@@ -3,88 +3,11 @@
...
@@ -3,88 +3,11 @@
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"90%"
append-to-body
>
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"90%"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"120px"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"120px"
>
<el-row>
<el-row>
<Field
:span=
"20"
label=
"
个人信息"
prop=
"personId"
v-model=
"form.personId"
style=
"width:100%"
type=
"select"
:enumData=
"dict.personId"
placeholder=
"请输入个人信息ID
"
/>
<Field
:span=
"20"
label=
"
姓名"
prop=
"name"
v-model=
"form.name"
placeholder=
"请输入个人姓名
"
/>
<Field
:span=
"20"
label=
"联系方式"
prop=
"contact"
v-model=
"form.contact"
placeholder=
"请输入联系方式"
/>
<Field
:span=
"20"
label=
"联系方式"
prop=
"contact"
v-model=
"form.contact"
placeholder=
"请输入联系方式"
/>
<Field
:span=
"20"
label=
"证件类型"
prop=
"idCardType"
v-model=
"form.idCardType"
type=
"radio"
:enumData=
"dict.idCardType"
placeholder=
"请输入证件类型"
/>
<Field
:span=
"20"
label=
"证件类型"
prop=
"idCardType"
v-model=
"form.idCardType"
type=
"radio"
:enumData=
"dict.idCardType"
placeholder=
"请输入证件类型"
/>
<Field
:span=
"20"
label=
"证件号码"
prop=
"idCardNo"
v-model=
"form.idCard"
placeholder=
"请输入证件号码"
/>
<Field
:span=
"20"
label=
"证件号码"
prop=
"idCardNo"
v-model=
"form.idCard"
placeholder=
"请输入证件号码"
/>
<!--
<Field
label=
"站点Id"
prop=
"siteId"
v-model=
"form.siteId"
placeholder=
"请输入站点Id"
/>
<Field
label=
"站点名称"
prop=
"siteName"
v-model=
"form.siteName"
type=
"textarea"
placeholder=
"请输入站点名称"
/>
<Field
label=
"人员ID"
prop=
"personId"
v-model=
"form.personId"
placeholder=
"请输入人员ID"
/>
<Field
label=
"姓名"
prop=
"name"
v-model=
"form.name"
placeholder=
"请输入姓名"
/>
<Field
label=
"联系方式"
prop=
"contact"
v-model=
"form.contact"
placeholder=
"请输入联系方式"
/>
<Field
label=
"身份证号码"
prop=
"idCard"
v-model=
"form.idCard"
placeholder=
"请输入身份证号码"
/>
<Field
label=
"服务频次"
prop=
"serviceFrequency"
v-model=
"form.serviceFrequency"
placeholder=
"请输入服务频次"
/>
<Field
label=
"跟踪时间"
prop=
"trackingTime"
v-model=
"form.trackingTime"
type=
"date"
/>
<Field
label=
"创建方式"
prop=
"createWay"
v-model=
"form.createWay"
type=
"select"
:enumData=
"dict.createWay"
placeholder=
"请选择创建方式"
/>
<Field
label=
"操作人员"
prop=
"operator"
v-model=
"form.operator"
placeholder=
"请输入操作人员"
/>
<Field
label=
"是否追踪 "
prop=
"track"
v-model=
"form.track"
type=
"select"
:enumData=
"dict.track"
placeholder=
"请选择是否追踪 "
/>
-->
</el-row>
</el-row>
<!--
<el-divider
content-position=
"center"
>
主动关怀服务追踪信息
</el-divider>
<br/>
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAddCareConstraintTrack"
>
添加
</el-button>
</el-col>
<el-col
:span=
"1.5"
>
<el-button
type=
"danger"
icon=
"el-icon-delete"
size=
"mini"
@
click=
"handleDeleteCareConstraintTrack"
>
删除
</el-button>
</el-col>
</el-row>
<el-table
:data=
"careConstraintTrackList"
:row-class-name=
"rowCareConstraintTrackIndex"
@
selection-change=
"handleCareConstraintTrackSelectionChange"
ref=
"careConstraintTrack"
>
<el-table-column
type=
"selection"
width=
"50"
align=
"center"
/>
<el-table-column
label=
"序号"
align=
"center"
prop=
"index"
width=
"50"
/>
<el-table-column
label=
"反馈人ID"
prop=
"feedbackId"
>
<template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.feedbackId"
placeholder=
"请输入反馈人ID"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"反馈人姓名"
prop=
"feedbackName"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.feedbackName"
placeholder=
"请输入反馈人姓名"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"反馈内容"
prop=
"feedback"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.feedback"
placeholder=
"请输入反馈内容"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"跟踪时间"
prop=
"feedbackTime"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.feedbackTime"
placeholder=
"请输入跟踪时间"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"创建方式"
prop=
"createMethod"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.createMethod"
placeholder=
"请输入创建方式"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"创建时间"
prop=
"createTime"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.createTime"
placeholder=
"请输入创建时间"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"创建人ID"
prop=
"createUserId"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.createUserId"
placeholder=
"请输入创建人ID"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"更新时间"
prop=
"updateTime"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.updateTime"
placeholder=
"请输入更新时间"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"更新人ID"
prop=
"updateUserId"
>
<
template
slot-scope=
"scope"
>
<el-input
v-model=
"scope.row.updateUserId"
placeholder=
"请输入更新人ID"
/>
</
template
>
</el-table-column>
</el-table>
-->
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
v-if=
"pageInfo.type !== 'view'"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
type=
"primary"
v-if=
"pageInfo.type !== 'view'"
@
click=
"submitForm"
>
确 定
</el-button>
...
...
refined-manager-ui/admin/src/views/care/constraint/list.vue
0 → 100644
View file @
514e8130
<
template
>
<div
class=
"page"
>
<LayoutTable
:data=
"tableData"
:config=
"tableConfig"
>
</LayoutTable>
<track-drawer-show
ref=
"trackDrawerShow"
/>
<dialog-show
ref=
"dialogform"
@
ok=
"getData"
/>
<track-dialog-show
ref=
"trackdialogform"
@
ok=
"getData"
/>
</div>
</
template
>
<
script
>
/** 表单弹出框模式需引入 */
import
dialogShow
from
"
./dialogshow
"
;
import
trackDrawerShow
from
"
./trackDrawerShow
"
;
import
trackDialogShow
from
"
./track/dialogshow
"
;
import
table
from
"
@/assets/mixins/table
"
;
export
default
{
name
:
"
CareConstraintList
"
,
components
:
{
dialogShow
,
trackDrawerShow
,
trackDialogShow
},
mixins
:
[
table
],
created
()
{
},
methods
:
{
renderTable
(
tableData
)
{
return
(
<
el
-
table
stripe
data
=
{
tableData
}
class
=
"
total-table
"
>
{
this
.
columnSet
.
map
((
item
)
=>
this
.
renderTableColumn
(
item
))}
<
/el-table
>
);
},
renderTableColumn
(
options
)
{
return
(
<
el
-
table
-
column
prop
=
{
options
.
prop
}
label
=
{
options
.
label
}
width
=
{
options
.
width
}
>
<
/el-table-column
>
);
},
/** 重写新增方法 */
toAdd
(
row
)
{
this
.
$refs
.
dialogform
.
add
(
row
);
},
/** 重写编辑方法 */
toEdit
(
row
)
{
this
.
$refs
.
dialogform
.
edit
(
row
);
},
/** 重写查看方法 */
toView
(
row
)
{
this
.
$refs
.
dialogform
.
view
(
row
);
},
handleTrack
(
row
)
{
// this.$refs.trackDrawerShow.view(row);
this
.
$refs
.
trackdialogform
.
view
(
row
);
},
cancelTrack
(
row
)
{
let
_this
=
this
this
.
$confirm
(
'
取消跟踪后,系统将从0开始计算服务频次,是否确认?
'
,
"
系统服务
"
,
{
confirmButtonText
:
"
确定
"
,
cancelButtonText
:
"
取消
"
,
type
:
"
warning
"
}).
then
(
function
()
{
//todo
_this
.
$post
(
"
/care/constraint/save
"
,
{
id
:
row
.
id
,
serviceFrequency
:
0
,
track
:
0
,
})
.
then
((
res
)
=>
{
if
(
res
.
code
==
1
)
{
_this
.
$message
.
success
(
"
取消追踪成功!
"
);
_this
.
getData
();
}
})
.
catch
((
error
)
=>
{
_this
.
$message
.
error
(
error
.
message
);
});
}).
then
(
response
=>
{
})
}
},
data
()
{
return
{
/** 子表列元素 */
columnSet
:[
{
prop
:
"
careId
"
,
label
:
"
主动关怀约束Id
"
,
width
:
100
},
{
prop
:
"
feedbackId
"
,
label
:
"
反馈人ID
"
,
width
:
100
},
{
prop
:
"
feedbackName
"
,
label
:
"
反馈人姓名
"
,
width
:
100
},
{
prop
:
"
feedback
"
,
label
:
"
反馈内容
"
,
width
:
100
},
{
prop
:
"
feedbackTime
"
,
label
:
"
跟踪时间
"
,
width
:
100
},
{
prop
:
"
createMethod
"
,
label
:
"
创建方式
"
,
width
:
100
},
],
config
:
{
search
:
[
{
name
:
"
name
"
,
type
:
"
text
"
,
label
:
"
姓名
"
,
fuzzy
:
true
}
],
columns
:
[
{
type
:
"
selection
"
,
width
:
60
},
{
type
:
"
index
"
,
label
:
"
序号
"
,
width
:
50
},
{
label
:
"
姓名
"
,
prop
:
"
name
"
},
{
label
:
"
联系方式
"
,
prop
:
"
contact
"
},
{
label
:
"
身份证号码
"
,
prop
:
"
idCard
"
},
{
label
:
"
服务频次
"
,
prop
:
"
serviceFrequency
"
,
formatter
:
this
.
formatter
},
{
label
:
"
跟踪时间
"
,
prop
:
"
trackingTime
"
,
formatter
:
this
.
formatterDate
},
{
label
:
"
创建方式
"
,
prop
:
"
createWay
"
,
formatter
:
this
.
formatter
},
{
label
:
"
操作人员
"
,
prop
:
"
operator
"
},
{
label
:
"
是否追踪
"
,
prop
:
"
track
"
,
formatter
:
this
.
formatter
},
{
label
:
"
操作
"
,
width
:
320
,
formatter
:
row
=>
{
return
(
<
div
>
<
table
-
buttons
noAdd
noView
row
=
{
row
}
onEdit
=
{
this
.
toEdit
}
onView
=
{
this
.
toView
}
onDel
=
{
this
.
toDel
}
/
>
<
span
>
<
/span
>
<
el
-
button
size
=
"
mini
"
type
=
"
text
"
icon
=
"
el-icon-open
"
onClick
=
{()
=>
{
this
.
handleTrack
(
row
);
}}
>
跟踪反馈
<
/el-button
>
<
span
>
<
/span
>
<
el
-
button
size
=
"
mini
"
type
=
"
text
"
icon
=
"
el-icon-open
"
onClick
=
{()
=>
{
this
.
cancelTrack
(
row
);
}}
>
取消跟踪
<
/el-button
>
<
/div>
)
;
}
}
]
}
};
}
};
</
script
>
refined-manager-ui/admin/src/views/care/constraint/track/dialogshow.vue
View file @
514e8130
<
template
>
<
template
>
<!-- 弹出框表单 -->
<!-- 弹出框表单 -->
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"90%"
append-to-body
>
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"90%"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"120px"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
>
<el-row>
<el-card
style=
"margin-bottom: 20px"
v-for=
"item in listData"
>
<Field
label=
"主动关怀约束Id"
prop=
"careId"
v-model=
"form.careId"
placeholder=
"请输入主动关怀约束Id"
/>
<div
slot=
"header"
>
<Field
label=
"反馈人ID"
prop=
"feedbackId"
v-model=
"form.feedbackId"
placeholder=
"请输入反馈人ID"
/>
<span
style=
"color: #3E7BFA"
>
{{
util_formatterDate
(
item
.
feedbackTime
)
}}
</span>
<Field
label=
"反馈人姓名"
prop=
"feedbackName"
v-model=
"form.feedbackName"
placeholder=
"请输入反馈人姓名"
/>
<Field
label=
"反馈内容"
prop=
"feedback"
v-model=
"form.feedback"
type=
"textarea"
placeholder=
"请输入反馈内容"
/>
<span
>
{{
item
.
feedbackName
}}
</span>
<Field
label=
"跟踪时间"
prop=
"feedbackTime"
v-model=
"form.feedbackTime"
type=
"date"
/>
<Field
label=
"创建方式"
prop=
"createMethod"
v-model=
"form.createMethod"
placeholder=
"请输入创建方式"
/>
</el-row>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
v-if=
"pageInfo.type !== 'view'"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</div>
</el-dialog>
<el-collapse
v-model=
"activeNames"
accordion
>
<el-collapse-item
name=
"1"
>
<div
slot=
"title"
>
反馈内容
</div>
<div
class=
"content"
>
{{
item
.
feedback
}}
</div>
</el-collapse-item>
</el-collapse>
</el-card>
<el-row
style=
"margin-top: 40px"
>
<Field
:span=
"24"
prop=
"feedback"
v-model=
"form.feedback"
type=
"textarea"
placeholder=
"请输入反馈内容"
/>
</el-row>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</el-dialog>
</
template
>
</
template
>
<
script
>
<
script
>
import
form
from
"
@/assets/mixins/formdialog
"
;
import
form
from
"
@/assets/mixins/formdialog
"
;
import
dialogShow
from
"
./dialogshow
"
;
import
dialogShow
from
"
./dialogshow
"
;
export
default
{
mixins
:
[
form
],
export
default
{
components
:
{
mixins
:
[
form
],
dialogShow
,
components
:
{
},
dialogShow
,
data
()
{
},
return
{
data
()
{
// 遮罩层
return
{
loading
:
true
,
activeNames
:
[
'
1
'
],
// 弹出层标题
// 遮罩层
title
:
"
主动关怀服务追踪
"
,
loading
:
true
,
// 是否显示弹出层
// 弹出层标题
open
:
false
,
title
:
"
主动关怀服务追踪
"
,
toString
:[
// 是否显示弹出层
],
open
:
false
,
// 表单校验
toString
:
[],
rules
:
{
listData
:
[],
feedbackName
:
[
urls
:
{
{
required
:
true
,
message
:
"
请输入反馈人姓名
"
,
trigger
:
"
blur
"
},
saveUrl
:
"
/care/constraint/track/save
"
,
{
max
:
50
,
message
:
"
最多只能录入50个字符
"
,
trigger
:
"
blur
"
,},
},
],
// 表单校验
feedback
:
[
rules
:
{
{
required
:
true
,
message
:
"
请输入反馈内容
"
,
trigger
:
"
blur
"
},
feedbackName
:
[
{
max
:
1024
,
message
:
"
最多只能录入1024个字符
"
,
trigger
:
"
blur
"
,},
{
required
:
true
,
message
:
"
请输入反馈人姓名
"
,
trigger
:
"
blur
"
},
],
{
max
:
50
,
message
:
"
最多只能录入50个字符
"
,
trigger
:
"
blur
"
,},
feedbackTime
:
[
],
{
required
:
true
,
message
:
"
请选择跟踪时间
"
},
feedback
:
[
],
{
required
:
true
,
message
:
"
请输入反馈内容
"
,
trigger
:
"
blur
"
},
createMethod
:
[
{
max
:
1024
,
message
:
"
最多只能录入1024个字符
"
,
trigger
:
"
blur
"
,},
{
required
:
true
,
message
:
"
请输入创建方式
"
,
trigger
:
"
blur
"
},
],
{
max
:
50
,
message
:
"
最多只能录入50个字符
"
,
trigger
:
"
blur
"
,},
feedbackTime
:
[
],
{
required
:
true
,
message
:
"
请选择跟踪时间
"
},
}
],
};
createMethod
:
[
},
{
required
:
true
,
message
:
"
请输入创建方式
"
,
trigger
:
"
blur
"
},
{
max
:
50
,
message
:
"
最多只能录入50个字符
"
,
trigger
:
"
blur
"
,},
],
}
};
},
created
()
{
this
.
deviceId
=
this
.
$route
.
query
&&
this
.
$route
.
query
.
deviceId
;
this
.
pageInfo
.
list
=
"
/care/constraint/track/list
"
;
this
.
pageInfo
.
del
=
"
/care/constraint/track/delete
"
;
this
.
pageInfo
.
add
=
"
/care/constraint/track/add
"
;
this
.
pageInfo
.
edit
=
"
/care/constraint/track/edit
"
;
this
.
pageInfo
.
view
=
"
/care/constraint/track/view
"
;
},
methods
:
{
/** 编辑 */
edit
(
row
)
{
this
.
reset
()
this
.
query
=
{
id
:
row
.
id
};
this
.
urls
.
currUrl
=
"
care/constraint/track/edit
"
;
this
.
getData
();
this
.
pageInfo
.
type
=
"
edit
"
this
.
title
=
"
修改主动关怀服务追踪
"
;
},
/** 新增 */
add
(
row
)
{
this
.
reset
()
this
.
urls
.
currUrl
=
"
care/constraint/track/add
"
;
this
.
getData
();
this
.
pageInfo
.
type
=
"
add
"
this
.
title
=
"
新增主动关怀服务追踪
"
;
},
/** 查看*/
view
(
row
)
{
this
.
$post
(
"
/care/constraint/track/list
"
,
{
"
careId
"
:
row
.
id
})
.
then
((
res
)
=>
{
if
(
res
&&
res
.
code
&&
res
.
code
==
1
)
{
if
(
res
.
data
.
data
.
length
>
0
)
{
methods
:
{
console
.
log
(
res
.
data
.
data
)
/** 编辑 */
edit
(
row
)
{
this
.
reset
()
this
.
query
=
{
id
:
row
.
id
};
this
.
urls
.
currUrl
=
"
care/constraint/track/edit
"
;
this
.
getData
();
this
.
pageInfo
.
type
=
"
edit
"
this
.
title
=
"
修改主动关怀服务追踪
"
;
},
/** 新增 */
add
(
row
)
{
this
.
reset
()
this
.
urls
.
currUrl
=
"
care/constraint/track/add
"
;
this
.
getData
();
this
.
pageInfo
.
type
=
"
add
"
this
.
title
=
"
新增主动关怀服务追踪
"
;
},
/** 查看*/
view
(
row
)
{
this
.
reset
()
this
.
query
=
{
id
:
row
.
id
};
this
.
urls
.
currUrl
=
"
care/constraint/track/view
"
;
this
.
getData
();
this
.
pageInfo
.
type
=
"
view
"
this
.
title
=
"
主动关怀服务追踪详细
"
;
},
/**取消按钮 */
cancel
()
{
this
.
open
=
false
;
},
/**获取数据后弹框 */
afterRender
(
data
)
{
this
.
open
=
true
;
this
.
open
=
true
;
},
this
.
listData
=
res
.
data
.
data
}
}
})
.
catch
((
error
)
=>
{
this
.
$message
.
error
(
error
.
message
);
});
afterSubmit
(
data
)
{
this
.
open
=
false
;
this
.
$emit
(
"
ok
"
);
},
// 表单重置
this
.
reset
()
reset
()
{
this
.
query
=
{
careId
:
row
.
id
};
this
.
form
=
{
this
.
form
.
careId
=
row
.
id
;
careId
:
null
,
this
.
urls
.
currUrl
=
"
care/constraint/track/view
"
;
feedbackId
:
null
,
// this.getData();
feedbackName
:
""
,
this
.
pageInfo
.
type
=
"
view
"
feedback
:
""
,
this
.
title
=
"
主动关怀服务追踪详细
"
;
feedbackTime
:
null
,
},
createMethod
:
""
,
/**取消按钮 */
};
cancel
()
{
this
.
resetForm
(
"
form
"
);
this
.
open
=
false
;
},
},
resetForm
(
refName
)
{
/**获取数据后弹框 */
if
(
this
.
$refs
[
refName
])
{
afterRender
(
data
)
{
this
.
$refs
[
refName
].
resetFields
();
this
.
open
=
true
;
}
},
},
},
afterSubmit
(
data
)
{
};
this
.
open
=
false
;
this
.
$emit
(
"
ok
"
);
},
// 表单重置
reset
()
{
this
.
form
=
{
careId
:
null
,
feedbackId
:
null
,
feedbackName
:
""
,
feedback
:
""
,
feedbackTime
:
null
,
createMethod
:
""
,
};
this
.
resetForm
(
"
form
"
);
},
resetForm
(
refName
)
{
if
(
this
.
$refs
[
refName
])
{
this
.
$refs
[
refName
].
resetFields
();
}
},
},
};
</
script
>
</
script
>
<
style
scoped
>
.time
{
float
:
right
;
}
.content
{
margin-top
:
10px
;
}
</
style
>
refined-manager-ui/admin/src/views/care/constraint/track/list.vue
View file @
514e8130
...
@@ -46,7 +46,6 @@
...
@@ -46,7 +46,6 @@
{
label
:
"
主动关怀约束Id
"
,
prop
:
"
careId
"
,
formatter
:
this
.
formatter
},
{
label
:
"
主动关怀约束Id
"
,
prop
:
"
careId
"
,
formatter
:
this
.
formatter
},
{
label
:
"
反馈人ID
"
,
prop
:
"
feedbackId
"
,
formatter
:
this
.
formatter
},
{
label
:
"
反馈人姓名
"
,
prop
:
"
feedbackName
"
},
{
label
:
"
反馈人姓名
"
,
prop
:
"
feedbackName
"
},
...
@@ -69,4 +68,4 @@
...
@@ -69,4 +68,4 @@
};
};
}
}
};
};
</
script
>
</
script
>
\ No newline at end of file
refined-manager-ui/admin/src/views/care/constraint/trackDrawerShow.vue
View file @
514e8130
<
template
>
<
template
>
<!-- 抽屉框表单 -->
<!-- 抽屉框表单 -->
<el-drawer
<el-drawer
:title=
"title"
:title=
"title"
:visible.sync=
"open"
:visible.sync=
"open"
:direction=
"direction"
:direction=
"direction"
size=
"90%"
>
size=
"90%"
>
<span>
抽屉 表格数据 todo
</span>
<el-divider></el-divider>
</el-drawer>
<el-card
style=
"padding: 20px"
v-for=
"item in listData"
>
<div
slot=
"header"
>
{{
item
.
feedbackName
}}
<span
class=
"time"
>
{{
formatDate
(
item
.
feedbackTime
)
}}
</span>
</div>
<el-collapse
accordion
>
<el-collapse-item
name=
"content"
>
<div
slot=
"title"
>
反馈内容
</div>
<div
class=
"content"
>
{{
item
.
feedback
}}
</div>
</el-collapse-item>
</el-collapse>
</el-card>
<el-divider></el-divider>
<el-form
ref=
"form"
:model=
"form"
>
<el-row
style=
"padding: 20px"
>
<Field
:span=
"24"
prop=
"name"
v-model=
"form.name"
:rows=
"6"
type=
"textarea"
/>
</el-row>
<el-row
style=
"padding: 20px"
>
<el-button
style=
"float: right"
type=
"primary"
@
click=
"submitForm"
>
保 存
</el-button>
</el-row>
</el-form>
</el-drawer>
</
template
>
</
template
>
<
script
>
<
script
>
import
moment
from
'
moment
'
;
export
default
{
name
:
"
trackDrawerShow
"
,
export
default
{
components
:
{},
name
:
"
trackDrawerShow
"
,
created
()
{
components
:
{
console
.
log
(
this
.
$route
.
query
)
},
},
created
()
{
data
()
{
return
{
rows
:
6
,
form
:
{},
// 遮罩层
loading
:
true
,
// 弹出层标题
title
:
"
跟踪反馈数据
"
,
// 是否显示弹出层
open
:
false
,
direction
:
"
rtl
"
,
activeNames
:
[
'
content
'
],
listData
:
[],
toString
:
[],
toDate
:
[],
},
};
data
()
{
},
return
{
// 遮罩层
loading
:
true
,
// 弹出层标题
title
:
"
跟踪反馈数据
"
,
// 是否显示弹出层
open
:
false
,
direction
:
"
rtl
"
,
toString
:[
],
methods
:
{
toDate
:[
],
formatDate
(
value
)
{
return
moment
(
value
).
format
(
"
YYYY-MM-DD HH:mm:ss
"
)
},
};
submitForm
(
row
)
{
},
methods
:
{
},
view
(
row
)
{
this
.
open
=
true
view
(
row
)
{
},
console
.
log
(
"
row
"
,
row
)
},
this
.
$post
(
"
/care/constraint/track/list
"
,
{
"
careId
"
:
row
.
id
})
};
.
then
((
res
)
=>
{
if
(
res
&&
res
.
code
&&
res
.
code
==
1
)
{
if
(
res
.
data
.
data
.
length
>
0
)
{
console
.
log
(
res
.
data
.
data
)
this
.
listData
=
res
.
data
.
data
}
}
})
.
catch
((
error
)
=>
{
this
.
$message
.
error
(
error
.
message
);
});
this
.
open
=
true
},
},
};
</
script
>
</
script
>
<
style
scoped
>
.time
{
float
:
right
;
}
.content
{
margin-top
:
10px
;
}
</
style
>
refined-manager-ui/admin/src/views/notice/dialogshow.vue
View file @
514e8130
<
template
>
<
template
>
<!-- 弹出框表单 -->
<!-- 弹出框表单 -->
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"90%"
append-to-body
>
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"90%"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"1
2
0px"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"1
4
0px"
>
<el-row>
<el-row>
<Field
label=
"接收消息的用户的唯一标识符"
prop=
"userId"
v-model=
"form.userId"
placeholder=
"请输入接收消息的用户的唯一标识符"
/>
<Field
label=
"消息的标题"
span=
"20"
prop=
"title"
v-model=
"form.title"
type=
"textarea"
placeholder=
"请输入消息的标题"
/>
<Field
label=
"消息的标题"
prop=
"title"
v-model=
"form.title"
type=
"textarea"
placeholder=
"请输入消息的标题"
/>
<Field
span=
"20"
label=
"消息的内容"
><editor
v-model=
"form.content"
:min-height=
"256"
/></Field>
<Field
label=
"消息的内容"
><editor
v-model=
"form.content"
:min-height=
"256"
/></Field>
<Field
label=
"已读"
span=
"20"
prop=
"read"
v-model=
"form.read"
type=
"radio"
:enumData=
"dict.read"
/>
<Field
label=
"是否已读 "
prop=
"read"
v-model=
"form.read"
type=
"radio"
:enumData=
"dict.read"
/>
<Field
span=
"20"
label=
"消息的优先级"
prop=
"priority"
v-model=
"form.priority"
placeholder=
"请输入消息的优先级"
/>
<Field
label=
"消息的优先级,越高表示越紧急,不为空"
prop=
"priority"
v-model=
"form.priority"
placeholder=
"请输入消息的优先级,越高表示越紧急,不为空"
/>
<Field
span=
"20"
label=
"消息的过期时间"
prop=
"expireTime"
v-model=
"form.expireTime"
type=
"date"
/>
<Field
label=
"消息的过期时间,超过此时间则自动标记为已读"
prop=
"expireTime"
v-model=
"form.expireTime"
type=
"date"
/>
<Field
span=
"20"
label=
"消息的来源类型"
prop=
"sourceType"
v-model=
"form.sourceType"
placeholder=
"请输入消息的来源类型"
/>
<Field
label=
"消息的来源类型,例如“系统”、“好友”等,可以为空"
prop=
"sourceType"
v-model=
"form.sourceType"
placeholder=
"请输入消息的来源类型,例如“系统”、“好友”等,可以为空"
/>
</el-row>
</el-row>
...
@@ -39,8 +38,10 @@
...
@@ -39,8 +38,10 @@
title
:
"
用户消息
"
,
title
:
"
用户消息
"
,
// 是否显示弹出层
// 是否显示弹出层
open
:
false
,
open
:
false
,
toString
:[
toString
:[
"
read
"
,
"
sourceType
"
],
],
toDate
:[
"
expireTime
"
],
// 表单校验
// 表单校验
rules
:
{
rules
:
{
title
:
[
title
:
[
...
...
refined-manager-ui/admin/src/views/notice/list.vue
View file @
514e8130
<
template
>
<
template
>
<div
class=
"page"
>
<div
class=
"page"
>
<LayoutTable
:data=
"tableData"
:config=
"tableConfig"
>
<LayoutTable
notAdd
:data=
"tableData"
:config=
"tableConfig"
>
</LayoutTable>
</LayoutTable>
<dialog-show
ref=
"dialogform"
@
ok=
"getData"
/>
<dialog-show
ref=
"dialogform"
@
ok=
"getData"
/>
</div>
</div>
</
template
>
</
template
>
...
@@ -44,23 +43,21 @@
...
@@ -44,23 +43,21 @@
{
type
:
"
selection
"
,
width
:
60
},
{
type
:
"
selection
"
,
width
:
60
},
{
type
:
"
index
"
,
label
:
"
序号
"
,
width
:
50
},
{
type
:
"
index
"
,
label
:
"
序号
"
,
width
:
50
},
{
label
:
"
接收消息的用户的唯一标识符
"
,
prop
:
"
userId
"
,
formatter
:
this
.
formatter
},
{
label
:
"
消息的标题
"
,
prop
:
"
title
"
},
{
label
:
"
消息的标题
"
,
prop
:
"
title
"
},
{
label
:
"
消息的内容
"
,
prop
:
"
content
"
},
{
label
:
"
消息的内容
"
,
width
:
400
,
prop
:
"
content
"
},
{
label
:
"
是否已读
"
,
prop
:
"
read
"
,
formatter
:
this
.
formatterDate
},
{
label
:
"
已读
"
,
prop
:
"
read
"
,
formatter
:
this
.
formatter
},
{
label
:
"
消息的优先级,越高表示越紧急,不为空
"
,
prop
:
"
priority
"
,
formatter
:
this
.
formatter
},
{
label
:
"
优先级
"
,
prop
:
"
priority
"
,
formatter
:
this
.
formatter
},
{
label
:
"
消息的来源类型
,例如“系统”、“好友”等,可以为空
"
,
prop
:
"
sourceType
"
},
{
label
:
"
消息的来源类型
"
,
prop
:
"
sourceType
"
,
formatter
:
this
.
formatter
},
{
{
label
:
"
操作
"
,
label
:
"
操作
"
,
width
:
240
,
width
:
240
,
formatter
:
row
=>
{
formatter
:
row
=>
{
return
(
return
(
<
table
-
buttons
noAdd
row
=
{
row
}
onEdit
=
{
this
.
toEdit
}
onView
=
{
this
.
toView
}
onDel
=
{
this
.
toDel
}
/
>
<
table
-
buttons
no
Edit
no
Add
row
=
{
row
}
onEdit
=
{
this
.
toEdit
}
onView
=
{
this
.
toView
}
onDel
=
{
this
.
toDel
}
/
>
);
);
}
}
}
}
...
@@ -69,4 +66,4 @@
...
@@ -69,4 +66,4 @@
};
};
}
}
};
};
</
script
>
</
script
>
\ No newline at end of file
refined-manager-ui/admin/src/views/notice/view.vue
View file @
514e8130
...
@@ -8,25 +8,23 @@
...
@@ -8,25 +8,23 @@
<
template
slot=
"extra"
>
<
template
slot=
"extra"
>
<el-button
type=
"primary"
@
click=
"$router.go(-1)"
size=
"small"
>
返回
</el-button>
<el-button
type=
"primary"
@
click=
"$router.go(-1)"
size=
"small"
>
返回
</el-button>
</
template
>
</
template
>
<el-descriptions-item
label=
"接收消息的用户的唯一标识符"
label-class-name=
"labelClass"
content-class-name=
"contentClass"
>
{{form.userId}}
<el-descriptions-item
span=
"20"
label=
"消息的标题"
label-class-name=
"labelClass"
content-class-name=
"contentClass"
>
</el-descriptions-item>
<el-descriptions-item
label=
"消息的标题"
label-class-name=
"labelClass"
content-class-name=
"contentClass"
>
{{form.title}}
{{form.title}}
</el-descriptions-item>
</el-descriptions-item>
<el-descriptions-item
label=
"消息的内容"
label-class-name=
"labelClass"
content-class-name=
"contentClass"
>
<el-descriptions-item
span=
"20"
label=
"消息的内容"
label-class-name=
"labelClass"
content-class-name=
"contentClass"
>
<editor
v-model=
"form.content"
:min-height=
"256"
/>
{{form.content}}
</el-descriptions-item>
</el-descriptions-item>
<el-descriptions-item
label=
"是否已读
"
label-class-name=
"labelClass"
content-class-name=
"contentClass"
>
<el-descriptions-item
span=
"20"
label=
"已读
"
label-class-name=
"labelClass"
content-class-name=
"contentClass"
>
{{ util_formatters("read", form.read) }}
{{ util_formatters("read", form.read) }}
</el-descriptions-item>
</el-descriptions-item>
<el-descriptions-item
label=
"消息的优先级,越高表示越紧急,不为空
"
label-class-name=
"labelClass"
content-class-name=
"contentClass"
>
<el-descriptions-item
span=
"20"
label=
"消息的优先级
"
label-class-name=
"labelClass"
content-class-name=
"contentClass"
>
{{form.priority}}
{{form.priority}}
</el-descriptions-item>
</el-descriptions-item>
<el-descriptions-item
label=
"消息的过期时间,超过此时间则自动标记为已读
"
label-class-name=
"labelClass"
content-class-name=
"contentClass"
>
<el-descriptions-item
span=
"20"
label=
"消息的过期时间
"
label-class-name=
"labelClass"
content-class-name=
"contentClass"
>
{{ util_formatterDate(form.expireTime)}}
{{ util_formatterDate(form.expireTime)}}
</el-descriptions-item>
</el-descriptions-item>
<el-descriptions-item
label=
"消息的来源类型
,例如“系统”、“好友”等,可以为空
"
label-class-name=
"labelClass"
content-class-name=
"contentClass"
>
<el-descriptions-item
label=
"消息的来源类型"
label-class-name=
"labelClass"
content-class-name=
"contentClass"
>
{{form.sourceType}}
{{form.sourceType}}
</el-descriptions-item>
</el-descriptions-item>
</el-descriptions>
</el-descriptions>
...
@@ -74,4 +72,4 @@
...
@@ -74,4 +72,4 @@
.contentClass{
.contentClass{
width: 600px;
width: 600px;
}
}
</
style
>
</
style
>
\ No newline at end of file
refined-manager/src/main/java/com/mortals/xhx/daemon/task/SyncSubmitAppointTaskImpl.java
View file @
514e8130
...
@@ -57,30 +57,34 @@ public class SyncSubmitAppointTaskImpl implements ITaskExcuteService {
...
@@ -57,30 +57,34 @@ public class SyncSubmitAppointTaskImpl implements ITaskExcuteService {
appointmentRecordsQuery
.
setCreateTime
(
DateUtils
.
getCurrDate
());
appointmentRecordsQuery
.
setCreateTime
(
DateUtils
.
getCurrDate
());
List
<
AppointmentRecordsEntity
>
appointmentRecordsList
=
appointmentRecordsService
.
find
(
appointmentRecordsQuery
);
List
<
AppointmentRecordsEntity
>
appointmentRecordsList
=
appointmentRecordsService
.
find
(
appointmentRecordsQuery
);
for
(
AppointmentRecordsEntity
appointmentRecordsEntity
:
appointmentRecordsList
)
{
for
(
AppointmentRecordsEntity
appointmentRecordsEntity
:
appointmentRecordsList
)
{
//请求取号
doTakeNum
(
url
,
appointmentRecordsEntity
);
AppointReq
appointReq
=
new
AppointReq
();
appointReq
.
setSiteid
(
appointmentRecordsEntity
.
getSiteId
());
appointReq
.
setNumber
(
appointmentRecordsEntity
.
getReservationNumber
());
log
.
info
(
"appointment submit req=>{}"
,
JSON
.
toJSONString
(
appointReq
));
String
respJson
=
HttpUtil
.
post
(
url
,
JSON
.
toJSONString
(
appointReq
));
log
.
info
(
"appointment submit respJson=>{}"
,
respJson
);
Rest
<
AppointmentSubmitDataInfo
>
rest
=
JSON
.
parseObject
(
respJson
,
new
TypeReference
<
Rest
<
AppointmentSubmitDataInfo
>>()
{
});
if
(
rest
.
getCode
()==
YesNoEnum
.
YES
.
getValue
()){
appointmentRecordsEntity
.
setFlowNum
(
rest
.
getData
().
getData
().
getFlownum
());
appointmentRecordsEntity
.
setAppointmentStatus
(
AppointmentStatusEnum
.
取号完成
.
getValue
());
appointmentRecordsEntity
.
setFlowTime
(
rest
.
getData
().
getData
().
getTime
());
appointmentRecordsEntity
.
setUpdateTime
(
new
Date
());
appointmentRecordsEntity
.
setUpdateUserId
(
1L
);
appointmentRecordsEntity
.
setUpdateUserName
(
"system"
);
appointmentRecordsService
.
update
(
appointmentRecordsEntity
);
}
}
}
}
}
private
void
doTakeNum
(
String
url
,
AppointmentRecordsEntity
appointmentRecordsEntity
)
{
//请求取号
AppointReq
appointReq
=
new
AppointReq
();
appointReq
.
setSiteid
(
appointmentRecordsEntity
.
getSiteId
());
appointReq
.
setNumber
(
appointmentRecordsEntity
.
getReservationNumber
());
log
.
info
(
"appointment submit req=>{}"
,
JSON
.
toJSONString
(
appointReq
));
String
respJson
=
HttpUtil
.
post
(
url
,
JSON
.
toJSONString
(
appointReq
));
log
.
info
(
"appointment submit respJson=>{}"
,
respJson
);
Rest
<
AppointmentSubmitDataInfo
>
rest
=
JSON
.
parseObject
(
respJson
,
new
TypeReference
<
Rest
<
AppointmentSubmitDataInfo
>>()
{
});
if
(
rest
.
getCode
()==
YesNoEnum
.
YES
.
getValue
()){
appointmentRecordsEntity
.
setFlowNum
(
rest
.
getData
().
getData
().
getFlownum
());
appointmentRecordsEntity
.
setAppointmentStatus
(
AppointmentStatusEnum
.
取号完成
.
getValue
());
appointmentRecordsEntity
.
setFlowTime
(
rest
.
getData
().
getData
().
getTime
());
appointmentRecordsEntity
.
setUpdateTime
(
new
Date
());
appointmentRecordsEntity
.
setUpdateUserId
(
1L
);
appointmentRecordsEntity
.
setUpdateUserName
(
"system"
);
appointmentRecordsService
.
update
(
appointmentRecordsEntity
);
}
}
@Override
@Override
public
void
stopTask
(
ITask
task
)
throws
AppException
{
public
void
stopTask
(
ITask
task
)
throws
AppException
{
...
...
refined-manager/src/main/java/com/mortals/xhx/module/appointment/service/AppointmentRecordsService.java
View file @
514e8130
package
com.mortals.xhx.module.appointment.service
;
package
com.mortals.xhx.module.appointment.service
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.service.ICRUDService
;
import
com.mortals.framework.service.ICRUDService
;
import
com.mortals.xhx.module.appointment.model.AppointmentRecordsEntity
;
import
com.mortals.xhx.module.appointment.model.AppointmentRecordsEntity
;
/**
/**
...
@@ -11,4 +12,11 @@ import com.mortals.xhx.module.appointment.model.AppointmentRecordsEntity;
...
@@ -11,4 +12,11 @@ import com.mortals.xhx.module.appointment.model.AppointmentRecordsEntity;
*/
*/
public
interface
AppointmentRecordsService
extends
ICRUDService
<
AppointmentRecordsEntity
,
Long
>{
public
interface
AppointmentRecordsService
extends
ICRUDService
<
AppointmentRecordsEntity
,
Long
>{
/**
* 预约取号
* @param appointmentRecordsEntity
* @return
*/
Rest
<
String
>
doTakeNum
(
AppointmentRecordsEntity
appointmentRecordsEntity
);
}
}
\ No newline at end of file
refined-manager/src/main/java/com/mortals/xhx/module/appointment/service/impl/AppointmentConfigServiceImpl.java
View file @
514e8130
package
com.mortals.xhx.module.appointment.service.impl
;
package
com.mortals.xhx.module.appointment.service.impl
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.exception.AppException
;
...
@@ -11,29 +12,30 @@ import com.mortals.xhx.module.appointment.model.AppointmentConfigTimesEntity;
...
@@ -11,29 +12,30 @@ import com.mortals.xhx.module.appointment.model.AppointmentConfigTimesEntity;
import
com.mortals.xhx.module.appointment.model.AppointmentConfigTimesQuery
;
import
com.mortals.xhx.module.appointment.model.AppointmentConfigTimesQuery
;
import
com.mortals.xhx.module.appointment.service.AppointmentConfigTimesService
;
import
com.mortals.xhx.module.appointment.service.AppointmentConfigTimesService
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.List
;
/**
/**
* AppointmentConfigService
* AppointmentConfigService
* 预约自动签到配置 service实现
* 预约自动签到配置 service实现
*
*
* @author zxfei
* @author zxfei
* @date 2023-04-09
* @date 2023-04-09
*/
*/
@Service
(
"appointmentConfigService"
)
@Service
(
"appointmentConfigService"
)
public
class
AppointmentConfigServiceImpl
extends
AbstractCRUDServiceImpl
<
AppointmentConfigDao
,
AppointmentConfigEntity
,
Long
>
implements
AppointmentConfigService
{
public
class
AppointmentConfigServiceImpl
extends
AbstractCRUDServiceImpl
<
AppointmentConfigDao
,
AppointmentConfigEntity
,
Long
>
implements
AppointmentConfigService
{
@Autowired
@Autowired
private
AppointmentConfigTimesService
appointmentConfigTimesService
;
private
AppointmentConfigTimesService
appointmentConfigTimesService
;
@Override
@Override
protected
void
saveAfter
(
AppointmentConfigEntity
entity
,
Context
context
)
throws
AppException
{
protected
void
saveAfter
(
AppointmentConfigEntity
entity
,
Context
context
)
throws
AppException
{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getAppointmentConfigTimesList
())){
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getAppointmentConfigTimesList
()))
{
entity
.
getAppointmentConfigTimesList
().
stream
().
peek
(
item
->{
appointmentConfigTimesService
.
remove
(
new
AppointmentConfigTimesQuery
().
aotoCheckCfgId
(
entity
.
getId
()),
context
);
entity
.
getAppointmentConfigTimesList
().
stream
().
peek
(
item
->
{
item
.
setAotoCheckCfgId
(
entity
.
getId
());
item
.
setAotoCheckCfgId
(
entity
.
getId
());
item
.
setCreateUser
(
context
.
getUser
().
getLoginName
());
item
.
setCreateUserId
(
this
.
getContextUserId
(
context
));
item
.
setCreateUserId
(
context
.
getUser
().
getId
());
item
.
setCreateTime
(
new
Date
());
item
.
setCreateTime
(
new
Date
());
}).
count
();
}).
count
();
appointmentConfigTimesService
.
save
(
entity
.
getAppointmentConfigTimesList
());
appointmentConfigTimesService
.
save
(
entity
.
getAppointmentConfigTimesList
());
...
@@ -43,16 +45,14 @@ public class AppointmentConfigServiceImpl extends AbstractCRUDServiceImpl<Appoin
...
@@ -43,16 +45,14 @@ public class AppointmentConfigServiceImpl extends AbstractCRUDServiceImpl<Appoin
@Override
@Override
protected
void
updateAfter
(
AppointmentConfigEntity
entity
,
Context
context
)
throws
AppException
{
protected
void
updateAfter
(
AppointmentConfigEntity
entity
,
Context
context
)
throws
AppException
{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getAppointmentConfigTimesList
()))
{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getAppointmentConfigTimesList
()))
{
Long
[]
appointmentConfigTimesIds
=
appointmentConfigTimesService
.
find
(
new
AppointmentConfigTimesQuery
().
aotoCheckCfgId
(
entity
.
getId
())).
stream
().
map
(
AppointmentConfigTimesEntity:
:
getId
).
toArray
(
Long
[]::
new
);
appointmentConfigTimesService
.
remove
(
new
AppointmentConfigTimesQuery
().
aotoCheckCfgId
(
entity
.
getId
()),
context
);
appointmentConfigTimesService
.
remove
(
appointmentConfigTimesIds
,
context
);
entity
.
getAppointmentConfigTimesList
().
stream
().
peek
(
item
->{
entity
.
getAppointmentConfigTimesList
().
stream
().
peek
(
item
->
{
item
.
setAotoCheckCfgId
(
entity
.
getId
());
item
.
setAotoCheckCfgId
(
entity
.
getId
());
item
.
setCreateUser
(
context
.
getUser
().
getLoginName
());
item
.
setCreateUserId
(
this
.
getContextUserId
(
context
));
item
.
setCreateUserId
(
context
.
getUser
().
getId
());
item
.
setCreateTime
(
new
Date
());
item
.
setCreateTime
(
new
Date
());
item
.
setUpdateUser
(
context
.
getUser
().
getLoginName
());
item
.
setUpdateUserId
(
this
.
getContextUserId
(
context
));
item
.
setUpdateUserId
(
context
.
getUser
().
getId
());
item
.
setUpdateTime
(
new
Date
());
item
.
setUpdateTime
(
new
Date
());
}).
count
();
}).
count
();
appointmentConfigTimesService
.
save
(
entity
.
getAppointmentConfigTimesList
());
appointmentConfigTimesService
.
save
(
entity
.
getAppointmentConfigTimesList
());
...
@@ -63,7 +63,7 @@ public class AppointmentConfigServiceImpl extends AbstractCRUDServiceImpl<Appoin
...
@@ -63,7 +63,7 @@ public class AppointmentConfigServiceImpl extends AbstractCRUDServiceImpl<Appoin
@Override
@Override
protected
void
removeAfter
(
Long
[]
ids
,
Context
context
,
int
result
)
throws
AppException
{
protected
void
removeAfter
(
Long
[]
ids
,
Context
context
,
int
result
)
throws
AppException
{
List
<
AppointmentConfigTimesEntity
>
appointmentConfigTimeslist
=
appointmentConfigTimesService
.
find
(
new
AppointmentConfigTimesQuery
().
aotoCheckCfgIdList
(
Arrays
.
asList
(
ids
)));
List
<
AppointmentConfigTimesEntity
>
appointmentConfigTimeslist
=
appointmentConfigTimesService
.
find
(
new
AppointmentConfigTimesQuery
().
aotoCheckCfgIdList
(
Arrays
.
asList
(
ids
)));
appointmentConfigTimesService
.
removeList
(
appointmentConfigTimeslist
,
context
);
appointmentConfigTimesService
.
removeList
(
appointmentConfigTimeslist
,
context
);
super
.
removeAfter
(
ids
,
context
,
result
);
super
.
removeAfter
(
ids
,
context
,
result
);
}
}
}
}
\ No newline at end of file
refined-manager/src/main/java/com/mortals/xhx/module/appointment/service/impl/AppointmentConstraintServiceImpl.java
View file @
514e8130
package
com.mortals.xhx.module.appointment.service.impl
;
package
com.mortals.xhx.module.appointment.service.impl
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.xhx.module.appointment.model.AppointmentConstraintQuery
;
import
com.mortals.xhx.module.appointment.model.AppointmentRecordsEntity
;
import
com.mortals.xhx.module.person.model.PersonEntity
;
import
com.mortals.xhx.module.person.model.PersonEntity
;
import
com.mortals.xhx.module.person.service.PersonService
;
import
com.mortals.xhx.module.person.service.PersonService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -23,26 +25,33 @@ import org.springframework.util.ObjectUtils;
...
@@ -23,26 +25,33 @@ import org.springframework.util.ObjectUtils;
@Service
(
"appointmentConstraintService"
)
@Service
(
"appointmentConstraintService"
)
public
class
AppointmentConstraintServiceImpl
extends
AbstractCRUDServiceImpl
<
AppointmentConstraintDao
,
AppointmentConstraintEntity
,
Long
>
implements
AppointmentConstraintService
{
public
class
AppointmentConstraintServiceImpl
extends
AbstractCRUDServiceImpl
<
AppointmentConstraintDao
,
AppointmentConstraintEntity
,
Long
>
implements
AppointmentConstraintService
{
@Autowired
private
PersonService
personService
;
@Override
@Override
protected
void
saveBefore
(
AppointmentConstraintEntity
entity
,
Context
context
)
throws
AppException
{
protected
void
saveBefore
(
AppointmentConstraintEntity
entity
,
Context
context
)
throws
AppException
{
entity
.
setOperator
(
context
.
getUser
()
==
null
?
""
:
context
.
getUser
().
getRealName
());
entity
.
setOperator
(
context
.
getUser
()==
null
?
""
:
context
.
getUser
().
getRealName
());
int
count
=
this
.
count
(
new
AppointmentConstraintQuery
().
idCardNo
(
entity
.
getIdCardNo
()),
context
);
if
(
count
>
0
)
{
throw
new
AppException
(
"添加人员已经存在,idCard:"
+
entity
.
getIdCardNo
());
}
super
.
saveBefore
(
entity
,
context
);
super
.
saveBefore
(
entity
,
context
);
}
}
@Override
@Override
protected
void
updateBefore
(
AppointmentConstraintEntity
entity
,
Context
context
)
throws
AppException
{
protected
void
updateBefore
(
AppointmentConstraintEntity
entity
,
Context
context
)
throws
AppException
{
entity
.
setOperator
(
context
.
getUser
()==
null
?
""
:
context
.
getUser
().
getRealName
());
AppointmentConstraintEntity
appointmentConstraintEntity
=
this
.
selectOne
(
new
AppointmentConstraintQuery
().
idCardNo
(
entity
.
getIdCardNo
()));
if
(
ObjectUtils
.
isEmpty
(
appointmentConstraintEntity
))
{
entity
.
setId
(
appointmentConstraintEntity
.
getId
());
}
entity
.
setOperator
(
context
.
getUser
()
==
null
?
""
:
context
.
getUser
().
getRealName
());
super
.
updateBefore
(
entity
,
context
);
super
.
updateBefore
(
entity
,
context
);
}
}
@Override
@Override
public
Rest
<
String
>
constraintService
(
AppointmentConstraintEntity
appointmentConstraintEntity
,
Context
context
)
{
public
Rest
<
String
>
constraintService
(
AppointmentConstraintEntity
appointmentConstraintEntity
,
Context
context
)
{
//取消或者开启约束服务
//取消或者开启约束服务
AppointmentConstraintEntity
condition
=
new
AppointmentConstraintEntity
();
condition
.
setId
(
appointmentConstraintEntity
.
getId
());
condition
.
setConstraint
(
appointmentConstraintEntity
.
getConstraint
());
this
.
getDao
().
update
(
condition
);
return
Rest
.
ok
(
"修改成功"
);
return
Rest
.
ok
(
"修改成功"
);
}
}
}
}
\ No newline at end of file
refined-manager/src/main/java/com/mortals/xhx/module/appointment/service/impl/AppointmentRecordsServiceImpl.java
View file @
514e8130
package
com.mortals.xhx.module.appointment.service.impl
;
package
com.mortals.xhx.module.appointment.service.impl
;
import
cn.hutool.http.HttpUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.TypeReference
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.xhx.busiz.req.appoint.AppointReq
;
import
com.mortals.xhx.busiz.rsp.appoint.AppointmentSubmitDataInfo
;
import
com.mortals.xhx.common.code.AppointmentStatusEnum
;
import
com.mortals.xhx.common.code.YesNoEnum
;
import
com.mortals.xhx.module.appointment.model.AppointmentConstraintEntity
;
import
com.mortals.xhx.module.appointment.model.AppointmentConstraintQuery
;
import
com.mortals.xhx.module.appointment.service.AppointmentConfigService
;
import
com.mortals.xhx.module.appointment.service.AppointmentConstraintService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.checkerframework.checker.units.qual.A
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.exception.AppException
;
...
@@ -6,14 +23,70 @@ import com.mortals.framework.model.Context;
...
@@ -6,14 +23,70 @@ import com.mortals.framework.model.Context;
import
com.mortals.xhx.module.appointment.dao.AppointmentRecordsDao
;
import
com.mortals.xhx.module.appointment.dao.AppointmentRecordsDao
;
import
com.mortals.xhx.module.appointment.model.AppointmentRecordsEntity
;
import
com.mortals.xhx.module.appointment.model.AppointmentRecordsEntity
;
import
com.mortals.xhx.module.appointment.service.AppointmentRecordsService
;
import
com.mortals.xhx.module.appointment.service.AppointmentRecordsService
;
import
org.springframework.util.ObjectUtils
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
/**
* AppointmentRecordsService
* AppointmentRecordsService
* 预约签到记录 service实现
* 预约签到记录 service实现
*
*
* @author zxfei
* @author zxfei
* @date 2023-04-17
* @date 2023-04-17
*/
*/
@Service
(
"appointmentRecordsService"
)
@Service
(
"appointmentRecordsService"
)
@Slf4j
public
class
AppointmentRecordsServiceImpl
extends
AbstractCRUDServiceImpl
<
AppointmentRecordsDao
,
AppointmentRecordsEntity
,
Long
>
implements
AppointmentRecordsService
{
public
class
AppointmentRecordsServiceImpl
extends
AbstractCRUDServiceImpl
<
AppointmentRecordsDao
,
AppointmentRecordsEntity
,
Long
>
implements
AppointmentRecordsService
{
@Value
(
"${php.host:''}"
)
private
String
host
;
@Autowired
private
AppointmentConstraintService
constraintService
;
@Autowired
private
AppointmentConfigService
appointmentConfigService
;
@Override
public
Rest
<
String
>
doTakeNum
(
AppointmentRecordsEntity
appointmentRecordsEntity
)
{
String
registerPath
=
"/inter/Actuary/orderTakebusiness"
;
String
url
=
host
+
registerPath
;
AppointmentConstraintEntity
constraintEntity
=
constraintService
.
selectOne
(
new
AppointmentConstraintQuery
().
idCardNo
(
appointmentRecordsEntity
.
getIdNumber
()));
if
(!
ObjectUtils
.
isEmpty
(
constraintEntity
))
{
//查看约束情况
if
(
constraintEntity
.
getConstraint
()
==
YesNoEnum
.
YES
.
getValue
())
{
constraintEntity
.
setConstraintTime
(
new
Date
());
constraintService
.
update
(
constraintEntity
);
return
Rest
.
fail
(
String
.
format
(
"当前号码:%s已经被约束,不做取号服务!"
,
appointmentRecordsEntity
.
getIdNumber
()));
}
}
//请求取号
AppointReq
appointReq
=
new
AppointReq
();
appointReq
.
setSiteid
(
appointmentRecordsEntity
.
getSiteId
());
appointReq
.
setNumber
(
appointmentRecordsEntity
.
getReservationNumber
());
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"siteid"
,
appointmentRecordsEntity
.
getSiteId
());
params
.
put
(
"number"
,
appointmentRecordsEntity
.
getReservationNumber
());
log
.
info
(
"appointment submit req=>{}"
,
JSON
.
toJSONString
(
params
));
String
respJson
=
HttpUtil
.
post
(
url
,
params
);
log
.
info
(
"appointment submit respJson=>{}"
,
respJson
);
Rest
<
AppointmentSubmitDataInfo
>
rest
=
JSON
.
parseObject
(
respJson
,
new
TypeReference
<
Rest
<
AppointmentSubmitDataInfo
>>()
{
});
if
(
rest
.
getCode
()
==
YesNoEnum
.
YES
.
getValue
())
{
appointmentRecordsEntity
.
setFlowNum
(
rest
.
getData
().
getData
().
getFlownum
());
appointmentRecordsEntity
.
setAppointmentStatus
(
AppointmentStatusEnum
.
取号完成
.
getValue
());
appointmentRecordsEntity
.
setFlowTime
(
rest
.
getData
().
getData
().
getTime
());
appointmentRecordsEntity
.
setUpdateTime
(
new
Date
());
appointmentRecordsEntity
.
setUpdateUserId
(
1L
);
appointmentRecordsEntity
.
setUpdateUserName
(
"system"
);
this
.
update
(
appointmentRecordsEntity
);
}
return
Rest
.
ok
();
}
}
}
\ No newline at end of file
refined-manager/src/main/java/com/mortals/xhx/module/appointment/web/AppointmentConfigController.java
View file @
514e8130
...
@@ -5,7 +5,10 @@ import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
...
@@ -5,7 +5,10 @@ import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.common.code.YesNoEnum
;
import
com.mortals.xhx.common.code.YesNoEnum
;
import
com.mortals.xhx.module.appointment.model.AppointmentRecordsEntity
;
import
com.mortals.xhx.module.appointment.model.AppointmentRecordsEntity
;
import
com.mortals.xhx.module.care.model.CareConfigEntity
;
import
com.mortals.xhx.module.care.model.CareConfigQuery
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
...
@@ -58,7 +61,13 @@ public class AppointmentConfigController extends BaseCRUDJsonBodyMappingControll
...
@@ -58,7 +61,13 @@ public class AppointmentConfigController extends BaseCRUDJsonBodyMappingControll
}
}
@Override
protected
void
saveBefore
(
AppointmentConfigEntity
entity
,
Map
<
String
,
Object
>
model
,
Context
context
)
throws
AppException
{
super
.
saveBefore
(
entity
,
model
,
context
);
AppointmentConfigEntity
appointmentConfigEntity
=
this
.
service
.
selectOne
(
new
AppointmentConfigEntity
(),
context
);
if
(!
ObjectUtils
.
isEmpty
(
appointmentConfigEntity
)){
entity
.
setId
(
appointmentConfigEntity
.
getId
());
}
}
}
}
\ No newline at end of file
refined-manager/src/main/java/com/mortals/xhx/module/care/model/CareConfigEntity.java
View file @
514e8130
...
@@ -65,7 +65,7 @@ public class CareConfigEntity extends CareConfigVo {
...
@@ -65,7 +65,7 @@ public class CareConfigEntity extends CareConfigVo {
*/
*/
private
Integer
maxServicePersonNum
;
private
Integer
maxServicePersonNum
;
/**
/**
* 服务阈值设置
,单位分钟
* 服务阈值设置
*/
*/
@Excel
(
name
=
"服务阈值设置,单位分钟"
)
@Excel
(
name
=
"服务阈值设置,单位分钟"
)
private
Long
serviceThreshold
;
private
Long
serviceThreshold
;
...
@@ -435,7 +435,7 @@ public class CareConfigEntity extends CareConfigVo {
...
@@ -435,7 +435,7 @@ public class CareConfigEntity extends CareConfigVo {
this
.
serviceThreshold
=
0L
;
this
.
serviceThreshold
=
0L
;
this
.
alertServiceNum
=
20
0
;
this
.
alertServiceNum
=
1
0
;
this
.
msgRecipients
=
"管理员"
;
this
.
msgRecipients
=
"管理员"
;
...
...
refined-manager/src/main/java/com/mortals/xhx/module/care/service/impl/CareConfigServiceImpl.java
View file @
514e8130
package
com.mortals.xhx.module.care.service.impl
;
package
com.mortals.xhx.module.care.service.impl
;
import
com.mortals.xhx.module.care.model.CareConfigQuery
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.exception.AppException
;
...
@@ -11,29 +13,31 @@ import com.mortals.xhx.module.care.model.CareConfigTimesEntity;
...
@@ -11,29 +13,31 @@ import com.mortals.xhx.module.care.model.CareConfigTimesEntity;
import
com.mortals.xhx.module.care.model.CareConfigTimesQuery
;
import
com.mortals.xhx.module.care.model.CareConfigTimesQuery
;
import
com.mortals.xhx.module.care.service.CareConfigTimesService
;
import
com.mortals.xhx.module.care.service.CareConfigTimesService
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.List
;
/**
/**
* CareConfigService
* CareConfigService
* 主动关怀配置 service实现
* 主动关怀配置 service实现
*
*
* @author zxfei
* @author zxfei
* @date 2023-04-09
* @date 2023-04-09
*/
*/
@Service
(
"careConfigService"
)
@Service
(
"careConfigService"
)
public
class
CareConfigServiceImpl
extends
AbstractCRUDServiceImpl
<
CareConfigDao
,
CareConfigEntity
,
Long
>
implements
CareConfigService
{
public
class
CareConfigServiceImpl
extends
AbstractCRUDServiceImpl
<
CareConfigDao
,
CareConfigEntity
,
Long
>
implements
CareConfigService
{
@Autowired
@Autowired
private
CareConfigTimesService
careConfigTimesService
;
private
CareConfigTimesService
careConfigTimesService
;
@Override
@Override
protected
void
saveAfter
(
CareConfigEntity
entity
,
Context
context
)
throws
AppException
{
protected
void
saveAfter
(
CareConfigEntity
entity
,
Context
context
)
throws
AppException
{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getCareConfigTimesList
())){
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getCareConfigTimesList
()))
{
entity
.
getCareConfigTimesList
().
stream
().
peek
(
item
->{
careConfigTimesService
.
remove
(
new
CareConfigTimesQuery
().
careCfgId
(
entity
.
getId
()),
context
);
entity
.
getCareConfigTimesList
().
stream
().
peek
(
item
->
{
item
.
setCareCfgId
(
entity
.
getId
());
item
.
setCareCfgId
(
entity
.
getId
());
item
.
setCreateUser
(
context
.
getUser
().
getLoginName
());
item
.
setCreateUserId
(
this
.
getContextUserId
(
context
));
item
.
setCreateUserId
(
context
.
getUser
().
getId
());
item
.
setCreateTime
(
new
Date
());
item
.
setCreateTime
(
new
Date
());
}).
count
();
}).
count
();
careConfigTimesService
.
save
(
entity
.
getCareConfigTimesList
());
careConfigTimesService
.
save
(
entity
.
getCareConfigTimesList
());
...
@@ -43,16 +47,13 @@ public class CareConfigServiceImpl extends AbstractCRUDServiceImpl<CareConfigDao
...
@@ -43,16 +47,13 @@ public class CareConfigServiceImpl extends AbstractCRUDServiceImpl<CareConfigDao
@Override
@Override
protected
void
updateAfter
(
CareConfigEntity
entity
,
Context
context
)
throws
AppException
{
protected
void
updateAfter
(
CareConfigEntity
entity
,
Context
context
)
throws
AppException
{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getCareConfigTimesList
())){
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getCareConfigTimesList
()))
{
Long
[]
careConfigTimesIds
=
careConfigTimesService
.
find
(
new
CareConfigTimesQuery
().
careCfgId
(
entity
.
getId
())).
stream
().
map
(
CareConfigTimesEntity:
:
getId
).
toArray
(
Long
[]::
new
);
careConfigTimesService
.
remove
(
new
CareConfigTimesQuery
().
careCfgId
(
entity
.
getId
()),
context
);
careConfigTimesService
.
remove
(
careConfigTimesIds
,
context
);
entity
.
getCareConfigTimesList
().
stream
().
peek
(
item
->
{
entity
.
getCareConfigTimesList
().
stream
().
peek
(
item
->{
item
.
setCareCfgId
(
entity
.
getId
());
item
.
setCareCfgId
(
entity
.
getId
());
item
.
setCreateUser
(
context
.
getUser
().
getLoginName
());
item
.
setCreateUserId
(
this
.
getContextUserId
(
context
));
item
.
setCreateUserId
(
context
.
getUser
().
getId
());
item
.
setCreateTime
(
new
Date
());
item
.
setCreateTime
(
new
Date
());
item
.
setUpdateUser
(
context
.
getUser
().
getLoginName
());
item
.
setUpdateUserId
(
this
.
getContextUserId
(
context
));
item
.
setUpdateUserId
(
context
.
getUser
().
getId
());
item
.
setUpdateTime
(
new
Date
());
item
.
setUpdateTime
(
new
Date
());
}).
count
();
}).
count
();
careConfigTimesService
.
save
(
entity
.
getCareConfigTimesList
());
careConfigTimesService
.
save
(
entity
.
getCareConfigTimesList
());
...
@@ -63,7 +64,7 @@ public class CareConfigServiceImpl extends AbstractCRUDServiceImpl<CareConfigDao
...
@@ -63,7 +64,7 @@ public class CareConfigServiceImpl extends AbstractCRUDServiceImpl<CareConfigDao
@Override
@Override
protected
void
removeAfter
(
Long
[]
ids
,
Context
context
,
int
result
)
throws
AppException
{
protected
void
removeAfter
(
Long
[]
ids
,
Context
context
,
int
result
)
throws
AppException
{
List
<
CareConfigTimesEntity
>
careConfigTimeslist
=
careConfigTimesService
.
find
(
new
CareConfigTimesQuery
().
careCfgIdList
(
Arrays
.
asList
(
ids
)));
List
<
CareConfigTimesEntity
>
careConfigTimeslist
=
careConfigTimesService
.
find
(
new
CareConfigTimesQuery
().
careCfgIdList
(
Arrays
.
asList
(
ids
)));
careConfigTimesService
.
removeList
(
careConfigTimeslist
,
context
);
careConfigTimesService
.
removeList
(
careConfigTimeslist
,
context
);
super
.
removeAfter
(
ids
,
context
,
result
);
super
.
removeAfter
(
ids
,
context
,
result
);
}
}
}
}
\ No newline at end of file
refined-manager/src/main/java/com/mortals/xhx/module/care/service/impl/CareConstraintServiceImpl.java
View file @
514e8130
package
com.mortals.xhx.module.care.service.impl
;
package
com.mortals.xhx.module.care.service.impl
;
import
com.mortals.xhx.module.appointment.model.AppointmentConstraintEntity
;
import
com.mortals.xhx.module.appointment.model.AppointmentConstraintQuery
;
import
com.mortals.xhx.module.care.model.CareConstraintQuery
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.exception.AppException
;
...
@@ -11,17 +15,18 @@ import com.mortals.xhx.module.care.model.CareConstraintTrackEntity;
...
@@ -11,17 +15,18 @@ import com.mortals.xhx.module.care.model.CareConstraintTrackEntity;
import
com.mortals.xhx.module.care.model.CareConstraintTrackQuery
;
import
com.mortals.xhx.module.care.model.CareConstraintTrackQuery
;
import
com.mortals.xhx.module.care.service.CareConstraintTrackService
;
import
com.mortals.xhx.module.care.service.CareConstraintTrackService
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.List
;
/**
/**
* CareConstraintService
* CareConstraintService
* 主动关怀服务约束 service实现
* 主动关怀服务约束 service实现
*
*
* @author zxfei
* @author zxfei
* @date 2023-04-09
* @date 2023-04-09
*/
*/
@Service
(
"careConstraintService"
)
@Service
(
"careConstraintService"
)
public
class
CareConstraintServiceImpl
extends
AbstractCRUDServiceImpl
<
CareConstraintDao
,
CareConstraintEntity
,
Long
>
implements
CareConstraintService
{
public
class
CareConstraintServiceImpl
extends
AbstractCRUDServiceImpl
<
CareConstraintDao
,
CareConstraintEntity
,
Long
>
implements
CareConstraintService
{
@Autowired
@Autowired
...
@@ -30,23 +35,30 @@ public class CareConstraintServiceImpl extends AbstractCRUDServiceImpl<CareConst
...
@@ -30,23 +35,30 @@ public class CareConstraintServiceImpl extends AbstractCRUDServiceImpl<CareConst
@Override
@Override
protected
void
saveBefore
(
CareConstraintEntity
entity
,
Context
context
)
throws
AppException
{
protected
void
saveBefore
(
CareConstraintEntity
entity
,
Context
context
)
throws
AppException
{
entity
.
setOperator
(
context
.
getUser
()==
null
?
""
:
context
.
getUser
().
getRealName
());
int
count
=
this
.
count
(
new
CareConstraintQuery
().
idCard
(
entity
.
getIdCard
()),
context
);
if
(
count
>
0
)
{
throw
new
AppException
(
"添加人员已经存在,idCard:"
+
entity
.
getIdCard
());
}
entity
.
setOperator
(
context
.
getUser
()
==
null
?
""
:
context
.
getUser
().
getRealName
());
super
.
saveBefore
(
entity
,
context
);
super
.
saveBefore
(
entity
,
context
);
}
}
@Override
@Override
protected
void
updateBefore
(
CareConstraintEntity
entity
,
Context
context
)
throws
AppException
{
protected
void
updateBefore
(
CareConstraintEntity
entity
,
Context
context
)
throws
AppException
{
entity
.
setOperator
(
context
.
getUser
()==
null
?
""
:
context
.
getUser
().
getRealName
());
CareConstraintEntity
appointmentConstraintEntity
=
this
.
selectOne
(
new
CareConstraintQuery
().
idCard
(
entity
.
getIdCard
()));
if
(
ObjectUtils
.
isEmpty
(
appointmentConstraintEntity
))
{
entity
.
setId
(
appointmentConstraintEntity
.
getId
());
}
entity
.
setOperator
(
context
.
getUser
()
==
null
?
""
:
context
.
getUser
().
getRealName
());
super
.
updateBefore
(
entity
,
context
);
super
.
updateBefore
(
entity
,
context
);
}
}
@Override
@Override
protected
void
saveAfter
(
CareConstraintEntity
entity
,
Context
context
)
throws
AppException
{
protected
void
saveAfter
(
CareConstraintEntity
entity
,
Context
context
)
throws
AppException
{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getCareConstraintTrackList
()))
{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getCareConstraintTrackList
()))
{
entity
.
getCareConstraintTrackList
().
stream
().
peek
(
item
->
{
entity
.
getCareConstraintTrackList
().
stream
().
peek
(
item
->
{
item
.
setCareId
(
entity
.
getId
());
item
.
setCareId
(
entity
.
getId
());
item
.
setCreateUser
(
context
.
getUser
().
getLoginName
());
item
.
setCreateUserId
(
this
.
getContextUserId
(
context
));
item
.
setCreateUserId
(
context
.
getUser
().
getId
());
item
.
setCreateTime
(
new
Date
());
item
.
setCreateTime
(
new
Date
());
}).
count
();
}).
count
();
careConstraintTrackService
.
save
(
entity
.
getCareConstraintTrackList
());
careConstraintTrackService
.
save
(
entity
.
getCareConstraintTrackList
());
...
@@ -56,16 +68,14 @@ public class CareConstraintServiceImpl extends AbstractCRUDServiceImpl<CareConst
...
@@ -56,16 +68,14 @@ public class CareConstraintServiceImpl extends AbstractCRUDServiceImpl<CareConst
@Override
@Override
protected
void
updateAfter
(
CareConstraintEntity
entity
,
Context
context
)
throws
AppException
{
protected
void
updateAfter
(
CareConstraintEntity
entity
,
Context
context
)
throws
AppException
{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getCareConstraintTrackList
()))
{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getCareConstraintTrackList
()))
{
Long
[]
careConstraintTrackIds
=
careConstraintTrackService
.
find
(
new
CareConstraintTrackQuery
().
careId
(
entity
.
getId
())).
stream
().
map
(
CareConstraintTrackEntity:
:
getId
).
toArray
(
Long
[]::
new
);
Long
[]
careConstraintTrackIds
=
careConstraintTrackService
.
find
(
new
CareConstraintTrackQuery
().
careId
(
entity
.
getId
())).
stream
().
map
(
CareConstraintTrackEntity:
:
getId
).
toArray
(
Long
[]::
new
);
careConstraintTrackService
.
remove
(
careConstraintTrackIds
,
context
);
careConstraintTrackService
.
remove
(
careConstraintTrackIds
,
context
);
entity
.
getCareConstraintTrackList
().
stream
().
peek
(
item
->{
entity
.
getCareConstraintTrackList
().
stream
().
peek
(
item
->
{
item
.
setCareId
(
entity
.
getId
());
item
.
setCareId
(
entity
.
getId
());
item
.
setCreateUser
(
context
.
getUser
().
getLoginName
());
item
.
setCreateUserId
(
this
.
getContextUserId
(
context
));
item
.
setCreateUserId
(
context
.
getUser
().
getId
());
item
.
setCreateTime
(
new
Date
());
item
.
setCreateTime
(
new
Date
());
item
.
setUpdateUser
(
context
.
getUser
().
getLoginName
());
item
.
setUpdateUserId
(
this
.
getContextUserId
(
context
));
item
.
setUpdateUserId
(
context
.
getUser
().
getId
());
item
.
setUpdateTime
(
new
Date
());
item
.
setUpdateTime
(
new
Date
());
}).
count
();
}).
count
();
careConstraintTrackService
.
save
(
entity
.
getCareConstraintTrackList
());
careConstraintTrackService
.
save
(
entity
.
getCareConstraintTrackList
());
...
@@ -76,7 +86,7 @@ public class CareConstraintServiceImpl extends AbstractCRUDServiceImpl<CareConst
...
@@ -76,7 +86,7 @@ public class CareConstraintServiceImpl extends AbstractCRUDServiceImpl<CareConst
@Override
@Override
protected
void
removeAfter
(
Long
[]
ids
,
Context
context
,
int
result
)
throws
AppException
{
protected
void
removeAfter
(
Long
[]
ids
,
Context
context
,
int
result
)
throws
AppException
{
List
<
CareConstraintTrackEntity
>
careConstraintTracklist
=
careConstraintTrackService
.
find
(
new
CareConstraintTrackQuery
().
careIdList
(
Arrays
.
asList
(
ids
)));
List
<
CareConstraintTrackEntity
>
careConstraintTracklist
=
careConstraintTrackService
.
find
(
new
CareConstraintTrackQuery
().
careIdList
(
Arrays
.
asList
(
ids
)));
careConstraintTrackService
.
removeList
(
careConstraintTracklist
,
context
);
careConstraintTrackService
.
removeList
(
careConstraintTracklist
,
context
);
super
.
removeAfter
(
ids
,
context
,
result
);
super
.
removeAfter
(
ids
,
context
,
result
);
}
}
}
}
\ No newline at end of file
refined-manager/src/main/java/com/mortals/xhx/module/care/service/impl/CareConstraintTrackServiceImpl.java
View file @
514e8130
package
com.mortals.xhx.module.care.service.impl
;
package
com.mortals.xhx.module.care.service.impl
;
import
com.mortals.xhx.common.code.CreateMethodEnum
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.exception.AppException
;
...
@@ -6,14 +8,27 @@ import com.mortals.framework.model.Context;
...
@@ -6,14 +8,27 @@ import com.mortals.framework.model.Context;
import
com.mortals.xhx.module.care.dao.CareConstraintTrackDao
;
import
com.mortals.xhx.module.care.dao.CareConstraintTrackDao
;
import
com.mortals.xhx.module.care.model.CareConstraintTrackEntity
;
import
com.mortals.xhx.module.care.model.CareConstraintTrackEntity
;
import
com.mortals.xhx.module.care.service.CareConstraintTrackService
;
import
com.mortals.xhx.module.care.service.CareConstraintTrackService
;
import
java.util.Date
;
/**
/**
* CareConstraintTrackService
* CareConstraintTrackService
* 主动关怀服务追踪 service实现
* 主动关怀服务追踪 service实现
*
*
* @author zxfei
* @author zxfei
* @date 2023-04-09
* @date 2023-04-09
*/
*/
@Service
(
"careConstraintTrackService"
)
@Service
(
"careConstraintTrackService"
)
public
class
CareConstraintTrackServiceImpl
extends
AbstractCRUDServiceImpl
<
CareConstraintTrackDao
,
CareConstraintTrackEntity
,
Long
>
implements
CareConstraintTrackService
{
public
class
CareConstraintTrackServiceImpl
extends
AbstractCRUDServiceImpl
<
CareConstraintTrackDao
,
CareConstraintTrackEntity
,
Long
>
implements
CareConstraintTrackService
{
@Override
protected
void
saveBefore
(
CareConstraintTrackEntity
entity
,
Context
context
)
throws
AppException
{
super
.
saveBefore
(
entity
,
context
);
entity
.
setFeedbackId
(
this
.
getContextUserId
(
context
));
entity
.
setFeedbackName
(
context
.
getUser
().
getRealName
());
entity
.
setCreateMethod
(
CreateMethodEnum
.
手动创建
.
getDesc
());
entity
.
setFeedbackTime
(
new
Date
());
}
}
}
\ No newline at end of file
refined-manager/src/main/java/com/mortals/xhx/module/care/service/impl/CareRecordsServiceImpl.java
View file @
514e8130
...
@@ -17,10 +17,12 @@ import com.mortals.xhx.common.code.UserType;
...
@@ -17,10 +17,12 @@ import com.mortals.xhx.common.code.UserType;
import
com.mortals.xhx.common.code.YesNoEnum
;
import
com.mortals.xhx.common.code.YesNoEnum
;
import
com.mortals.xhx.common.key.ParamKey
;
import
com.mortals.xhx.common.key.ParamKey
;
import
com.mortals.xhx.module.care.dao.CareRecordsDao
;
import
com.mortals.xhx.module.care.dao.CareRecordsDao
;
import
com.mortals.xhx.module.care.model.CareRecordsEntity
;
import
com.mortals.xhx.module.care.model.*
;
import
com.mortals.xhx.module.care.model.CareRecordsQuery
;
import
com.mortals.xhx.module.care.service.CareConfigService
;
import
com.mortals.xhx.module.care.service.CareConstraintService
;
import
com.mortals.xhx.module.care.service.CareRecordsService
;
import
com.mortals.xhx.module.care.service.CareRecordsService
;
import
com.mortals.xhx.module.notice.model.NoticeEntity
;
import
com.mortals.xhx.module.notice.model.NoticeEntity
;
import
com.mortals.xhx.module.notice.service.NoticeService
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.time.DateUtils
;
import
org.apache.commons.lang3.time.DateUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -46,6 +48,13 @@ import java.util.stream.Collectors;
...
@@ -46,6 +48,13 @@ import java.util.stream.Collectors;
public
class
CareRecordsServiceImpl
extends
AbstractCRUDServiceImpl
<
CareRecordsDao
,
CareRecordsEntity
,
Long
>
implements
CareRecordsService
{
public
class
CareRecordsServiceImpl
extends
AbstractCRUDServiceImpl
<
CareRecordsDao
,
CareRecordsEntity
,
Long
>
implements
CareRecordsService
{
@Autowired
@Autowired
private
UserService
userService
;
private
UserService
userService
;
@Autowired
private
CareConfigService
careConfigService
;
@Autowired
private
CareConstraintService
careConstraintService
;
@Autowired
private
NoticeService
noticeService
;
@Value
(
"${sms.smsSendUrl:http://192.168.0.98:8089/api/index/index}"
)
@Value
(
"${sms.smsSendUrl:http://192.168.0.98:8089/api/index/index}"
)
private
String
smsSendUrl
;
private
String
smsSendUrl
;
...
@@ -77,10 +86,9 @@ public class CareRecordsServiceImpl extends AbstractCRUDServiceImpl<CareRecordsD
...
@@ -77,10 +86,9 @@ public class CareRecordsServiceImpl extends AbstractCRUDServiceImpl<CareRecordsD
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
if
(
ObjectUtils
.
isEmpty
(
noticeList
))
{
if
(
ObjectUtils
.
isEmpty
(
noticeList
))
{
//
noticeService.save(noticeList);
noticeService
.
save
(
noticeList
);
}
}
return
Rest
.
ok
(
"通知负责人成功"
);
return
Rest
.
ok
(
"通知负责人成功"
);
}
}
...
@@ -88,17 +96,29 @@ public class CareRecordsServiceImpl extends AbstractCRUDServiceImpl<CareRecordsD
...
@@ -88,17 +96,29 @@ public class CareRecordsServiceImpl extends AbstractCRUDServiceImpl<CareRecordsD
public
Rest
<
String
>
toCare
(
CareRecordsEntity
careRecordsEntity
,
Context
context
)
{
public
Rest
<
String
>
toCare
(
CareRecordsEntity
careRecordsEntity
,
Context
context
)
{
if
(
ObjectUtils
.
isEmpty
(
careRecordsEntity
.
getContact
()))
{
if
(
ObjectUtils
.
isEmpty
(
careRecordsEntity
.
getContact
()))
{
return
Rest
.
fail
(
"手机号码不存在"
);
return
Rest
.
fail
(
"手机号码不存在"
);
}
}
CareConfigEntity
careConfigEntity
=
careConfigService
.
selectOne
(
new
CareConfigQuery
());
CareConstraintEntity
careConstraintEntity
=
careConstraintService
.
selectOne
(
new
CareConstraintQuery
().
idCard
(
careRecordsEntity
.
getIdCard
()));
if
(!
ObjectUtils
.
isEmpty
(
careConstraintEntity
))
{
//校验服务频次
if
(
careConstraintEntity
.
getServiceFrequency
()
>
careConfigEntity
.
getAlertServiceNum
())
{
//todo 超过服务预警频次
}
CareConstraintQuery
constraintQuery
=
new
CareConstraintQuery
();
constraintQuery
.
serviceFrequencyIncrement
(
1L
);
constraintQuery
.
setId
(
careConstraintEntity
.
getId
());
careConstraintService
.
update
(
constraintQuery
);
}
String
resp
=
null
;
String
resp
=
null
;
try
{
try
{
SmsThirdPartyReq
smsThirdPartyReq
=
new
SmsThirdPartyReq
();
SmsThirdPartyReq
smsThirdPartyReq
=
new
SmsThirdPartyReq
();
smsThirdPartyReq
.
setAppid
(
apiId
);
smsThirdPartyReq
.
setAppid
(
apiId
);
smsThirdPartyReq
.
setPhone
(
careRecordsEntity
.
getContact
());
smsThirdPartyReq
.
setPhone
(
careRecordsEntity
.
getContact
());
smsThirdPartyReq
.
setType
(
ParamKey
.
SYS_PARAM_SMS_PERSON_CARE_TYPE
);
smsThirdPartyReq
.
setType
(
ParamKey
.
SYS_PARAM_SMS_PERSON_CARE_TYPE
);
Map
<
String
,
String
>
form
=
new
HashMap
<>();
Map
<
String
,
String
>
form
=
new
HashMap
<>();
EntityUtil
.
entityToMap
(
smsThirdPartyReq
,
form
);
EntityUtil
.
entityToMap
(
smsThirdPartyReq
,
form
);
resp
=
HttpUtil
.
doPost
(
smsSendUrl
,
form
);
resp
=
HttpUtil
.
doPost
(
smsSendUrl
,
form
);
ApiSmsResp
<
Void
>
apiSmsResp
=
JSON
.
parseObject
(
resp
,
new
TypeReference
<
ApiSmsResp
<
Void
>>()
{
ApiSmsResp
<
Void
>
apiSmsResp
=
JSON
.
parseObject
(
resp
,
new
TypeReference
<
ApiSmsResp
<
Void
>>()
{
});
});
...
...
refined-manager/src/main/java/com/mortals/xhx/module/care/web/CareConfigController.java
View file @
514e8130
package
com.mortals.xhx.module.care.web
;
package
com.mortals.xhx.module.care.web
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.module.care.model.CareConfigQuery
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
...
@@ -54,5 +57,12 @@ public class CareConfigController extends BaseCRUDJsonBodyMappingController<Care
...
@@ -54,5 +57,12 @@ public class CareConfigController extends BaseCRUDJsonBodyMappingController<Care
super
.
init
(
model
,
context
);
super
.
init
(
model
,
context
);
}
}
@Override
protected
void
saveBefore
(
CareConfigEntity
entity
,
Map
<
String
,
Object
>
model
,
Context
context
)
throws
AppException
{
CareConfigEntity
careConfigEntity
=
this
.
service
.
selectOne
(
new
CareConfigQuery
(),
context
);
if
(!
ObjectUtils
.
isEmpty
(
careConfigEntity
)){
entity
.
setId
(
careConfigEntity
.
getId
());
}
super
.
saveBefore
(
entity
,
model
,
context
);
}
}
}
\ No newline at end of file
refined-manager/src/main/java/com/mortals/xhx/module/notice/web/NoticeController.java
View file @
514e8130
...
@@ -4,6 +4,7 @@ import com.mortals.framework.exception.AppException;
...
@@ -4,6 +4,7 @@ import com.mortals.framework.exception.AppException;
import
com.mortals.framework.model.OrderCol
;
import
com.mortals.framework.model.OrderCol
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.common.code.YesNoEnum
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
...
@@ -52,7 +53,7 @@ public class NoticeController extends BaseCRUDJsonBodyMappingController<NoticeSe
...
@@ -52,7 +53,7 @@ public class NoticeController extends BaseCRUDJsonBodyMappingController<NoticeSe
@Override
@Override
protected
void
init
(
Map
<
String
,
Object
>
model
,
Context
context
)
{
protected
void
init
(
Map
<
String
,
Object
>
model
,
Context
context
)
{
this
.
addDict
(
model
,
"read"
,
paramService
.
getParamBySecondOrganize
(
"Notice"
,
"read"
));
this
.
addDict
(
model
,
"read"
,
YesNoEnum
.
getEnumMap
(
));
super
.
init
(
model
,
context
);
super
.
init
(
model
,
context
);
}
}
...
@@ -63,4 +64,14 @@ public class NoticeController extends BaseCRUDJsonBodyMappingController<NoticeSe
...
@@ -63,4 +64,14 @@ public class NoticeController extends BaseCRUDJsonBodyMappingController<NoticeSe
query
.
setOrderKind
(
OrderCol
.
DESCENDING
);
query
.
setOrderKind
(
OrderCol
.
DESCENDING
);
super
.
doListBefore
(
query
,
model
,
context
);
super
.
doListBefore
(
query
,
model
,
context
);
}
}
@Override
protected
int
viewAfter
(
Long
id
,
Map
<
String
,
Object
>
model
,
NoticeEntity
entity
,
Context
context
)
throws
AppException
{
NoticeEntity
noticeEntity
=
this
.
service
.
get
(
id
,
getContext
());
noticeEntity
.
setRead
(
YesNoEnum
.
YES
.
getValue
());
this
.
service
.
update
(
noticeEntity
,
getContext
());
return
super
.
viewAfter
(
id
,
model
,
entity
,
context
);
}
}
}
\ No newline at end of file
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