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
Show 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
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 =
VUE_APP_PORTAL_URL = /portal_home
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({
post
:
{
'
Content-Type
'
:
'
application/json;charset=UTF-8
'
,
'
dataType
'
:
'
json
'
,
}
},
transformResponse
:
[
data
=>
{
...
...
@@ -64,12 +32,11 @@ instance.interceptors.request.use(config => {
// 动态修改请求地址
console
.
log
(
config
.
url
)
if
(
config
.
url
.
startsWith
(
'
/
'
))
{
// 字符串以 / 开头
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}`;
...
...
refined-manager-ui/admin/src/components/HeaderSite.vue
View file @
514e8130
...
...
@@ -43,9 +43,9 @@
</div>
</
template
>
<
script
>
//
import { getSiteTree } from "@/services/businessMatter";
//
import { getSiteTree } from "@/services/businessMatter";
import
session
from
"
@/assets/utils/session
"
;
//
import Cookie from "js-cookie";
//
import Cookie from "js-cookie";
export
default
{
data
()
{
return
{
...
...
@@ -107,13 +107,12 @@ export default {
// this.getwaitedListdata(id);
},
getwaitedListdata
()
{
console
.
log
(
111111111111111
)
let
url
=
process
.
env
.
VUE_APP_SITETREE_URL
==
"
undefined
"
?
"
http://192.168.0.98:11078/base/site/siteTree
"
:
process
.
env
.
VUE_APP_SITETREE_URL
;
console
.
log
(
url
)
this
.
$get
(
url
).
then
((
res
)
=>
{
const
{
siteTree
}
=
res
.
data
;
this
.
sitelist
=
siteTree
;
...
...
refined-manager-ui/admin/src/views/appointment/config/list.vue
View file @
514e8130
...
...
@@ -4,19 +4,20 @@
</LayoutTable>
<dialog-show
ref=
"dialogform"
@
ok=
"getData"
/>
<dialog-show
ref=
"dialogform"
@
ok=
"getData"
/>
</div>
</
template
>
<
script
>
/** 表单弹出框模式需引入 */
import
dialogShow
from
"
./dialogshow
"
;
import
table
from
"
@/assets/mixins/table
"
;
export
default
{
/** 表单弹出框模式需引入 */
import
dialogShow
from
"
./dialogshow
"
;
import
table
from
"
@/assets/mixins/table
"
;
export
default
{
name
:
"
AppointmentConfigList
"
,
components
:
{
dialogShow
},
},
mixins
:
[
table
],
created
()
{
},
...
...
@@ -29,11 +30,13 @@
);
},
renderTableColumn
(
options
)
{
return
(
<
el
-
table
-
column
prop
=
{
options
.
prop
}
label
=
{
options
.
label
}
width
=
{
options
.
width
}
formatter
=
{
options
.
formatter
}
>
<
/el-table-column
>
);
...
...
@@ -55,41 +58,39 @@
data
()
{
return
{
/** 子表列元素 */
columnSet
:[
{
prop
:
"
aotoCheckCfgId
"
,
label
:
"
自动签到配置id
"
,
width
:
100
},
{
prop
:
"
serviceTimeStart
"
,
label
:
"
时间段时候开始时间
"
,
width
:
100
},
{
prop
:
"
serviceTimeEnd
"
,
label
:
"
时间段结束时间
"
,
width
:
100
},
{
prop
:
"
remark
"
,
label
:
"
备注
"
,
width
:
100
},
columnSet
:
[
{
prop
:
"
serviceTimeStart
"
,
label
:
"
服务开始时间
"
,
width
:
200
,
formatter
:
this
.
formatterDate
},
{
prop
:
"
serviceTimeEnd
"
,
label
:
"
服务结束时间
"
,
width
:
200
,
formatter
:
this
.
formatterDate
},
{
prop
:
"
remark
"
,
label
:
"
备注
"
,
width
:
100
},
],
config
:
{
search
:
[
],
search
:
[],
columns
:
[
{
type
:
"
selection
"
,
width
:
60
},
{
type
:
"
index
"
,
label
:
"
序号
"
,
width
:
50
},
{
type
:
"
index
"
,
label
:
"
序号
"
,
width
:
50
},
{
label
:
"
启用
"
,
prop
:
"
used
"
,
formatter
:
this
.
formatter
},
{
label
:
"
启用
"
,
prop
:
"
used
"
,
formatter
:
this
.
formatter
},
{
label
:
"
周一
"
,
prop
:
"
monday
"
,
formatter
:
this
.
formatter
},
{
label
:
"
周一
"
,
prop
:
"
monday
"
,
formatter
:
this
.
formatter
},
{
label
:
"
周二
"
,
prop
:
"
tuesday
"
,
formatter
:
this
.
formatter
},
{
label
:
"
周二
"
,
prop
:
"
tuesday
"
,
formatter
:
this
.
formatter
},
{
label
:
"
周三
"
,
prop
:
"
wednesday
"
,
formatter
:
this
.
formatter
},
{
label
:
"
周三
"
,
prop
:
"
wednesday
"
,
formatter
:
this
.
formatter
},
{
label
:
"
周四
"
,
prop
:
"
thursday
"
,
formatter
:
this
.
formatter
},
{
label
:
"
周四
"
,
prop
:
"
thursday
"
,
formatter
:
this
.
formatter
},
{
label
:
"
周五
"
,
prop
:
"
friday
"
,
formatter
:
this
.
formatter
},
{
label
:
"
周五
"
,
prop
:
"
friday
"
,
formatter
:
this
.
formatter
},
{
label
:
"
周六
"
,
prop
:
"
saturday
"
,
formatter
:
this
.
formatter
},
{
label
:
"
周六
"
,
prop
:
"
saturday
"
,
formatter
:
this
.
formatter
},
{
label
:
"
周日
"
,
prop
:
"
sunday
"
,
formatter
:
this
.
formatter
},
{
label
:
"
周日
"
,
prop
:
"
sunday
"
,
formatter
:
this
.
formatter
},
{
label
:
"
最大人数
"
,
prop
:
"
maxServicePersonNum
"
},
{
label
:
"
累计预警
"
,
prop
:
"
alertServiceNum
"
},
{
label
:
"
创建时间
"
,
prop
:
"
createUserTime
"
,
formatter
:
this
.
formatterDate
},
{
label
:
"
配置时间段
"
,
{
label
:
"
配置时间段
"
,
width
:
120
,
prop
:
"
subColumns
"
,
formatter
:
(
row
)
=>
{
...
...
@@ -109,7 +110,7 @@
width
:
240
,
formatter
:
row
=>
{
return
(
<
table
-
buttons
noAdd
row
=
{
row
}
onEdit
=
{
this
.
toEdit
}
onView
=
{
this
.
toView
}
onDel
=
{
this
.
toDel
}
/
>
<
table
-
buttons
noAdd
row
=
{
row
}
onEdit
=
{
this
.
toEdit
}
onView
=
{
this
.
toView
}
onDel
=
{
this
.
toDel
}
/
>
);
}
}
...
...
@@ -117,5 +118,5 @@
}
};
}
};
};
</
script
>
refined-manager-ui/admin/src/views/appointment/constraint/dialogshow.vue
View file @
514e8130
...
...
@@ -4,17 +4,10 @@
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"120px"
>
<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=
"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=
"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>
...
...
@@ -27,12 +20,13 @@
</
template
>
<
script
>
import
form
from
"
@/assets/mixins/formdialog
"
;
import
dialogShow
from
"
./dialogshow
"
;
export
default
{
import
form
from
"
@/assets/mixins/formdialog
"
;
import
dialogShow
from
"
./dialogshow
"
;
export
default
{
mixins
:
[
form
],
components
:
{
dialogShow
,
dialogShow
,
},
data
()
{
return
{
...
...
@@ -42,15 +36,14 @@
title
:
"
预约自动签到服务约束
"
,
// 是否显示弹出层
open
:
false
,
toString
:
[
toString
:
[
"
createMethod
"
,
"
constraint
"
,
"
idCardType
"
,
"
personId
"
,
],
// 表单校验
rules
:
{
}
rules
:
{}
};
},
...
...
@@ -58,10 +51,10 @@
/** 编辑 */
edit
(
row
)
{
this
.
reset
()
this
.
query
=
{
id
:
row
.
id
};
this
.
urls
.
currUrl
=
"
appointment/constraint/edit
"
;
this
.
query
=
{
id
:
row
.
id
};
this
.
urls
.
currUrl
=
"
appointment/constraint/edit
"
;
this
.
getData
();
this
.
pageInfo
.
type
=
"
edit
"
this
.
pageInfo
.
type
=
"
edit
"
this
.
title
=
"
修改预约自动签到服务约束
"
;
},
/** 新增 */
...
...
@@ -69,16 +62,16 @@
this
.
reset
()
this
.
urls
.
currUrl
=
"
appointment/constraint/add
"
;
this
.
getData
();
this
.
pageInfo
.
type
=
"
add
"
this
.
pageInfo
.
type
=
"
add
"
this
.
title
=
"
新增预约自动签到服务约束
"
;
},
/** 查看*/
view
(
row
)
{
this
.
reset
()
this
.
query
=
{
id
:
row
.
id
};
this
.
urls
.
currUrl
=
"
appointment/constraint/view
"
;
this
.
query
=
{
id
:
row
.
id
};
this
.
urls
.
currUrl
=
"
appointment/constraint/view
"
;
this
.
getData
();
this
.
pageInfo
.
type
=
"
view
"
this
.
pageInfo
.
type
=
"
view
"
this
.
title
=
"
预约自动签到服务约束详细
"
;
},
/**取消按钮 */
...
...
@@ -90,8 +83,8 @@
this
.
open
=
true
;
},
beforeSubmit
(
data
)
{
data
.
name
=
this
.
dict
[
'
personId
'
][
data
.
personId
];
beforeSubmit
(
data
)
{
data
.
name
=
this
.
dict
[
'
personId
'
][
data
.
personId
];
return
data
;
},
...
...
@@ -103,18 +96,18 @@
// 表单重置
reset
()
{
this
.
form
=
{
siteId
:
null
,
siteName
:
""
,
personId
:
null
,
name
:
""
,
contact
:
""
,
idCardType
:
""
,
idCardNo
:
""
,
accumulative
:
0
,
constraintTime
:
null
,
createMethod
:
null
,
operator
:
""
,
constraint
:
0
,
siteId
:
null
,
siteName
:
""
,
personId
:
null
,
name
:
""
,
contact
:
""
,
idCardType
:
""
,
idCardNo
:
""
,
accumulative
:
0
,
constraintTime
:
null
,
createMethod
:
null
,
operator
:
""
,
constraint
:
0
,
};
this
.
resetForm
(
"
form
"
);
},
...
...
@@ -124,5 +117,5 @@
}
},
},
};
};
</
script
>
refined-manager-ui/admin/src/views/appointment/constraint/list.vue
View file @
514e8130
...
...
@@ -66,6 +66,12 @@
return
{
config
:
{
search
:
[
{
name
:
"
name
"
,
type
:
"
text
"
,
label
:
"
姓名
"
,
fuzzy
:
true
}
],
columns
:
[
{
type
:
"
selection
"
,
width
:
60
},
...
...
refined-manager-ui/admin/src/views/care/config/list.vue
View file @
514e8130
...
...
@@ -34,6 +34,7 @@
prop
=
{
options
.
prop
}
label
=
{
options
.
label
}
width
=
{
options
.
width
}
formatter
=
{
options
.
formatter
}
>
<
/el-table-column
>
);
...
...
@@ -56,13 +57,13 @@
return
{
/** 子表列元素 */
columnSet
:[
{
prop
:
"
careCfgId
"
,
label
:
"
主动关怀配置id
"
,
width
:
100
},
{
prop
:
"
serviceTimeStart
"
,
label
:
"
时间段时候开始时间
"
,
width
:
100
},
{
prop
:
"
serviceTimeEnd
"
,
label
:
"
时间段结束时间
"
,
width
:
100
},
{
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
},
...
...
refined-manager-ui/admin/src/views/care/constraint/dialogshow.vue
View file @
514e8130
...
...
@@ -3,88 +3,11 @@
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"90%"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"120px"
>
<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=
"idCardType"
v-model=
"form.idCardType"
type=
"radio"
:enumData=
"dict.idCardType"
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-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>
<div
slot=
"footer"
class=
"dialog-footer"
>
<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
>
<!-- 弹出框表单 -->
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"90%"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"120px"
>
<el-row>
<Field
label=
"主动关怀约束Id"
prop=
"careId"
v-model=
"form.careId"
placeholder=
"请输入主动关怀约束Id"
/>
<Field
label=
"反馈人ID"
prop=
"feedbackId"
v-model=
"form.feedbackId"
placeholder=
"请输入反馈人ID"
/>
<Field
label=
"反馈人姓名"
prop=
"feedbackName"
v-model=
"form.feedbackName"
placeholder=
"请输入反馈人姓名"
/>
<Field
label=
"反馈内容"
prop=
"feedback"
v-model=
"form.feedback"
type=
"textarea"
placeholder=
"请输入反馈内容"
/>
<Field
label=
"跟踪时间"
prop=
"feedbackTime"
v-model=
"form.feedbackTime"
type=
"date"
/>
<Field
label=
"创建方式"
prop=
"createMethod"
v-model=
"form.createMethod"
placeholder=
"请输入创建方式"
/>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
>
<el-card
style=
"margin-bottom: 20px"
v-for=
"item in listData"
>
<div
slot=
"header"
>
<span
style=
"color: #3E7BFA"
>
{{
util_formatterDate
(
item
.
feedbackTime
)
}}
</span>
<span
>
{{
item
.
feedbackName
}}
</span>
</el-row>
</div>
<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"
v-if=
"pageInfo.type !== 'view'
"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
type=
"primary
"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</el-dialog>
</
template
>
<
script
>
import
form
from
"
@/assets/mixins/formdialog
"
;
import
dialogShow
from
"
./dialogshow
"
;
export
default
{
import
form
from
"
@/assets/mixins/formdialog
"
;
import
dialogShow
from
"
./dialogshow
"
;
export
default
{
mixins
:
[
form
],
components
:
{
dialogShow
,
dialogShow
,
},
data
()
{
return
{
activeNames
:
[
'
1
'
],
// 遮罩层
loading
:
true
,
// 弹出层标题
title
:
"
主动关怀服务追踪
"
,
// 是否显示弹出层
open
:
false
,
toString
:[
],
toString
:
[],
listData
:
[],
urls
:
{
saveUrl
:
"
/care/constraint/track/save
"
,
},
// 表单校验
rules
:
{
feedbackName
:
[
{
required
:
true
,
message
:
"
请输入反馈人姓名
"
,
trigger
:
"
blur
"
},
{
max
:
50
,
message
:
"
最多只能录入50个字符
"
,
trigger
:
"
blur
"
,},
{
required
:
true
,
message
:
"
请输入反馈人姓名
"
,
trigger
:
"
blur
"
},
{
max
:
50
,
message
:
"
最多只能录入50个字符
"
,
trigger
:
"
blur
"
,},
],
feedback
:
[
{
required
:
true
,
message
:
"
请输入反馈内容
"
,
trigger
:
"
blur
"
},
{
max
:
1024
,
message
:
"
最多只能录入1024个字符
"
,
trigger
:
"
blur
"
,},
{
required
:
true
,
message
:
"
请输入反馈内容
"
,
trigger
:
"
blur
"
},
{
max
:
1024
,
message
:
"
最多只能录入1024个字符
"
,
trigger
:
"
blur
"
,},
],
feedbackTime
:
[
{
required
:
true
,
message
:
"
请选择跟踪时间
"
},
{
required
:
true
,
message
:
"
请选择跟踪时间
"
},
],
createMethod
:
[
{
required
:
true
,
message
:
"
请输入创建方式
"
,
trigger
:
"
blur
"
},
{
max
:
50
,
message
:
"
最多只能录入50个字符
"
,
trigger
:
"
blur
"
,},
{
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
.
query
=
{
id
:
row
.
id
};
this
.
urls
.
currUrl
=
"
care/constraint/track/edit
"
;
this
.
getData
();
this
.
pageInfo
.
type
=
"
edit
"
this
.
pageInfo
.
type
=
"
edit
"
this
.
title
=
"
修改主动关怀服务追踪
"
;
},
/** 新增 */
...
...
@@ -74,16 +95,34 @@
this
.
reset
()
this
.
urls
.
currUrl
=
"
care/constraint/track/add
"
;
this
.
getData
();
this
.
pageInfo
.
type
=
"
add
"
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
)
{
console
.
log
(
res
.
data
.
data
)
this
.
open
=
true
;
this
.
listData
=
res
.
data
.
data
}
}
})
.
catch
((
error
)
=>
{
this
.
$message
.
error
(
error
.
message
);
});
this
.
reset
()
this
.
query
=
{
id
:
row
.
id
};
this
.
urls
.
currUrl
=
"
care/constraint/track/view
"
;
this
.
getData
();
this
.
pageInfo
.
type
=
"
view
"
this
.
query
=
{
careId
:
row
.
id
};
this
.
form
.
careId
=
row
.
id
;
this
.
urls
.
currUrl
=
"
care/constraint/track/view
"
;
// this.getData();
this
.
pageInfo
.
type
=
"
view
"
this
.
title
=
"
主动关怀服务追踪详细
"
;
},
/**取消按钮 */
...
...
@@ -103,12 +142,12 @@
// 表单重置
reset
()
{
this
.
form
=
{
careId
:
null
,
feedbackId
:
null
,
feedbackName
:
""
,
feedback
:
""
,
feedbackTime
:
null
,
createMethod
:
""
,
careId
:
null
,
feedbackId
:
null
,
feedbackName
:
""
,
feedback
:
""
,
feedbackTime
:
null
,
createMethod
:
""
,
};
this
.
resetForm
(
"
form
"
);
},
...
...
@@ -118,5 +157,15 @@
}
},
},
};
};
</
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 @@
{
label
:
"
主动关怀约束Id
"
,
prop
:
"
careId
"
,
formatter
:
this
.
formatter
},
{
label
:
"
反馈人ID
"
,
prop
:
"
feedbackId
"
,
formatter
:
this
.
formatter
},
{
label
:
"
反馈人姓名
"
,
prop
:
"
feedbackName
"
},
...
...
refined-manager-ui/admin/src/views/care/constraint/trackDrawerShow.vue
View file @
514e8130
...
...
@@ -5,45 +5,108 @@
:visible.sync=
"open"
:direction=
"direction"
size=
"90%"
>
<span>
抽屉 表格数据 todo
</span>
<el-divider></el-divider>
<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
>
<
script
>
import
moment
from
'
moment
'
;
export
default
{
export
default
{
name
:
"
trackDrawerShow
"
,
components
:
{
},
components
:
{},
created
()
{
console
.
log
(
this
.
$route
.
query
)
},
data
()
{
return
{
rows
:
6
,
form
:
{},
// 遮罩层
loading
:
true
,
// 弹出层标题
title
:
"
跟踪反馈数据
"
,
// 是否显示弹出层
open
:
false
,
direction
:
"
rtl
"
,
toString
:[
],
toDate
:[
],
direction
:
"
rtl
"
,
activeNames
:
[
'
content
'
],
listData
:
[],
toString
:
[],
toDate
:
[],
};
},
methods
:
{
formatDate
(
value
)
{
return
moment
(
value
).
format
(
"
YYYY-MM-DD HH:mm:ss
"
)
},
submitForm
(
row
)
{
},
view
(
row
)
{
this
.
open
=
true
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
>
<
style
scoped
>
.time
{
float
:
right
;
}
.content
{
margin-top
:
10px
;
}
</
style
>
refined-manager-ui/admin/src/views/notice/dialogshow.vue
View file @
514e8130
<
template
>
<!-- 弹出框表单 -->
<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>
<Field
label=
"接收消息的用户的唯一标识符"
prop=
"userId"
v-model=
"form.userId"
placeholder=
"请输入接收消息的用户的唯一标识符"
/>
<Field
label=
"消息的标题"
prop=
"title"
v-model=
"form.title"
type=
"textarea"
placeholder=
"请输入消息的标题"
/>
<Field
label=
"消息的内容"
><editor
v-model=
"form.content"
:min-height=
"256"
/></Field>
<Field
label=
"是否已读 "
prop=
"read"
v-model=
"form.read"
type=
"radio"
:enumData=
"dict.read"
/>
<Field
label=
"消息的优先级,越高表示越紧急,不为空"
prop=
"priority"
v-model=
"form.priority"
placeholder=
"请输入消息的优先级,越高表示越紧急,不为空"
/>
<Field
label=
"消息的过期时间,超过此时间则自动标记为已读"
prop=
"expireTime"
v-model=
"form.expireTime"
type=
"date"
/>
<Field
label=
"消息的来源类型,例如“系统”、“好友”等,可以为空"
prop=
"sourceType"
v-model=
"form.sourceType"
placeholder=
"请输入消息的来源类型,例如“系统”、“好友”等,可以为空"
/>
<Field
label=
"消息的标题"
span=
"20"
prop=
"title"
v-model=
"form.title"
type=
"textarea"
placeholder=
"请输入消息的标题"
/>
<Field
span=
"20"
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
span=
"20"
label=
"消息的优先级"
prop=
"priority"
v-model=
"form.priority"
placeholder=
"请输入消息的优先级"
/>
<Field
span=
"20"
label=
"消息的过期时间"
prop=
"expireTime"
v-model=
"form.expireTime"
type=
"date"
/>
<Field
span=
"20"
label=
"消息的来源类型"
prop=
"sourceType"
v-model=
"form.sourceType"
placeholder=
"请输入消息的来源类型"
/>
</el-row>
...
...
@@ -39,7 +38,9 @@
title
:
"
用户消息
"
,
// 是否显示弹出层
open
:
false
,
toString
:[
toString
:[
"
read
"
,
"
sourceType
"
],
toDate
:[
"
expireTime
"
],
// 表单校验
rules
:
{
...
...
refined-manager-ui/admin/src/views/notice/list.vue
View file @
514e8130
<
template
>
<div
class=
"page"
>
<LayoutTable
:data=
"tableData"
:config=
"tableConfig"
>
<LayoutTable
notAdd
:data=
"tableData"
:config=
"tableConfig"
>
</LayoutTable>
<dialog-show
ref=
"dialogform"
@
ok=
"getData"
/>
</div>
</
template
>
...
...
@@ -44,23 +43,21 @@
{
type
:
"
selection
"
,
width
:
60
},
{
type
:
"
index
"
,
label
:
"
序号
"
,
width
:
50
},
{
label
:
"
接收消息的用户的唯一标识符
"
,
prop
:
"
userId
"
,
formatter
:
this
.
formatter
},
{
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
:
"
操作
"
,
width
:
240
,
formatter
:
row
=>
{
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
}
/
>
);
}
}
...
...
refined-manager-ui/admin/src/views/notice/view.vue
View file @
514e8130
...
...
@@ -8,25 +8,23 @@
<
template
slot=
"extra"
>
<el-button
type=
"primary"
@
click=
"$router.go(-1)"
size=
"small"
>
返回
</el-button>
</
template
>
<el-descriptions-item
label=
"接收消息的用户的唯一标识符"
label-class-name=
"labelClass"
content-class-name=
"contentClass"
>
{{form.userId}}
</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.title}}
</el-descriptions-item>
<el-descriptions-item
label=
"消息的内容"
label-class-name=
"labelClass"
content-class-name=
"contentClass"
>
<editor
v-model=
"form.content"
:min-height=
"256"
/>
<el-descriptions-item
span=
"20"
label=
"消息的内容"
label-class-name=
"labelClass"
content-class-name=
"contentClass"
>
{{form.content}}
</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) }}
</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}}
</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)}}
</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}}
</el-descriptions-item>
</el-descriptions>
...
...
refined-manager/src/main/java/com/mortals/xhx/daemon/task/SyncSubmitAppointTaskImpl.java
View file @
514e8130
...
...
@@ -57,6 +57,13 @@ public class SyncSubmitAppointTaskImpl implements ITaskExcuteService {
appointmentRecordsQuery
.
setCreateTime
(
DateUtils
.
getCurrDate
());
List
<
AppointmentRecordsEntity
>
appointmentRecordsList
=
appointmentRecordsService
.
find
(
appointmentRecordsQuery
);
for
(
AppointmentRecordsEntity
appointmentRecordsEntity
:
appointmentRecordsList
)
{
doTakeNum
(
url
,
appointmentRecordsEntity
);
}
}
private
void
doTakeNum
(
String
url
,
AppointmentRecordsEntity
appointmentRecordsEntity
)
{
//请求取号
AppointReq
appointReq
=
new
AppointReq
();
appointReq
.
setSiteid
(
appointmentRecordsEntity
.
getSiteId
());
...
...
@@ -76,9 +83,6 @@ public class SyncSubmitAppointTaskImpl implements ITaskExcuteService {
appointmentRecordsEntity
.
setUpdateUserName
(
"system"
);
appointmentRecordsService
.
update
(
appointmentRecordsEntity
);
}
}
}
...
...
refined-manager/src/main/java/com/mortals/xhx/module/appointment/service/AppointmentRecordsService.java
View file @
514e8130
package
com.mortals.xhx.module.appointment.service
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.service.ICRUDService
;
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
>{
/**
* 预约取号
* @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
;
import
org.springframework.stereotype.Service
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.framework.exception.AppException
;
...
...
@@ -11,17 +12,18 @@ import com.mortals.xhx.module.appointment.model.AppointmentConfigTimesEntity;
import
com.mortals.xhx.module.appointment.model.AppointmentConfigTimesQuery
;
import
com.mortals.xhx.module.appointment.service.AppointmentConfigTimesService
;
import
org.springframework.util.ObjectUtils
;
import
java.util.Date
;
import
java.util.Arrays
;
import
java.util.List
;
/**
* AppointmentConfigService
* 预约自动签到配置 service实现
*
* @author zxfei
* @date 2023-04-09
*/
* AppointmentConfigService
* 预约自动签到配置 service实现
*
* @author zxfei
* @date 2023-04-09
*/
@Service
(
"appointmentConfigService"
)
public
class
AppointmentConfigServiceImpl
extends
AbstractCRUDServiceImpl
<
AppointmentConfigDao
,
AppointmentConfigEntity
,
Long
>
implements
AppointmentConfigService
{
@Autowired
...
...
@@ -29,11 +31,11 @@ public class AppointmentConfigServiceImpl extends AbstractCRUDServiceImpl<Appoin
@Override
protected
void
saveAfter
(
AppointmentConfigEntity
entity
,
Context
context
)
throws
AppException
{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getAppointmentConfigTimesList
())){
entity
.
getAppointmentConfigTimesList
().
stream
().
peek
(
item
->{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getAppointmentConfigTimesList
()))
{
appointmentConfigTimesService
.
remove
(
new
AppointmentConfigTimesQuery
().
aotoCheckCfgId
(
entity
.
getId
()),
context
);
entity
.
getAppointmentConfigTimesList
().
stream
().
peek
(
item
->
{
item
.
setAotoCheckCfgId
(
entity
.
getId
());
item
.
setCreateUser
(
context
.
getUser
().
getLoginName
());
item
.
setCreateUserId
(
context
.
getUser
().
getId
());
item
.
setCreateUserId
(
this
.
getContextUserId
(
context
));
item
.
setCreateTime
(
new
Date
());
}).
count
();
appointmentConfigTimesService
.
save
(
entity
.
getAppointmentConfigTimesList
());
...
...
@@ -43,16 +45,14 @@ public class AppointmentConfigServiceImpl extends AbstractCRUDServiceImpl<Appoin
@Override
protected
void
updateAfter
(
AppointmentConfigEntity
entity
,
Context
context
)
throws
AppException
{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getAppointmentConfigTimesList
()))
{
Long
[]
appointmentConfigTimesIds
=
appointmentConfigTimesService
.
find
(
new
AppointmentConfigTimesQuery
().
aotoCheckCfgId
(
entity
.
getId
())).
stream
().
map
(
AppointmentConfigTimesEntity:
:
getId
).
toArray
(
Long
[]::
new
);
appointmentConfigTimesService
.
remove
(
appointmentConfigTimesIds
,
context
);
entity
.
getAppointmentConfigTimesList
().
stream
().
peek
(
item
->{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getAppointmentConfigTimesList
()))
{
appointmentConfigTimesService
.
remove
(
new
AppointmentConfigTimesQuery
().
aotoCheckCfgId
(
entity
.
getId
()),
context
);
entity
.
getAppointmentConfigTimesList
().
stream
().
peek
(
item
->
{
item
.
setAotoCheckCfgId
(
entity
.
getId
());
item
.
setCreateUser
(
context
.
getUser
().
getLoginName
());
item
.
setCreateUserId
(
context
.
getUser
().
getId
());
item
.
setCreateUserId
(
this
.
getContextUserId
(
context
));
item
.
setCreateTime
(
new
Date
());
item
.
setUpdateUser
(
context
.
getUser
().
getLoginName
());
item
.
setUpdateUserId
(
context
.
getUser
().
getId
());
item
.
setUpdateUserId
(
this
.
getContextUserId
(
context
));
item
.
setUpdateTime
(
new
Date
());
}).
count
();
appointmentConfigTimesService
.
save
(
entity
.
getAppointmentConfigTimesList
());
...
...
@@ -63,7 +63,7 @@ public class AppointmentConfigServiceImpl extends AbstractCRUDServiceImpl<Appoin
@Override
protected
void
removeAfter
(
Long
[]
ids
,
Context
context
,
int
result
)
throws
AppException
{
List
<
AppointmentConfigTimesEntity
>
appointmentConfigTimeslist
=
appointmentConfigTimesService
.
find
(
new
AppointmentConfigTimesQuery
().
aotoCheckCfgIdList
(
Arrays
.
asList
(
ids
)));
appointmentConfigTimesService
.
removeList
(
appointmentConfigTimeslist
,
context
);
appointmentConfigTimesService
.
removeList
(
appointmentConfigTimeslist
,
context
);
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
;
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.service.PersonService
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -23,26 +25,33 @@ import org.springframework.util.ObjectUtils;
@Service
(
"appointmentConstraintService"
)
public
class
AppointmentConstraintServiceImpl
extends
AbstractCRUDServiceImpl
<
AppointmentConstraintDao
,
AppointmentConstraintEntity
,
Long
>
implements
AppointmentConstraintService
{
@Autowired
private
PersonService
personService
;
@Override
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
);
}
@Override
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
);
}
@Override
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
(
"修改成功"
);
}
}
\ 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
;
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
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.framework.exception.AppException
;
...
...
@@ -6,14 +23,70 @@ import com.mortals.framework.model.Context;
import
com.mortals.xhx.module.appointment.dao.AppointmentRecordsDao
;
import
com.mortals.xhx.module.appointment.model.AppointmentRecordsEntity
;
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
* 预约签到记录 service实现
*
* @author zxfei
* @date 2023-04-17
*/
* AppointmentRecordsService
* 预约签到记录 service实现
*
* @author zxfei
* @date 2023-04-17
*/
@Service
(
"appointmentRecordsService"
)
@Slf4j
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;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.common.code.YesNoEnum
;
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.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -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 {
*/
private
Integer
maxServicePersonNum
;
/**
* 服务阈值设置
,单位分钟
* 服务阈值设置
*/
@Excel
(
name
=
"服务阈值设置,单位分钟"
)
private
Long
serviceThreshold
;
...
...
@@ -435,7 +435,7 @@ public class CareConfigEntity extends CareConfigVo {
this
.
serviceThreshold
=
0L
;
this
.
alertServiceNum
=
20
0
;
this
.
alertServiceNum
=
1
0
;
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
;
import
com.mortals.xhx.module.care.model.CareConfigQuery
;
import
org.springframework.stereotype.Service
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.framework.exception.AppException
;
...
...
@@ -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.service.CareConfigTimesService
;
import
org.springframework.util.ObjectUtils
;
import
java.util.Date
;
import
java.util.Arrays
;
import
java.util.List
;
/**
* CareConfigService
* 主动关怀配置 service实现
*
* @author zxfei
* @date 2023-04-09
*/
* CareConfigService
* 主动关怀配置 service实现
*
* @author zxfei
* @date 2023-04-09
*/
@Service
(
"careConfigService"
)
public
class
CareConfigServiceImpl
extends
AbstractCRUDServiceImpl
<
CareConfigDao
,
CareConfigEntity
,
Long
>
implements
CareConfigService
{
@Autowired
private
CareConfigTimesService
careConfigTimesService
;
@Override
protected
void
saveAfter
(
CareConfigEntity
entity
,
Context
context
)
throws
AppException
{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getCareConfigTimesList
())){
entity
.
getCareConfigTimesList
().
stream
().
peek
(
item
->{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getCareConfigTimesList
()))
{
careConfigTimesService
.
remove
(
new
CareConfigTimesQuery
().
careCfgId
(
entity
.
getId
()),
context
);
entity
.
getCareConfigTimesList
().
stream
().
peek
(
item
->
{
item
.
setCareCfgId
(
entity
.
getId
());
item
.
setCreateUser
(
context
.
getUser
().
getLoginName
());
item
.
setCreateUserId
(
context
.
getUser
().
getId
());
item
.
setCreateUserId
(
this
.
getContextUserId
(
context
));
item
.
setCreateTime
(
new
Date
());
}).
count
();
careConfigTimesService
.
save
(
entity
.
getCareConfigTimesList
());
...
...
@@ -43,16 +47,13 @@ public class CareConfigServiceImpl extends AbstractCRUDServiceImpl<CareConfigDao
@Override
protected
void
updateAfter
(
CareConfigEntity
entity
,
Context
context
)
throws
AppException
{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getCareConfigTimesList
())){
Long
[]
careConfigTimesIds
=
careConfigTimesService
.
find
(
new
CareConfigTimesQuery
().
careCfgId
(
entity
.
getId
())).
stream
().
map
(
CareConfigTimesEntity:
:
getId
).
toArray
(
Long
[]::
new
);
careConfigTimesService
.
remove
(
careConfigTimesIds
,
context
);
entity
.
getCareConfigTimesList
().
stream
().
peek
(
item
->{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getCareConfigTimesList
()))
{
careConfigTimesService
.
remove
(
new
CareConfigTimesQuery
().
careCfgId
(
entity
.
getId
()),
context
);
entity
.
getCareConfigTimesList
().
stream
().
peek
(
item
->
{
item
.
setCareCfgId
(
entity
.
getId
());
item
.
setCreateUser
(
context
.
getUser
().
getLoginName
());
item
.
setCreateUserId
(
context
.
getUser
().
getId
());
item
.
setCreateUserId
(
this
.
getContextUserId
(
context
));
item
.
setCreateTime
(
new
Date
());
item
.
setUpdateUser
(
context
.
getUser
().
getLoginName
());
item
.
setUpdateUserId
(
context
.
getUser
().
getId
());
item
.
setUpdateUserId
(
this
.
getContextUserId
(
context
));
item
.
setUpdateTime
(
new
Date
());
}).
count
();
careConfigTimesService
.
save
(
entity
.
getCareConfigTimesList
());
...
...
@@ -63,7 +64,7 @@ public class CareConfigServiceImpl extends AbstractCRUDServiceImpl<CareConfigDao
@Override
protected
void
removeAfter
(
Long
[]
ids
,
Context
context
,
int
result
)
throws
AppException
{
List
<
CareConfigTimesEntity
>
careConfigTimeslist
=
careConfigTimesService
.
find
(
new
CareConfigTimesQuery
().
careCfgIdList
(
Arrays
.
asList
(
ids
)));
careConfigTimesService
.
removeList
(
careConfigTimeslist
,
context
);
careConfigTimesService
.
removeList
(
careConfigTimeslist
,
context
);
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
;
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
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.framework.exception.AppException
;
...
...
@@ -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.service.CareConstraintTrackService
;
import
org.springframework.util.ObjectUtils
;
import
java.util.Date
;
import
java.util.Arrays
;
import
java.util.List
;
/**
* CareConstraintService
* 主动关怀服务约束 service实现
*
* @author zxfei
* @date 2023-04-09
*/
* CareConstraintService
* 主动关怀服务约束 service实现
*
* @author zxfei
* @date 2023-04-09
*/
@Service
(
"careConstraintService"
)
public
class
CareConstraintServiceImpl
extends
AbstractCRUDServiceImpl
<
CareConstraintDao
,
CareConstraintEntity
,
Long
>
implements
CareConstraintService
{
@Autowired
...
...
@@ -30,23 +35,30 @@ public class CareConstraintServiceImpl extends AbstractCRUDServiceImpl<CareConst
@Override
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
);
}
@Override
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
);
}
@Override
protected
void
saveAfter
(
CareConstraintEntity
entity
,
Context
context
)
throws
AppException
{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getCareConstraintTrackList
()))
{
entity
.
getCareConstraintTrackList
().
stream
().
peek
(
item
->
{
if
(!
ObjectUtils
.
isEmpty
(
entity
.
getCareConstraintTrackList
()))
{
entity
.
getCareConstraintTrackList
().
stream
().
peek
(
item
->
{
item
.
setCareId
(
entity
.
getId
());
item
.
setCreateUser
(
context
.
getUser
().
getLoginName
());
item
.
setCreateUserId
(
context
.
getUser
().
getId
());
item
.
setCreateUserId
(
this
.
getContextUserId
(
context
));
item
.
setCreateTime
(
new
Date
());
}).
count
();
careConstraintTrackService
.
save
(
entity
.
getCareConstraintTrackList
());
...
...
@@ -56,16 +68,14 @@ public class CareConstraintServiceImpl extends AbstractCRUDServiceImpl<CareConst
@Override
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
);
careConstraintTrackService
.
remove
(
careConstraintTrackIds
,
context
);
entity
.
getCareConstraintTrackList
().
stream
().
peek
(
item
->{
careConstraintTrackService
.
remove
(
careConstraintTrackIds
,
context
);
entity
.
getCareConstraintTrackList
().
stream
().
peek
(
item
->
{
item
.
setCareId
(
entity
.
getId
());
item
.
setCreateUser
(
context
.
getUser
().
getLoginName
());
item
.
setCreateUserId
(
context
.
getUser
().
getId
());
item
.
setCreateUserId
(
this
.
getContextUserId
(
context
));
item
.
setCreateTime
(
new
Date
());
item
.
setUpdateUser
(
context
.
getUser
().
getLoginName
());
item
.
setUpdateUserId
(
context
.
getUser
().
getId
());
item
.
setUpdateUserId
(
this
.
getContextUserId
(
context
));
item
.
setUpdateTime
(
new
Date
());
}).
count
();
careConstraintTrackService
.
save
(
entity
.
getCareConstraintTrackList
());
...
...
@@ -76,7 +86,7 @@ public class CareConstraintServiceImpl extends AbstractCRUDServiceImpl<CareConst
@Override
protected
void
removeAfter
(
Long
[]
ids
,
Context
context
,
int
result
)
throws
AppException
{
List
<
CareConstraintTrackEntity
>
careConstraintTracklist
=
careConstraintTrackService
.
find
(
new
CareConstraintTrackQuery
().
careIdList
(
Arrays
.
asList
(
ids
)));
careConstraintTrackService
.
removeList
(
careConstraintTracklist
,
context
);
careConstraintTrackService
.
removeList
(
careConstraintTracklist
,
context
);
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
;
import
com.mortals.xhx.common.code.CreateMethodEnum
;
import
org.springframework.stereotype.Service
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.framework.exception.AppException
;
...
...
@@ -6,14 +8,27 @@ import com.mortals.framework.model.Context;
import
com.mortals.xhx.module.care.dao.CareConstraintTrackDao
;
import
com.mortals.xhx.module.care.model.CareConstraintTrackEntity
;
import
com.mortals.xhx.module.care.service.CareConstraintTrackService
;
import
java.util.Date
;
/**
* CareConstraintTrackService
* 主动关怀服务追踪 service实现
*
* @author zxfei
* @date 2023-04-09
*/
* CareConstraintTrackService
* 主动关怀服务追踪 service实现
*
* @author zxfei
* @date 2023-04-09
*/
@Service
(
"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;
import
com.mortals.xhx.common.code.YesNoEnum
;
import
com.mortals.xhx.common.key.ParamKey
;
import
com.mortals.xhx.module.care.dao.CareRecordsDao
;
import
com.mortals.xhx.module.care.model.CareRecordsEntity
;
import
com.mortals.xhx.module.care.model.CareRecordsQuery
;
import
com.mortals.xhx.module.care.model.*
;
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.notice.model.NoticeEntity
;
import
com.mortals.xhx.module.notice.service.NoticeService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.time.DateUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -46,6 +48,13 @@ import java.util.stream.Collectors;
public
class
CareRecordsServiceImpl
extends
AbstractCRUDServiceImpl
<
CareRecordsDao
,
CareRecordsEntity
,
Long
>
implements
CareRecordsService
{
@Autowired
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}"
)
private
String
smsSendUrl
;
...
...
@@ -77,10 +86,9 @@ public class CareRecordsServiceImpl extends AbstractCRUDServiceImpl<CareRecordsD
}).
collect
(
Collectors
.
toList
());
if
(
ObjectUtils
.
isEmpty
(
noticeList
))
{
//
noticeService.save(noticeList);
noticeService
.
save
(
noticeList
);
}
return
Rest
.
ok
(
"通知负责人成功"
);
}
...
...
@@ -88,17 +96,29 @@ public class CareRecordsServiceImpl extends AbstractCRUDServiceImpl<CareRecordsD
public
Rest
<
String
>
toCare
(
CareRecordsEntity
careRecordsEntity
,
Context
context
)
{
if
(
ObjectUtils
.
isEmpty
(
careRecordsEntity
.
getContact
()))
{
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
;
try
{
SmsThirdPartyReq
smsThirdPartyReq
=
new
SmsThirdPartyReq
();
smsThirdPartyReq
.
setAppid
(
apiId
);
smsThirdPartyReq
.
setPhone
(
careRecordsEntity
.
getContact
());
smsThirdPartyReq
.
setType
(
ParamKey
.
SYS_PARAM_SMS_PERSON_CARE_TYPE
);
Map
<
String
,
String
>
form
=
new
HashMap
<>();
EntityUtil
.
entityToMap
(
smsThirdPartyReq
,
form
);
resp
=
HttpUtil
.
doPost
(
smsSendUrl
,
form
);
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
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
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.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -54,5 +57,12 @@ public class CareConfigController extends BaseCRUDJsonBodyMappingController<Care
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;
import
com.mortals.framework.model.OrderCol
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
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.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
...
...
@@ -52,7 +53,7 @@ public class NoticeController extends BaseCRUDJsonBodyMappingController<NoticeSe
@Override
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
);
}
...
...
@@ -63,4 +64,14 @@ public class NoticeController extends BaseCRUDJsonBodyMappingController<NoticeSe
query
.
setOrderKind
(
OrderCol
.
DESCENDING
);
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