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
0b6f034d
Commit
0b6f034d
authored
2 years ago
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加关怀配置控制
parent
90054b56
Changes
29
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
3103 additions
and
2061 deletions
+3103
-2061
db/module.sql
db/module.sql
+14
-3
doc/精细化管理系统.docx
doc/精细化管理系统.docx
+0
-0
refined-manager/pom.xml
refined-manager/pom.xml
+4
-6
refined-manager/src/main/java/com/mortals/xhx/busiz/req/SmsThirdPartyReq.java
...main/java/com/mortals/xhx/busiz/req/SmsThirdPartyReq.java
+53
-0
refined-manager/src/main/java/com/mortals/xhx/busiz/rsp/ApiSmsResp.java
...r/src/main/java/com/mortals/xhx/busiz/rsp/ApiSmsResp.java
+23
-0
refined-manager/src/main/java/com/mortals/xhx/busiz/rsp/wait/FinPersonInfo.java
...in/java/com/mortals/xhx/busiz/rsp/wait/FinPersonInfo.java
+17
-0
refined-manager/src/main/java/com/mortals/xhx/busiz/rsp/wait/WaitPersonInfo.java
...n/java/com/mortals/xhx/busiz/rsp/wait/WaitPersonInfo.java
+53
-0
refined-manager/src/main/java/com/mortals/xhx/common/code/WeekDayEnum.java
...rc/main/java/com/mortals/xhx/common/code/WeekDayEnum.java
+76
-0
refined-manager/src/main/java/com/mortals/xhx/common/key/ParamKey.java
...er/src/main/java/com/mortals/xhx/common/key/ParamKey.java
+1
-1
refined-manager/src/main/java/com/mortals/xhx/common/key/RedisKey.java
...er/src/main/java/com/mortals/xhx/common/key/RedisKey.java
+8
-2
refined-manager/src/main/java/com/mortals/xhx/daemon/task/SyncAppointWaitAndFinTaskImpl.java
...ortals/xhx/daemon/task/SyncAppointWaitAndFinTaskImpl.java
+238
-0
refined-manager/src/main/java/com/mortals/xhx/daemon/task/SyncAppointmentPersonTaskImpl.java
...ortals/xhx/daemon/task/SyncAppointmentPersonTaskImpl.java
+4
-63
refined-manager/src/main/java/com/mortals/xhx/daemon/task/SyncRegisterUserTaskImpl.java
...com/mortals/xhx/daemon/task/SyncRegisterUserTaskImpl.java
+10
-7
refined-manager/src/main/java/com/mortals/xhx/daemon/task/readme.txt
...ager/src/main/java/com/mortals/xhx/daemon/task/readme.txt
+0
-1
refined-manager/src/main/java/com/mortals/xhx/module/care/model/CareConfigEntity.java
...a/com/mortals/xhx/module/care/model/CareConfigEntity.java
+0
-1
refined-manager/src/main/java/com/mortals/xhx/module/care/model/CareRecordsEntity.java
.../com/mortals/xhx/module/care/model/CareRecordsEntity.java
+89
-266
refined-manager/src/main/java/com/mortals/xhx/module/care/model/CareRecordsQuery.java
...a/com/mortals/xhx/module/care/model/CareRecordsQuery.java
+1297
-751
refined-manager/src/main/java/com/mortals/xhx/module/care/model/vo/CareRecordsVo.java
...a/com/mortals/xhx/module/care/model/vo/CareRecordsVo.java
+74
-5
refined-manager/src/main/java/com/mortals/xhx/module/care/service/CareRecordsService.java
...m/mortals/xhx/module/care/service/CareRecordsService.java
+10
-8
refined-manager/src/main/java/com/mortals/xhx/module/care/service/impl/CareRecordsServiceImpl.java
.../xhx/module/care/service/impl/CareRecordsServiceImpl.java
+101
-11
refined-manager/src/main/java/com/mortals/xhx/module/care/web/CareRecordsController.java
...om/mortals/xhx/module/care/web/CareRecordsController.java
+4
-4
refined-manager/src/main/java/com/mortals/xhx/module/notice/web/NoticeController.java
...a/com/mortals/xhx/module/notice/web/NoticeController.java
+27
-11
refined-manager/src/main/java/com/mortals/xhx/module/person/model/PersonEntity.java
...ava/com/mortals/xhx/module/person/model/PersonEntity.java
+7
-259
refined-manager/src/main/java/com/mortals/xhx/module/person/model/vo/PersonVo.java
...java/com/mortals/xhx/module/person/model/vo/PersonVo.java
+3
-0
refined-manager/src/main/java/com/mortals/xhx/module/person/web/PersonController.java
...a/com/mortals/xhx/module/person/web/PersonController.java
+3
-4
refined-manager/src/main/resources/bootstrap.yml
refined-manager/src/main/resources/bootstrap.yml
+1
-1
refined-manager/src/main/resources/sqlmap/module/care/CareRecordsMapper.xml
...c/main/resources/sqlmap/module/care/CareRecordsMapper.xml
+953
-657
refined-manager/src/test/java/com/mortals/httpclient/Test.java
...ed-manager/src/test/java/com/mortals/httpclient/Test.java
+24
-0
refined-manager/src/test/java/com/mortals/httpclient/person/PersonController.http
.../java/com/mortals/httpclient/person/PersonController.http
+9
-0
No files found.
db/module.sql
View file @
0b6f034d
...
...
@@ -69,19 +69,30 @@ CREATE TABLE mortals_xhx_care_records(
`name`
varchar
(
50
)
COMMENT
'姓名'
,
`contact`
varchar
(
50
)
COMMENT
'联系方式'
,
`idCard`
varchar
(
18
)
COMMENT
'身份证号码'
,
`bussinessId`
bigint
(
20
)
COMMENT
'业务Id'
,
`bussinessName`
varchar
(
255
)
COMMENT
'预约业务'
,
`service`
varchar
(
50
)
COMMENT
'办理业务'
,
`queueNo`
varchar
(
20
)
COMMENT
'排队编号'
,
`takeTime`
datetime
COMMENT
'排队开始时间'
,
`callTime`
datetime
COMMENT
'排队结束时间'
,
`monitorTime`
datetime
COMMENT
'监测时间'
,
`monitorDeviceId
`
bigint
(
20
)
COMMENT
'监测设备id
'
,
`monitorDeviceId
s`
varchar
(
128
)
COMMENT
'监测设备ids
'
,
`monitorDevice`
varchar
(
50
)
COMMENT
'监测设备'
,
`waitTime`
int
(
11
)
COMMENT
'最终等待时长,秒'
,
`processStatus`
varchar
(
20
)
COMMENT
'办理状态(排队中.排队中,办理中.办理中,接件结束.接件结束)'
,
`waitTime`
int
(
4
)
COMMENT
'最终等待时长,秒'
,
`processStatus`
varchar
(
20
)
DEFAULT
'排队中'
COMMENT
'办理状态(排队中,办理中,接件结束)'
,
`careCount`
int
(
4
)
DEFAULT
'0'
COMMENT
'关怀次数'
,
`assessment`
varchar
(
255
)
COMMENT
'评价'
,
`createTime`
datetime
COMMENT
'创建时间'
,
`createUserId`
bigint
(
20
)
COMMENT
'创建人ID'
,
`updateTime`
datetime
COMMENT
'更新时间'
,
`updateUserId`
bigint
(
20
)
COMMENT
'更新人ID'
,
`smsCount`
int
(
4
)
DEFAULT
'0'
COMMENT
'短信发送次数'
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8
COMMENT
=
'预约关怀记录'
;
-- ----------------------------
-- 预约自动签到配置表
-- ----------------------------
...
...
This diff is collapsed.
Click to expand it.
doc/精细化管理系统.docx
View file @
0b6f034d
No preview for this file type
This diff is collapsed.
Click to expand it.
refined-manager/pom.xml
View file @
0b6f034d
...
...
@@ -32,9 +32,8 @@
<profiles.log.level>
info
</profiles.log.level>
<profiles.publish.path>
/home/publish
</profiles.publish.path>
<profiles.php.host>
http://192.168.0.98:8090
</profiles.php.host>
<profiles.sms.smsSendUrl>
http://127.0.0.1:8089/api/index/index
</profiles.sms.smsSendUrl>
<profiles.sms.apiId>
k6BVS1PEbyzcJAE4
</profiles.sms.apiId>
<profiles.sms.type>
3
</profiles.sms.type>
<profiles.sms.smsSendUrl>
http://sms.wx3.com.cn
</profiles.sms.smsSendUrl>
<profiles.sms.apiId>
ADsUXLrS81vZDU95
</profiles.sms.apiId>
<profiles.hik.host>
8.136.255.30:8001
</profiles.hik.host>
<profiles.hik.appKey>
25128371
</profiles.hik.appKey>
<profiles.hik.appSecret>
2m9RcPJOKq5j2QPQM4v5
</profiles.hik.appSecret>
...
...
@@ -57,9 +56,8 @@
<profiles.log.path>
/home/mortals/app/logs
</profiles.log.path>
<profiles.log.level>
INFO
</profiles.log.level>
<profiles.php.host>
http://192.168.0.98:8090
</profiles.php.host>
<profiles.sms.smsSendUrl>
http://127.0.0.1:8089/api/index/index
</profiles.sms.smsSendUrl>
<profiles.sms.apiId>
k6BVS1PEbyzcJAE4
</profiles.sms.apiId>
<profiles.sms.type>
3
</profiles.sms.type>
<profiles.sms.smsSendUrl>
http://sms.wx3.com.cn
</profiles.sms.smsSendUrl>
<profiles.sms.apiId>
ADsUXLrS81vZDU95
</profiles.sms.apiId>
<profiles.hik.host>
8.136.255.30:8001
</profiles.hik.host>
<profiles.hik.appKey>
25128371
</profiles.hik.appKey>
<profiles.hik.appSecret>
2m9RcPJOKq5j2QPQM4v5
</profiles.hik.appSecret>
...
...
This diff is collapsed.
Click to expand it.
refined-manager/src/main/java/com/mortals/xhx/busiz/req/SmsThirdPartyReq.java
0 → 100644
View file @
0b6f034d
package
com.mortals.xhx.busiz.req
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
lombok.Data
;
/**
* 短信发送类
*
* @author:
* @date: 2022/9/7 14:35
*/
@Data
public
class
SmsThirdPartyReq
{
/**
*
*/
@JSONField
(
serialize
=
false
)
private
Long
alarmSmsSendId
;
/**
* appid
*/
private
String
appid
;
/**
* 手机号码
*/
private
String
phone
;
/**
* 模板号
*/
private
String
type
;
/**
* 内容
*/
private
String
json
;
public
static
void
main
(
String
[]
args
)
{
SmsThirdPartyReq
smsThirdPartyReq
=
new
SmsThirdPartyReq
();
smsThirdPartyReq
.
setAlarmSmsSendId
(
0L
);
smsThirdPartyReq
.
setAppid
(
"12"
);
smsThirdPartyReq
.
setPhone
(
"31"
);
smsThirdPartyReq
.
setType
(
"123"
);
smsThirdPartyReq
.
setJson
(
"13213"
);
System
.
out
.
println
(
JSON
.
toJSONString
(
smsThirdPartyReq
));
}
}
This diff is collapsed.
Click to expand it.
refined-manager/src/main/java/com/mortals/xhx/busiz/rsp/ApiSmsResp.java
0 → 100644
View file @
0b6f034d
package
com.mortals.xhx.busiz.rsp
;
import
lombok.Data
;
/**
* @author karlhoo
*/
@Data
public
class
ApiSmsResp
<
T
>
{
/**
* 结果编码
*/
private
int
code
;
/**
* 结果描述
*/
private
String
message
;
/**
* 响应数据
*/
private
T
data
;
}
This diff is collapsed.
Click to expand it.
refined-manager/src/main/java/com/mortals/xhx/busiz/rsp/wait/FinPersonInfo.java
0 → 100644
View file @
0b6f034d
package
com.mortals.xhx.busiz.rsp.wait
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
lombok.Data
;
import
java.util.Date
;
@Data
public
class
FinPersonInfo
{
@JSONField
(
name
=
"id"
)
private
Long
waitId
;
@JSONField
(
name
=
"calltime"
,
format
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
calltime
;
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
refined-manager/src/main/java/com/mortals/xhx/busiz/rsp/wait/WaitPersonInfo.java
0 → 100644
View file @
0b6f034d
package
com.mortals.xhx.busiz.rsp.wait
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
lombok.Data
;
import
java.util.Date
;
@Data
public
class
WaitPersonInfo
{
@JSONField
(
name
=
"birthday"
)
private
int
birthday
;
@JSONField
(
name
=
"business_name"
)
private
String
businessName
;
@JSONField
(
name
=
"flownum"
)
private
String
flowNum
;
@JSONField
(
name
=
"idcard_IDCardNo"
)
private
String
idcardIDCardNo
;
@JSONField
(
name
=
"businessid"
)
private
Long
businessId
;
@JSONField
(
name
=
"count"
)
private
String
count
;
@JSONField
(
name
=
"idcard_Name"
)
private
String
idcardName
;
@JSONField
(
name
=
"idcard_Address"
)
private
String
idcardAddress
;
@JSONField
(
name
=
"idcard_Sex"
)
private
String
idcardSex
;
@JSONField
(
name
=
"peopleid"
)
private
String
peopleId
;
@JSONField
(
name
=
"phone"
)
private
String
phone
;
@JSONField
(
name
=
"id"
)
private
Long
waitId
;
@JSONField
(
name
=
"idcardData_PhotoFileName"
)
private
String
idcardDataPhotoFileName
;
@JSONField
(
name
=
"taketime"
,
format
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
takeTime
;
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
refined-manager/src/main/java/com/mortals/xhx/common/code/WeekDayEnum.java
0 → 100644
View file @
0b6f034d
package
com.mortals.xhx.common.code
;
import
java.util.LinkedHashMap
;
import
java.util.Map
;
public
enum
WeekDayEnum
{
星期一
(
1
,
"monday"
),
星期二
(
2
,
"tuesday"
),
星期三
(
3
,
"wednesday"
),
星期四
(
4
,
"thursday"
),
星期五
(
5
,
"friday"
),
星期六
(
6
,
"saturday"
),
星期日
(
7
,
"sunday"
);
private
int
value
;
private
String
desc
;
private
WeekDayEnum
(
int
value
,
String
desc
)
{
this
.
value
=
value
;
this
.
desc
=
desc
;
}
public
int
getValue
()
{
return
this
.
value
;
}
public
String
getDesc
()
{
return
this
.
desc
;
}
public
static
WeekDayEnum
getByValue
(
int
value
)
{
WeekDayEnum
[]
var1
=
values
();
int
var2
=
var1
.
length
;
for
(
int
var3
=
0
;
var3
<
var2
;
++
var3
)
{
WeekDayEnum
examStatus
=
var1
[
var3
];
if
(
examStatus
.
getValue
()
==
value
)
{
return
examStatus
;
}
}
return
null
;
}
public
static
Map
<
String
,
String
>
getEnumMap
(
int
...
eItem
)
{
Map
<
String
,
String
>
resultMap
=
new
LinkedHashMap
();
WeekDayEnum
[]
var2
=
values
();
int
var3
=
var2
.
length
;
for
(
int
var4
=
0
;
var4
<
var3
;
++
var4
)
{
WeekDayEnum
item
=
var2
[
var4
];
try
{
boolean
hasE
=
false
;
int
[]
var7
=
eItem
;
int
var8
=
eItem
.
length
;
for
(
int
var9
=
0
;
var9
<
var8
;
++
var9
)
{
int
e
=
var7
[
var9
];
if
(
item
.
getValue
()
==
e
)
{
hasE
=
true
;
break
;
}
}
if
(!
hasE
)
{
resultMap
.
put
(
item
.
getValue
()
+
""
,
item
.
getDesc
());
}
}
catch
(
Exception
var11
)
{
}
}
return
resultMap
;
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
refined-manager/src/main/java/com/mortals/xhx/common/key/ParamKey.java
View file @
0b6f034d
...
...
@@ -33,6 +33,6 @@ public class ParamKey {
public
static
String
SYS_PARAM_LOG_TIME
=
"log_time"
;
public
static
String
SYS_PARAM_
USER_URL
=
"user_url
"
;
public
static
String
SYS_PARAM_
SMS_PERSON_CARE_TYPE
=
"25
"
;
}
This diff is collapsed.
Click to expand it.
refined-manager/src/main/java/com/mortals/xhx/common/key/RedisKey.java
View file @
0b6f034d
...
...
@@ -15,8 +15,14 @@ public class RedisKey {
public
static
final
String
KEY_DEVICE_ONLINE_CACHE
=
"device:online:"
;
public
static
final
String
KEY_SITE_CACHE
=
"siteDict"
;
/**
* 排队等待人群
*/
public
static
final
String
KEY_WAITNUM_LIST_CACHE
=
"takeData"
;
/**
* 完成业务人群
*/
public
static
final
String
KEY_FIN_LIST_CACHE
=
"callData"
;
public
static
final
String
KEY_PLATFORM_CACHE
=
"platformDict"
;
...
...
This diff is collapsed.
Click to expand it.
refined-manager/src/main/java/com/mortals/xhx/daemon/task/SyncAppointWaitAndFinTaskImpl.java
0 → 100644
View file @
0b6f034d
This diff is collapsed.
Click to expand it.
refined-manager/src/main/java/com/mortals/xhx/daemon/task/SyncAppointmentPersonTaskImpl.java
View file @
0b6f034d
...
...
@@ -98,11 +98,11 @@ public class SyncAppointmentPersonTaskImpl implements ITaskExcuteService {
if
(!
ObjectUtils
.
isEmpty
(
appointUserList
))
{
//查询今天添加的预约 并删除
AppointmentPersonQuery
appointmentPersonQuery
=
new
AppointmentPersonQuery
();
appointmentPersonQuery
.
setCreateTimeStart
(
DateUtil
.
format
(
new
Date
(),
"yyyy-MM-dd"
));
appointmentPersonQuery
.
setCreateTimeEnd
(
DateUtil
.
format
(
new
Date
(),
"yyyy-MM-dd"
));
appointmentPersonQuery
.
setCreateTimeStart
(
DateUtil
.
format
(
new
Date
(),
"yyyy-MM-dd"
));
appointmentPersonQuery
.
setCreateTimeEnd
(
DateUtil
.
format
(
new
Date
(),
"yyyy-MM-dd"
));
Long
[]
ids
=
appointmentPersonService
.
find
(
appointmentPersonQuery
).
stream
().
map
(
i
->
i
.
getId
()).
toArray
(
Long
[]::
new
);
if
(!
ObjectUtils
.
isEmpty
(
ids
))
{
appointmentPersonService
.
remove
(
ids
,
null
);
if
(!
ObjectUtils
.
isEmpty
(
ids
))
{
appointmentPersonService
.
remove
(
ids
,
null
);
}
List
<
AppointmentPersonEntity
>
newUserList
=
appointUserList
.
stream
().
map
(
user
->
{
AppointmentPersonEntity
appointmentPersonEntity
=
new
AppointmentPersonEntity
();
...
...
@@ -141,65 +141,6 @@ public class SyncAppointmentPersonTaskImpl implements ITaskExcuteService {
}
/**
* 获取封装得MultipartFile
*
* @param inputStream inputStream
* @param fileName fileName
* @return MultipartFile
*/
public
MultipartFile
getMultipartFile
(
InputStream
inputStream
,
String
fileName
)
{
FileItem
fileItem
=
createFileItem
(
inputStream
,
fileName
);
//CommonsMultipartFile是feign对multipartFile的封装,但是要FileItem类对象
return
new
CommonsMultipartFile
(
fileItem
);
}
/**
* FileItem类对象创建
*
* @param inputStream inputStream
* @param fileName fileName
* @return FileItem
*/
public
FileItem
createFileItem
(
InputStream
inputStream
,
String
fileName
)
{
FileItemFactory
factory
=
new
DiskFileItemFactory
(
16
,
null
);
String
textFieldName
=
"file"
;
FileItem
item
=
factory
.
createItem
(
textFieldName
,
MediaType
.
MULTIPART_FORM_DATA_VALUE
,
true
,
fileName
);
int
bytesRead
=
0
;
byte
[]
buffer
=
new
byte
[
10
*
1024
*
1024
];
OutputStream
os
=
null
;
//使用输出流输出输入流的字节
try
{
os
=
item
.
getOutputStream
();
while
((
bytesRead
=
inputStream
.
read
(
buffer
,
0
,
8192
))
!=
-
1
)
{
os
.
write
(
buffer
,
0
,
bytesRead
);
}
inputStream
.
close
();
}
catch
(
IOException
e
)
{
log
.
error
(
"Stream copy exception"
,
e
);
throw
new
IllegalArgumentException
(
"文件上传失败"
);
}
finally
{
if
(
os
!=
null
)
{
try
{
os
.
close
();
}
catch
(
IOException
e
)
{
log
.
error
(
"Stream close exception"
,
e
);
}
}
if
(
inputStream
!=
null
)
{
try
{
inputStream
.
close
();
}
catch
(
IOException
e
)
{
log
.
error
(
"Stream close exception"
,
e
);
}
}
}
return
item
;
}
public
static
void
main
(
String
[]
args
)
{
...
...
This diff is collapsed.
Click to expand it.
refined-manager/src/main/java/com/mortals/xhx/daemon/task/SyncRegisterUserTaskImpl.java
View file @
0b6f034d
...
...
@@ -92,7 +92,6 @@ public class SyncRegisterUserTaskImpl implements ITaskExcuteService {
//根据数量查询
String
registerPath
=
"/inter/Actuary/peopleList"
;
String
url
=
host
+
registerPath
;
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"page"
,
1
);
params
.
put
(
"size"
,
1
);
...
...
@@ -116,6 +115,10 @@ public class SyncRegisterUserTaskImpl implements ITaskExcuteService {
log
.
info
(
"注册用户总数量:{}"
,
userList
.
size
());
if
(!
ObjectUtils
.
isEmpty
(
userList
))
{
List
<
PersonEntity
>
newUserList
=
userList
.
stream
().
map
(
user
->
{
if
(
ObjectUtils
.
isEmpty
(
user
.
getIdcardIDCardNo
()))
{
return
null
;
}
PersonEntity
personEntity
=
new
PersonEntity
();
personEntity
.
initAttrValue
();
personEntity
.
setName
(
user
.
getIdcardName
());
...
...
@@ -125,13 +128,13 @@ public class SyncRegisterUserTaskImpl implements ITaskExcuteService {
personEntity
.
setAddress
(
user
.
getIdcardAddress
());
try
{
personEntity
.
setBirthday
(
DateUtil
.
parse
(
IdcardUtil
.
getBirth
(
user
.
getIdcardIDCardNo
()),
"yyyyMMdd"
));
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
}
personEntity
.
setSourceId
(
user
.
getId
());
personEntity
.
setSource
(
SourceEnum
.
排队叫号系统
.
getValue
());
personEntity
.
setSourcePhotoUri
(
user
.
getIdcardDataPhotoFileName
());
return
personEntity
;
}).
collect
(
Collectors
.
toList
());
}).
filter
(
f
->
f
!=
null
).
collect
(
Collectors
.
toList
());
List
<
PersonEntity
>
oldUserList
=
personService
.
find
(
new
PersonQuery
());
Map
<
String
,
PersonEntity
>
oldUserMap
=
oldUserList
.
stream
().
collect
(
Collectors
.
toMap
(
x
->
x
.
getIdCard
(),
y
->
y
,
(
o
,
n
)
->
n
));
...
...
@@ -212,13 +215,13 @@ public class SyncRegisterUserTaskImpl implements ITaskExcuteService {
for
(
PersonEntity
personEntity
:
collect
)
{
//下载图片到本地保存并更新
String
downUrl
=
url
+
personEntity
.
getSourcePhotoUri
();
// String downUrl = "http://192.168.0.98:11078/file/fileupload/1679215657433.jpg";
log
.
info
(
"downUrl:{}"
,
downUrl
);
// String downUrl = "http://192.168.0.98:11078/file/fileupload/1679215657433.jpg";
log
.
info
(
"downUrl:{}"
,
downUrl
);
byte
[]
bytes
=
HttpUtil
.
downloadBytes
(
downUrl
);
if
(
bytes
.
length
>
0
)
{
if
(
bytes
.
length
>
0
)
{
InputStream
inputStream
=
new
ByteArrayInputStream
(
bytes
);
MultipartFile
file
=
getMultipartFile
(
inputStream
,
"photo.jpg"
);
String
filePath
=
uploadService
.
saveFileUpload
(
file
,
"file/fileupload"
,
null
);
String
filePath
=
uploadService
.
saveFileUpload
(
file
,
"file/fileupload"
,
null
);
personEntity
.
setPhoto
(
filePath
);
personService
.
update
(
personEntity
);
}
...
...
This diff is collapsed.
Click to expand it.
refined-manager/src/main/java/com/mortals/xhx/daemon/task/readme.txt
deleted
100644 → 0
View file @
90054b56
定时任务,实现接口:com.mortals.framework.service.ITaskExcuteService
\ No newline at end of file
This diff is collapsed.
Click to expand it.
refined-manager/src/main/java/com/mortals/xhx/module/care/model/CareConfigEntity.java
View file @
0b6f034d
...
...
@@ -73,7 +73,6 @@ public class CareConfigEntity extends CareConfigVo {
/**
* 消息发送对象(办事群众.办事群众,管理员.管理员)
*/
@Excel
(
name
=
"消息发送对象"
,
readConverterExp
=
"办事群众=办事群众,管理员.管理员"
)
private
String
msgRecipients
;
/**
* 备注
...
...
This diff is collapsed.
Click to expand it.
refined-manager/src/main/java/com/mortals/xhx/module/care/model/CareRecordsEntity.java
View file @
0b6f034d
package
com.mortals.xhx.module.care.model
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.ArrayList
;
...
...
@@ -7,272 +6,100 @@ import com.fasterxml.jackson.annotation.JsonFormat;
import
com.mortals.framework.annotation.Excel
;
import
com.mortals.framework.model.BaseEntityLong
;
import
com.mortals.xhx.module.care.model.vo.CareRecordsVo
;
import
lombok.Data
;
/**
* 预约关怀记录实体对象
*
* @author zxfei
* @date 2023-04-09
*/
* 预约关怀记录实体对象
*
* @author zxfei
* @date 2023-04-18
*/
@Data
public
class
CareRecordsEntity
extends
CareRecordsVo
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 站点Id
*/
* 站点Id
*/
private
Long
siteId
;
/**
* 站点名称
*/
* 站点名称
*/
private
String
siteName
;
/**
* 个人信息ID
*/
@Excel
(
name
=
"个人信息ID"
)
* 个人信息ID
*/
private
Long
personId
;
/**
* 姓名
*/
@Excel
(
name
=
"姓名"
)
* 姓名
*/
private
String
name
;
/**
* 联系方式
*/
@Excel
(
name
=
"联系方式"
)
* 联系方式
*/
private
String
contact
;
/**
* 身份证号码
*/
@Excel
(
name
=
"身份证号码"
)
* 身份证号码
*/
private
String
idCard
;
/**
* 办理业务
*/
@Excel
(
name
=
"办理业务"
)
* 业务Id
*/
private
Long
bussinessId
;
/**
* 预约业务
*/
private
String
bussinessName
;
/**
* 办理业务
*/
private
String
service
;
/**
* 排队编号
*/
@Excel
(
name
=
"排队编号"
)
* 排队编号
*/
private
String
queueNo
;
/**
* 监测时间
*/
@Excel
(
name
=
"监测时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
* 排队开始时间
*/
private
Date
takeTime
;
/**
* 排队结束时间
*/
private
Date
callTime
;
/**
* 监测时间
*/
private
Date
monitorTime
;
/**
* 监测设备id
*/
@Excel
(
name
=
"监测设备id"
)
private
Long
monitorDeviceId
;
* 监测设备ids
*/
private
String
monitorDeviceIds
;
/**
* 监测设备
*/
@Excel
(
name
=
"监测设备"
)
* 监测设备
*/
private
String
monitorDevice
;
/**
* 最终等待时长,秒
*/
@Excel
(
name
=
"最终等待时长,秒"
)
private
Long
waitTime
;
* 最终等待时长,秒
*/
private
Integer
waitTime
;
/**
* 办理状态(排队中.排队中,办理中.办理中,接件结束.接件结束)
*/
@Excel
(
name
=
"办理状态"
,
readConverterExp
=
"排队中=排队中,办理中.办理中,接件结束.接件结束"
)
* 办理状态(排队中,办理中,接件结束)
*/
private
String
processStatus
;
public
CareRecordsEntity
(){}
/**
* 获取 站点Id
* @return Long
*/
public
Long
getSiteId
(){
return
siteId
;
}
/**
* 设置 站点Id
* @param siteId
*/
public
void
setSiteId
(
Long
siteId
){
this
.
siteId
=
siteId
;
}
/**
* 获取 站点名称
* @return String
*/
public
String
getSiteName
(){
return
siteName
;
}
/**
* 设置 站点名称
* @param siteName
*/
public
void
setSiteName
(
String
siteName
){
this
.
siteName
=
siteName
;
}
/**
* 获取 个人信息ID
* @return Long
*/
public
Long
getPersonId
(){
return
personId
;
}
/**
* 设置 个人信息ID
* @param personId
*/
public
void
setPersonId
(
Long
personId
){
this
.
personId
=
personId
;
}
/**
* 获取 姓名
* @return String
*/
public
String
getName
(){
return
name
;
}
/**
* 设置 姓名
* @param name
*/
public
void
setName
(
String
name
){
this
.
name
=
name
;
}
/**
* 获取 联系方式
* @return String
*/
public
String
getContact
(){
return
contact
;
}
/**
* 设置 联系方式
* @param contact
*/
public
void
setContact
(
String
contact
){
this
.
contact
=
contact
;
}
* 关怀次数
*/
private
Integer
careCount
;
/**
* 获取 身份证号码
* @return String
*/
public
String
getIdCard
(){
return
idCard
;
}
* 评价
*/
private
String
assessment
;
/**
* 设置 身份证号码
* @param idCard
*/
public
void
setIdCard
(
String
idCard
){
this
.
idCard
=
idCard
;
}
/**
* 获取 办理业务
* @return String
*/
public
String
getService
(){
return
service
;
}
/**
* 设置 办理业务
* @param service
*/
public
void
setService
(
String
service
){
this
.
service
=
service
;
}
/**
* 获取 排队编号
* @return String
*/
public
String
getQueueNo
(){
return
queueNo
;
}
/**
* 设置 排队编号
* @param queueNo
*/
public
void
setQueueNo
(
String
queueNo
){
this
.
queueNo
=
queueNo
;
}
/**
* 获取 监测时间
* @return Date
*/
public
Date
getMonitorTime
(){
return
monitorTime
;
}
/**
* 设置 监测时间
* @param monitorTime
*/
public
void
setMonitorTime
(
Date
monitorTime
){
this
.
monitorTime
=
monitorTime
;
}
/**
* 获取 监测设备id
* @return Long
*/
public
Long
getMonitorDeviceId
(){
return
monitorDeviceId
;
}
/**
* 设置 监测设备id
* @param monitorDeviceId
*/
public
void
setMonitorDeviceId
(
Long
monitorDeviceId
){
this
.
monitorDeviceId
=
monitorDeviceId
;
}
/**
* 获取 监测设备
* @return String
*/
public
String
getMonitorDevice
(){
return
monitorDevice
;
}
/**
* 设置 监测设备
* @param monitorDevice
*/
public
void
setMonitorDevice
(
String
monitorDevice
){
this
.
monitorDevice
=
monitorDevice
;
}
/**
* 获取 最终等待时长,秒
* @return Long
*/
public
Long
getWaitTime
(){
return
waitTime
;
}
/**
* 设置 最终等待时长,秒
* @param waitTime
*/
public
void
setWaitTime
(
Long
waitTime
){
this
.
waitTime
=
waitTime
;
}
/**
* 获取 办理状态(排队中.排队中,办理中.办理中,接件结束.接件结束)
* @return String
*/
public
String
getProcessStatus
(){
return
processStatus
;
}
/**
* 设置 办理状态(排队中.排队中,办理中.办理中,接件结束.接件结束)
* @param processStatus
*/
public
void
setProcessStatus
(
String
processStatus
){
this
.
processStatus
=
processStatus
;
}
* 短信发送次数
*/
private
Integer
smsCount
;
@Override
public
int
hashCode
()
{
return
this
.
getId
().
hashCode
();
return
this
.
getId
().
hashCode
();
}
@Override
public
boolean
equals
(
Object
obj
)
{
...
...
@@ -280,56 +107,52 @@ public class CareRecordsEntity extends CareRecordsVo {
if
(
obj
instanceof
CareRecordsEntity
)
{
CareRecordsEntity
tmp
=
(
CareRecordsEntity
)
obj
;
if
(
this
.
getId
()
==
tmp
.
getId
())
{
return
true
;
return
true
;
}
}
return
false
;
}
public
String
toString
(){
StringBuilder
sb
=
new
StringBuilder
(
""
);
sb
.
append
(
",siteId:"
).
append
(
getSiteId
());
sb
.
append
(
",siteName:"
).
append
(
getSiteName
());
sb
.
append
(
",personId:"
).
append
(
getPersonId
());
sb
.
append
(
",name:"
).
append
(
getName
());
sb
.
append
(
",contact:"
).
append
(
getContact
());
sb
.
append
(
",idCard:"
).
append
(
getIdCard
());
sb
.
append
(
",service:"
).
append
(
getService
());
sb
.
append
(
",queueNo:"
).
append
(
getQueueNo
());
sb
.
append
(
",monitorTime:"
).
append
(
getMonitorTime
());
sb
.
append
(
",monitorDeviceId:"
).
append
(
getMonitorDeviceId
());
sb
.
append
(
",monitorDevice:"
).
append
(
getMonitorDevice
());
sb
.
append
(
",waitTime:"
).
append
(
getWaitTime
());
sb
.
append
(
",processStatus:"
).
append
(
getProcessStatus
());
return
sb
.
toString
();
}
public
void
initAttrValue
(){
this
.
siteId
=
null
;
this
.
siteId
=
null
;
this
.
siteName
=
""
;
this
.
personId
=
null
;
this
.
name
=
""
;
this
.
contact
=
""
;
this
.
idCard
=
""
;
this
.
bussinessId
=
null
;
this
.
bussinessName
=
""
;
this
.
siteNam
e
=
""
;
this
.
servic
e
=
""
;
this
.
personId
=
null
;
this
.
queueNo
=
""
;
this
.
name
=
""
;
this
.
takeTime
=
null
;
this
.
contact
=
""
;
this
.
callTime
=
null
;
this
.
idCard
=
""
;
this
.
monitorTime
=
null
;
this
.
service
=
""
;
this
.
monitorDeviceIds
=
""
;
this
.
queueNo
=
""
;
this
.
monitorDevice
=
""
;
this
.
monitor
Time
=
null
;
this
.
wait
Time
=
null
;
this
.
monitorDeviceId
=
null
;
this
.
processStatus
=
"排队中"
;
this
.
monitorDevice
=
""
;
this
.
careCount
=
0
;
this
.
waitTime
=
null
;
this
.
assessment
=
""
;
this
.
processStatus
=
""
;
this
.
smsCount
=
0
;
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
refined-manager/src/main/java/com/mortals/xhx/module/care/model/CareRecordsQuery.java
View file @
0b6f034d
This diff is collapsed.
Click to expand it.
refined-manager/src/main/java/com/mortals/xhx/module/care/model/vo/CareRecordsVo.java
View file @
0b6f034d
package
com.mortals.xhx.module.care.model.vo
;
import
com.mortals.framework.annotation.Excel
;
import
com.mortals.framework.model.BaseEntityLong
;
import
com.mortals.xhx.module.care.model.CareRecordsEntity
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
lombok.Data
;
/**
* 预约关怀记录视图对象
*
* @author zxfei
* @date 2023-04-09
*/
* 预约关怀记录视图对象
*
* @author zxfei
* @date 2023-04-18
*/
@Data
public
class
CareRecordsVo
extends
BaseEntityLong
{
/**
* 个人信息ID
*/
@Excel
(
name
=
"个人信息ID"
)
private
Long
personId
;
/**
* 姓名
*/
@Excel
(
name
=
"姓名"
)
private
String
name
;
/**
* 联系方式
*/
@Excel
(
name
=
"联系方式"
)
private
String
contact
;
/**
* 身份证号码
*/
@Excel
(
name
=
"身份证号码"
)
private
String
idCard
;
/**
* 预约业务
*/
@Excel
(
name
=
"预约业务"
)
private
String
bussinessName
;
/**
* 办理业务
*/
@Excel
(
name
=
"办理业务"
)
private
String
service
;
/**
* 排队编号
*/
@Excel
(
name
=
"排队编号"
)
private
String
queueNo
;
/**
* 排队开始时间
*/
@Excel
(
name
=
"排队开始时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
private
Date
takeTime
;
/**
* 监测时间
*/
@Excel
(
name
=
"监测时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
private
Date
monitorTime
;
/**
* 监测设备ids
*/
@Excel
(
name
=
"监测设备ids"
)
private
String
monitorDeviceIds
;
/**
* 监测设备
*/
@Excel
(
name
=
"监测设备"
)
private
String
monitorDevice
;
/**
* 最终等待时长,秒
*/
@Excel
(
name
=
"最终等待时长,秒"
)
private
Integer
waitTime
;
/**
* 办理状态(排队中,办理中,接件结束)
*/
@Excel
(
name
=
"办理状态"
,
readConverterExp
=
"办理状态(排队中,办理中,接件结束)"
)
private
String
processStatus
;
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
refined-manager/src/main/java/com/mortals/xhx/module/care/service/CareRecordsService.java
View file @
0b6f034d
package
com.mortals.xhx.module.care.service
;
import
com.mortals.framework.common.Rest
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.service.ICRUDService
;
import
com.mortals.xhx.base.system.user.model.UserEntity
;
import
com.mortals.xhx.module.care.model.CareRecordsEntity
;
import
org.springframework.web.bind.annotation.RequestBody
;
/**
* CareRecordsService
*
* 预约关怀记录 service接口
*
* @author zxfei
* @date 2023-04-09
*/
public
interface
CareRecordsService
extends
ICRUDService
<
CareRecordsEntity
,
Long
>
{
* CareRecordsService
* <p>
* 预约关怀记录 service接口
*
* @author zxfei
* @date 2023-04-09
*/
public
interface
CareRecordsService
extends
ICRUDService
<
CareRecordsEntity
,
Long
>
{
Rest
<
String
>
notice
(
CareRecordsEntity
careRecordsEntity
,
Context
context
);
...
...
This diff is collapsed.
Click to expand it.
refined-manager/src/main/java/com/mortals/xhx/module/care/service/impl/CareRecordsServiceImpl.java
View file @
0b6f034d
package
com.mortals.xhx.module.care.service.impl
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.TypeReference
;
import
com.mortals.framework.common.Rest
;
import
org.springframework.stereotype.Service
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.service.impl.AbstractCRUDServiceImpl
;
import
com.mortals.framework.util.EntityUtil
;
import
com.mortals.framework.util.HttpUtil
;
import
com.mortals.xhx.base.system.user.model.UserEntity
;
import
com.mortals.xhx.base.system.user.service.UserService
;
import
com.mortals.xhx.busiz.req.SmsThirdPartyReq
;
import
com.mortals.xhx.busiz.rsp.ApiSmsResp
;
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.service.CareRecordsService
;
import
com.mortals.xhx.module.notice.model.NoticeEntity
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.time.DateUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
* CareRecordsService
* 预约关怀记录 service实现
*
* @author zxfei
* @date 2023-04-09
*/
* CareRecordsService
* 预约关怀记录 service实现
*
* @author zxfei
* @date 2023-04-09
*/
@Service
(
"careRecordsService"
)
@Slf4j
public
class
CareRecordsServiceImpl
extends
AbstractCRUDServiceImpl
<
CareRecordsDao
,
CareRecordsEntity
,
Long
>
implements
CareRecordsService
{
@Autowired
private
UserService
userService
;
@Value
(
"${sms.smsSendUrl:http://192.168.0.98:8089/api/index/index}"
)
private
String
smsSendUrl
;
@Value
(
"${sms.apiId:''}"
)
private
String
apiId
;
@Override
public
Rest
<
String
>
notice
(
CareRecordsEntity
careRecordsEntity
,
Context
context
)
{
//todo 通知负责人
//todo 通知负责人
UserEntity
userEntity
=
new
UserEntity
();
userEntity
.
setUserType
(
UserType
.
SYSTEM
.
getValue
());
List
<
UserEntity
>
userEntities
=
userService
.
find
(
userEntity
);
List
<
NoticeEntity
>
noticeList
=
userEntities
.
stream
().
map
(
user
->
{
NoticeEntity
noticeEntity
=
new
NoticeEntity
();
noticeEntity
.
initAttrValue
();
noticeEntity
.
setTitle
(
"群众关怀信息"
);
noticeEntity
.
setExpireTime
(
DateUtils
.
addHours
(
new
Date
(),
1
));
noticeEntity
.
setUserId
(
user
.
getId
());
String
content
=
""
;
noticeEntity
.
setContent
(
content
);
noticeEntity
.
setCreateTime
(
new
Date
());
noticeEntity
.
setCreateUserId
(
1L
);
noticeEntity
.
setCreateUserName
(
"system"
);
return
noticeEntity
;
}).
collect
(
Collectors
.
toList
());
if
(
ObjectUtils
.
isEmpty
(
noticeList
))
{
//noticeService.save(noticeList);
}
return
Rest
.
ok
(
"通知负责人成功"
);
}
@Override
public
Rest
<
String
>
toCare
(
CareRecordsEntity
careRecordsEntity
,
Context
context
)
{
//todo 短信通知群众
return
Rest
.
ok
(
"通知群众成功"
);
if
(
ObjectUtils
.
isEmpty
(
careRecordsEntity
.
getContact
()))
{
return
Rest
.
fail
(
"手机号码不存在"
);
}
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
>>()
{
});
if
(
apiSmsResp
.
getCode
()
==
YesNoEnum
.
YES
.
getValue
())
{
//更新发送数量
CareRecordsQuery
condition
=
new
CareRecordsQuery
();
condition
.
setId
(
careRecordsEntity
.
getId
());
condition
.
setSmsCountIncrement
(
1
);
this
.
update
(
condition
,
context
);
return
Rest
.
ok
();
}
else
{
throw
new
AppException
(
apiSmsResp
.
getMessage
());
}
}
catch
(
Exception
e
)
{
log
.
error
(
"发送短信异常:"
,
e
);
return
Rest
.
fail
(
e
.
getMessage
());
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
refined-manager/src/main/java/com/mortals/xhx/module/care/web/CareRecordsController.java
View file @
0b6f034d
...
...
@@ -60,7 +60,7 @@ public class CareRecordsController extends BaseCRUDJsonBodyMappingController<Car
Map
<
String
,
Object
>
model
=
new
HashMap
<>();
String
busiDesc
=
this
.
getModuleDesc
()
+
"通知负责人"
;
try
{
Rest
<
String
>
rest
=
this
.
service
.
notice
(
careRecordsEntity
,
getContext
());
/*
Rest<String> rest = this.service.notice(careRecordsEntity, getContext());
if(YesNoEnum.YES.getValue()==rest.getCode()){
recordSysLog(request, busiDesc + " 【成功】");
jsonObject.put(KEY_RESULT_DATA, model);
...
...
@@ -68,7 +68,7 @@ public class CareRecordsController extends BaseCRUDJsonBodyMappingController<Car
jsonObject.put(KEY_RESULT_MSG, rest.getMsg());
}else {
throw new AppException(rest.getMsg());
}
}
*/
}
catch
(
Exception
e
)
{
log
.
error
(
busiDesc
,
e
);
jsonObject
.
put
(
KEY_RESULT_CODE
,
VALUE_RESULT_FAILURE
);
...
...
@@ -87,7 +87,7 @@ public class CareRecordsController extends BaseCRUDJsonBodyMappingController<Car
Map
<
String
,
Object
>
model
=
new
HashMap
<>();
String
busiDesc
=
this
.
getModuleDesc
()
+
"toCare"
;
try
{
Rest
<
String
>
rest
=
this
.
service
.
notice
(
careRecordsEntity
,
getContext
());
/*
Rest<String> rest = this.service.notice(careRecordsEntity, getContext());
if(YesNoEnum.YES.getValue()==rest.getCode()){
recordSysLog(request, busiDesc + " 【成功】");
jsonObject.put(KEY_RESULT_DATA, model);
...
...
@@ -95,7 +95,7 @@ public class CareRecordsController extends BaseCRUDJsonBodyMappingController<Car
jsonObject.put(KEY_RESULT_MSG, rest.getMsg());
}else {
throw new AppException(rest.getMsg());
}
}
*/
}
catch
(
Exception
e
)
{
log
.
error
(
busiDesc
,
e
);
jsonObject
.
put
(
KEY_RESULT_CODE
,
VALUE_RESULT_FAILURE
);
...
...
This diff is collapsed.
Click to expand it.
refined-manager/src/main/java/com/mortals/xhx/module/notice/web/NoticeController.java
View file @
0b6f034d
package
com.mortals.xhx.module.notice.web
;
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
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -6,45 +9,58 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
com.mortals.framework.model.Context
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.xhx.module.notice.model.NoticeEntity
;
import
com.mortals.xhx.module.notice.service.NoticeService
;
import
org.apache.commons.lang3.ArrayUtils
;
import
com.mortals.framework.util.StringUtils
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
com.alibaba.fastjson.JSONObject
;
import
java.util.Arrays
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
static
com
.
mortals
.
framework
.
ap
.
SysConstains
.*;
/**
*
* 用户消息
*
* @author zxfei
* @date 2023-04-15
*/
* 用户消息
*
* @author zxfei
* @date 2023-04-15
*/
@RestController
@RequestMapping
(
"notice"
)
public
class
NoticeController
extends
BaseCRUDJsonBodyMappingController
<
NoticeService
,
NoticeEntity
,
Long
>
{
public
class
NoticeController
extends
BaseCRUDJsonBodyMappingController
<
NoticeService
,
NoticeEntity
,
Long
>
{
@Autowired
private
ParamService
paramService
;
public
NoticeController
(){
super
.
setModuleDesc
(
"用户消息"
);
public
NoticeController
()
{
super
.
setModuleDesc
(
"用户消息"
);
}
@Override
protected
void
init
(
Map
<
String
,
Object
>
model
,
Context
context
)
{
this
.
addDict
(
model
,
"read"
,
paramService
.
getParamBySecondOrganize
(
"Notice"
,
"read"
));
this
.
addDict
(
model
,
"read"
,
paramService
.
getParamBySecondOrganize
(
"Notice"
,
"read"
));
super
.
init
(
model
,
context
);
}
@Override
protected
void
doListBefore
(
NoticeEntity
query
,
Map
<
String
,
Object
>
model
,
Context
context
)
throws
AppException
{
query
.
setUserId
(
this
.
getContextUserId
(
context
));
query
.
setOrderField
(
"read"
);
query
.
setOrderKind
(
OrderCol
.
DESCENDING
);
super
.
doListBefore
(
query
,
model
,
context
);
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
refined-manager/src/main/java/com/mortals/xhx/module/person/model/PersonEntity.java
View file @
0b6f034d
package
com.mortals.xhx.module.person.model
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.ArrayList
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.mortals.framework.annotation.Excel
;
import
com.mortals.framework.model.BaseEntityLong
;
import
com.mortals.xhx.module.person.model.vo.PersonVo
;
import
lombok.Data
;
import
java.util.Date
;
/**
* 注册人员实体对象
*
* @author zxfei
* @date 2023-04-16
*/
@Data
public
class
PersonEntity
extends
PersonVo
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -36,7 +35,6 @@ public class PersonEntity extends PersonVo {
/**
* 性别(0.男,1.女)
*/
@Excel
(
name
=
"性别"
,
readConverterExp
=
"0=男,1.女"
)
private
Integer
gender
;
/**
* 手机号码
...
...
@@ -85,241 +83,11 @@ public class PersonEntity extends PersonVo {
*/
private
String
ifaceGroupIndexCode
;
public
PersonEntity
(){}
/**
* 获取 站点Id
* @return Long
*/
public
Long
getSiteId
(){
return
siteId
;
}
/**
* 设置 站点Id
* @param siteId
*/
public
void
setSiteId
(
Long
siteId
){
this
.
siteId
=
siteId
;
}
/**
* 获取 站点名称
* @return String
*/
public
String
getSiteName
(){
return
siteName
;
}
/**
* 设置 站点名称
* @param siteName
*/
public
void
setSiteName
(
String
siteName
){
this
.
siteName
=
siteName
;
}
/**
* 获取 用户名称
* @return String
*/
public
String
getName
(){
return
name
;
}
/**
* 设置 用户名称
* @param name
*/
public
void
setName
(
String
name
){
this
.
name
=
name
;
}
/**
* 获取 身份证号码
* @return String
*/
public
String
getIdCard
(){
return
idCard
;
}
/**
* 设置 身份证号码
* @param idCard
*/
public
void
setIdCard
(
String
idCard
){
this
.
idCard
=
idCard
;
}
/**
* 获取 性别(0.男,1.女)
* @return Integer
*/
public
Integer
getGender
(){
return
gender
;
}
/**
* 设置 性别(0.男,1.女)
* @param gender
*/
public
void
setGender
(
Integer
gender
){
this
.
gender
=
gender
;
}
/**
* 获取 手机号码
* @return String
*/
public
String
getPhone
(){
return
phone
;
}
/**
* 设置 手机号码
* @param phone
*/
public
void
setPhone
(
String
phone
){
this
.
phone
=
phone
;
}
/**
* 获取 出生日期
* @return Date
*/
public
Date
getBirthday
(){
return
birthday
;
}
/**
* 设置 出生日期
* @param birthday
*/
public
void
setBirthday
(
Date
birthday
){
this
.
birthday
=
birthday
;
}
/**
* 获取 家庭住址
* @return String
*/
public
String
getAddress
(){
return
address
;
}
/**
* 设置 家庭住址
* @param address
*/
public
void
setAddress
(
String
address
){
this
.
address
=
address
;
}
/**
* 获取 本地照片路径
* @return String
*/
public
String
getPhoto
(){
return
photo
;
}
/**
* 设置 本地照片路径
* @param photo
*/
public
void
setPhoto
(
String
photo
){
this
.
photo
=
photo
;
}
/**
* 获取 原始照片路径
* @return String
*/
public
String
getSourcePhotoUri
(){
return
sourcePhotoUri
;
}
/**
* 设置 原始照片路径
* @param sourcePhotoUri
*/
public
void
setSourcePhotoUri
(
String
sourcePhotoUri
){
this
.
sourcePhotoUri
=
sourcePhotoUri
;
}
/**
* 获取 Php原始注册用户id
* @return Long
*/
public
Long
getSourceId
(){
return
sourceId
;
}
/**
* 设置 Php原始注册用户id
* @param sourceId
*/
public
void
setSourceId
(
Long
sourceId
){
this
.
sourceId
=
sourceId
;
}
/**
* 获取 备注
* @return String
*/
public
String
getRemark
(){
return
remark
;
}
/**
* 设置 备注
* @param remark
*/
public
void
setRemark
(
String
remark
){
this
.
remark
=
remark
;
}
/**
* 获取 注册人员来源(0.预约系统,1.排队叫号系统,2.自助服务系统,99.其它)
* @return Integer
*/
public
Integer
getSource
(){
return
source
;
}
/**
* 设置 注册人员来源(0.预约系统,1.排队叫号系统,2.自助服务系统,99.其它)
* @param source
*/
public
void
setSource
(
Integer
source
){
this
.
source
=
source
;
}
/**
* 获取 是否添加到海康人脸库(0.否,1.是)
* @return Integer
*/
public
Integer
getInFaceHk
(){
return
inFaceHk
;
}
/**
* 设置 是否添加到海康人脸库(0.否,1.是)
* @param inFaceHk
*/
public
void
setInFaceHk
(
Integer
inFaceHk
){
this
.
inFaceHk
=
inFaceHk
;
}
/**
* 获取 人脸的唯一标识
* @return String
*/
public
String
getIndexCode
(){
return
indexCode
;
}
/**
* 设置 人脸的唯一标识
* @param indexCode
*/
public
void
setIndexCode
(
String
indexCode
){
this
.
indexCode
=
indexCode
;
}
/**
* 获取 人脸所属的人脸分组的唯一标识
* @return String
*/
public
String
getIfaceGroupIndexCode
(){
return
ifaceGroupIndexCode
;
}
/**
* 设置 人脸所属的人脸分组的唯一标识
* @param ifaceGroupIndexCode
*/
public
void
setIfaceGroupIndexCode
(
String
ifaceGroupIndexCode
){
this
.
ifaceGroupIndexCode
=
ifaceGroupIndexCode
;
}
@Override
public
int
hashCode
()
{
return
this
.
getId
().
hashCode
();
}
@Override
public
boolean
equals
(
Object
obj
)
{
if
(
obj
==
null
)
return
false
;
...
...
@@ -332,28 +100,8 @@ public class PersonEntity extends PersonVo {
return
false
;
}
public
String
toString
(){
StringBuilder
sb
=
new
StringBuilder
(
""
);
sb
.
append
(
",siteId:"
).
append
(
getSiteId
());
sb
.
append
(
",siteName:"
).
append
(
getSiteName
());
sb
.
append
(
",name:"
).
append
(
getName
());
sb
.
append
(
",idCard:"
).
append
(
getIdCard
());
sb
.
append
(
",gender:"
).
append
(
getGender
());
sb
.
append
(
",phone:"
).
append
(
getPhone
());
sb
.
append
(
",birthday:"
).
append
(
getBirthday
());
sb
.
append
(
",address:"
).
append
(
getAddress
());
sb
.
append
(
",photo:"
).
append
(
getPhoto
());
sb
.
append
(
",sourcePhotoUri:"
).
append
(
getSourcePhotoUri
());
sb
.
append
(
",sourceId:"
).
append
(
getSourceId
());
sb
.
append
(
",remark:"
).
append
(
getRemark
());
sb
.
append
(
",source:"
).
append
(
getSource
());
sb
.
append
(
",inFaceHk:"
).
append
(
getInFaceHk
());
sb
.
append
(
",indexCode:"
).
append
(
getIndexCode
());
sb
.
append
(
",ifaceGroupIndexCode:"
).
append
(
getIfaceGroupIndexCode
());
return
sb
.
toString
();
}
public
void
initAttrValue
(){
public
void
initAttrValue
()
{
this
.
siteId
=
null
;
...
...
This diff is collapsed.
Click to expand it.
refined-manager/src/main/java/com/mortals/xhx/module/person/model/vo/PersonVo.java
View file @
0b6f034d
package
com.mortals.xhx.module.person.model.vo
;
import
com.mortals.framework.annotation.Excel
;
import
com.mortals.framework.model.BaseEntityLong
;
import
com.mortals.xhx.module.person.model.PersonEntity
;
import
java.util.ArrayList
;
...
...
@@ -13,4 +14,6 @@ import lombok.Data;
@Data
public
class
PersonVo
extends
BaseEntityLong
{
@Excel
(
name
=
"性别"
,
readConverterExp
=
"0=男,1.女"
)
private
Integer
gender
;
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
refined-manager/src/main/java/com/mortals/xhx/module/person/web/PersonController.java
View file @
0b6f034d
...
...
@@ -57,10 +57,9 @@ public class PersonController extends BaseCRUDJsonBodyMappingController<PersonSe
}
@Override
public
void
doExportFileAfter
(
byte
[]
data
,
Context
context
)
throws
AppException
{
InputStream
inputStream
=
new
ByteArrayInputStream
(
data
);
MultipartFile
file
=
ServletUtils
.
getMultipartFile
(
inputStream
,
"photo.jpg"
);
String
filePath
=
uploadService
.
saveFileUpload
(
file
,
"file/fileupload"
,
null
);
public
void
doExportBefore
(
Context
context
,
PersonEntity
query
,
List
<
String
>
properties
)
throws
AppException
{
properties
.
add
(
"性别"
);
// super.doExportBefore(context, query, properties);
}
@Override
...
...
This diff is collapsed.
Click to expand it.
refined-manager/src/main/resources/bootstrap.yml
View file @
0b6f034d
...
...
@@ -60,9 +60,9 @@ hystrix:
sms
:
smsSendUrl
:
@
profiles.sms.smsSendUrl@
apiId
:
@
profiles.sms.apiId@
type
:
@
profiles.sms.type@
php
:
host
:
@
profiles.php.host@
redisDb
:
5
hik
:
host
:
@
profiles.hik.host@
appKey
:
@
profiles.hik.appKey@
...
...
This diff is collapsed.
Click to expand it.
refined-manager/src/main/resources/sqlmap/module/care/CareRecordsMapper.xml
View file @
0b6f034d
This diff is collapsed.
Click to expand it.
refined-manager/src/test/java/com/mortals/httpclient/Test.java
View file @
0b6f034d
package
com.mortals.httpclient
;
import
cn.hutool.core.codec.Base64
;
import
cn.hutool.core.io.FileUtil
;
import
cn.hutool.http.HttpUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
java.security.NoSuchAlgorithmException
;
/**
...
...
@@ -18,5 +25,22 @@ public class Test {
// byte[] result = clipher.doFinal(plainText.getBytes());
// System.out.println(Base64.encodeBase64URLSafeString(result));
String
encode
=
Base64
.
encode
(
FileUtil
.
readBytes
(
"F:\\pics\\background.jpg"
));
JSONObject
jsonObject
=
new
JSONObject
();
JSONArray
jsonArray
=
new
JSONArray
();
JSONObject
jsonObj
=
new
JSONObject
();
jsonObj
.
put
(
"imageBase64"
,
encode
);
jsonArray
.
add
(
jsonObj
);
jsonObject
.
put
(
"userMatterDetails"
,
jsonArray
);
System
.
out
.
println
(
JSON
.
toJSONString
(
jsonObject
));
String
post
=
HttpUtil
.
post
(
"http://192.168.0.98:11078/sst/user/matter/apply/save"
,
JSON
.
toJSONString
(
jsonObject
));
//String post = HttpUtil.post("http://192.168.0.98:11059/basics_api/sst/user/matter/apply/save", JSON.toJSONString(jsonObject));
System
.
out
.
println
(
post
);
}
}
This diff is collapsed.
Click to expand it.
refined-manager/src/test/java/com/mortals/httpclient/person/PersonController.http
View file @
0b6f034d
...
...
@@ -67,5 +67,14 @@ Authorization: {{authToken}}
Accept: application/json
###注册人员列表导出
POST {{baseUrl}}/person/exportExcel
Authorization: {{authToken}}
Content-Type: application/json
{
"page":1,
"size":10
}
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment