Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
civil-bigdata
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
civil
civil-bigdata
Commits
8f1741c5
Commit
8f1741c5
authored
Nov 15, 2023
by
杨琪琪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
死亡登记标注死亡
parent
f72bb9ca
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
276 additions
and
90 deletions
+276
-90
api-server/src/main/java/com/zq/api/utils/ApiUtils.java
+18
-6
civil-common-utils/src/main/java/com/zq/common/vo/PageReqVo.java
+19
-8
sys-server/pom.xml
+6
-0
sys-server/src/main/java/com/zq/system/modules/system/dao/ReportDeathDao.java
+15
-0
sys-server/src/main/java/com/zq/system/modules/system/repository/UserRepository.java
+18
-0
sys-server/src/main/java/com/zq/system/modules/system/rest/DeathRegisterController.java
+14
-5
sys-server/src/main/java/com/zq/system/modules/system/rest/SsoController.java
+0
-1
sys-server/src/main/java/com/zq/system/modules/system/rest/UserController.java
+11
-0
sys-server/src/main/java/com/zq/system/modules/system/service/ReportDeathService.java
+5
-1
sys-server/src/main/java/com/zq/system/modules/system/service/SsoService.java
+6
-3
sys-server/src/main/java/com/zq/system/modules/system/service/UserService.java
+2
-0
sys-server/src/main/java/com/zq/system/modules/system/service/impl/ReportDeathImpl.java
+70
-44
sys-server/src/main/java/com/zq/system/modules/system/service/impl/UserServiceImpl.java
+8
-0
sys-server/src/main/resources/mapper/CremationInfoSumMapper.xml
+1
-1
sys-server/src/main/resources/mapper/EnbuzMemberStopMapper.xml
+0
-0
sys-server/src/main/resources/mapper/HdptRstSwmdMapper.xml
+1
-1
sys-server/src/main/resources/mapper/ReportDeathMapper.xml
+82
-20
No files found.
api-server/src/main/java/com/zq/api/utils/ApiUtils.java
View file @
8f1741c5
package
com
.
zq
.
api
.
utils
;
import
cn.hutool.core.codec.Base64
;
import
cn.hutool.core.io.FileTypeUtil
;
import
cn.hutool.core.io.FileUtil
;
import
cn.hutool.core.io.IoUtil
;
import
cn.hutool.core.io.resource.ClassPathResource
;
import
cn.hutool.core.lang.Console
;
import
cn.hutool.core.util.HashUtil
;
import
cn.hutool.core.util.IdUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.core.util.URLUtil
;
...
...
@@ -19,11 +25,17 @@ import com.zq.common.encrypt.EncryptUtils;
import
com.zq.common.encrypt.RsaUtils
;
import
com.zq.common.vo.ResultVo
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.ibatis.ognl.enhance.ContextClassLoader
;
import
org.springframework.stereotype.Component
;
import
java.io.BufferedInputStream
;
import
java.io.BufferedOutputStream
;
import
java.io.File
;
import
java.io.IOException
;
import
java.nio.charset.StandardCharsets
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.Properties
;
import
java.util.TreeMap
;
@Component
...
...
@@ -235,9 +247,9 @@ public class ApiUtils {
}
public
static
void
main
(
String
[]
args
)
{
String
appId
=
"
d469c70c4e8b
11ecaa2900163e1475c7"
;
String
appId
=
"
c817c5585896
11ecaa2900163e1475c7"
;
String
apiNo
=
IdUtil
.
simpleUUID
();
String
method
=
"getS
ingle
UserInfo"
;
String
method
=
"getS
so
UserInfo"
;
String
timestamp
=
System
.
currentTimeMillis
()
+
""
;
String
version
=
"1.0.0"
;
String
bizContent
=
"{}"
;
//JSON字符串
...
...
@@ -264,14 +276,14 @@ public class ApiUtils {
for
(
Map
.
Entry
<
String
,
String
>
entry
:
signTreeMap
.
entrySet
())
{
src
.
append
(
entry
.
getKey
()).
append
(
"="
).
append
(
entry
.
getValue
()).
append
(
"&"
);
}
src
.
append
(
"key="
).
append
(
"
ce8fcdd1ae6e42efaabe8819e3fbd8da
"
);
src
.
append
(
"key="
).
append
(
"
82bb8e368055403f91bd67992db17800
"
);
params
.
put
(
"sign"
,
MD5
.
create
().
digestHex
(
src
.
toString
()).
toUpperCase
());
HttpRequest
request
=
HttpRequest
.
post
(
"http://1
27.0.0.1
:9888/api/action"
)
HttpRequest
request
=
HttpRequest
.
post
(
"http://1
06.52.179.107
:9888/api/action"
)
.
header
(
"appId"
,
appId
)
.
header
(
"appSecret"
,
"
e209eb5e4e8b
11ecaa2900163e1475c7"
)
.
header
(
"Authorization"
,
"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ
hZG1pbiIsImF1dGgiOiJhZG1pbiIsImp0aSI6IjY4OTJlY2E2OTAwNzRjZDRhOGI0NjJlNDM5NDNhZmI1In0.AB77eTqqiBsSunVChqfAx9jB8FN58I7fph1Dw-RfYEVWvN-U2AQYYvuMlCczsiBbduL0vCNALjBzo_1jjKlAP
g"
)
.
header
(
"appSecret"
,
"
1f6baf5b5897
11ecaa2900163e1475c7"
)
.
header
(
"Authorization"
,
"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ
0ZXN0MTIwODE1MzQiLCJhdXRoIjoiIiwianRpIjoiZjc4NmM4Nzk0OGQ1NDA3YWIzMjYyNTNmNDk3YzUzZjUifQ.-_ty93y4sIQu4Lx1lQM_819Ay8cMtYHMlKPKA6n12E9RwJIqmI1OMzU9G5ANSPYgo22jdL1r23heHElBJEEuB
g"
)
.
contentType
(
"application/x-www-form-urlencoded"
)
.
formStr
(
params
);
...
...
civil-common-utils/src/main/java/com/zq/common/vo/PageReqVo.java
View file @
8f1741c5
...
...
@@ -24,18 +24,13 @@ public class PageReqVo {
@ApiModelProperty
(
"每页记录条数"
)
private
int
size
=
DEFAULT_SIZE
;
@ApiModelProperty
(
value
=
"排序字段名"
,
allowEmptyValue
=
true
)
private
String
sort
;
@ApiModelProperty
(
value
=
"排序方向"
,
allowableValues
=
"asc,desc"
,
allowEmptyValue
=
true
)
private
String
dir
;
public
static
PageReqVo
of
(
int
page
,
int
size
)
{
PageReqVo
pageReqVo
=
new
PageReqVo
();
pageReqVo
.
setPage
(
page
);
pageReqVo
.
setSize
(
size
);
return
pageReqVo
;
}
private
int
start
;
private
int
end
;
public
PageReqVo
()
{
}
...
...
@@ -77,4 +72,20 @@ public class PageReqVo {
public
void
setDir
(
String
dir
)
{
this
.
dir
=
dir
;
}
public
int
getEnd
()
{
return
getPage
()
*
getSize
();
}
public
void
setEnd
(
int
end
)
{
this
.
end
=
end
;
}
public
int
getStart
()
{
return
(
getPage
()
-
1
)
*
getSize
();
}
public
void
setStart
(
int
start
)
{
this
.
start
=
start
;
}
}
sys-server/pom.xml
View file @
8f1741c5
...
...
@@ -192,6 +192,12 @@
<artifactId>
hutool-all
</artifactId>
<version>
5.7.16
</version>
</dependency>
<dependency>
<groupId>
cn.hutool
</groupId>
<artifactId>
hutool-all
</artifactId>
<version>
5.7.18
</version>
<scope>
compile
</scope>
</dependency>
</dependencies>
<build>
...
...
sys-server/src/main/java/com/zq/system/modules/system/dao/ReportDeathDao.java
View file @
8f1741c5
...
...
@@ -3,13 +3,28 @@ package com.zq.system.modules.system.dao;
import
com.baomidou.dynamic.datasource.annotation.DS
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.zq.common.constant.DBName
;
import
com.zq.system.modules.system.domain.vo.ReportDeathVo
;
import
com.zq.system.modules.system.entity.ReportDeath
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
@Repository
@DS
(
DBName
.
OZT
)
public
interface
ReportDeathDao
extends
BaseMapper
<
ReportDeath
>
{
ReportDeath
selectByIdCard
(
String
idCard
);
List
<
ReportDeathVo
>
selectAllDeaths
(
ReportDeathVo
vo
);
int
selectAllCount
(
ReportDeathVo
vo
);
ReportDeath
selectByNameOrIdcard
(
ReportDeathVo
vo
);
int
insertInTo
(
ReportDeath
death
);
List
<
ReportDeathVo
>
getDeathByName
(
ReportDeathVo
vo
);
int
updateDeath
(
ReportDeath
death
);
}
sys-server/src/main/java/com/zq/system/modules/system/repository/UserRepository.java
View file @
8f1741c5
...
...
@@ -20,6 +20,7 @@ import org.springframework.data.jpa.repository.JpaRepository;
import
org.springframework.data.jpa.repository.JpaSpecificationExecutor
;
import
org.springframework.data.jpa.repository.Modifying
;
import
org.springframework.data.jpa.repository.Query
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -59,6 +60,7 @@ public interface UserRepository extends JpaRepository<User, Long>, JpaSpecificat
* @param lastPasswordResetTime /
*/
@Modifying
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Query
(
value
=
"update sys_user set password = ?2 , pwd_reset_time = ?3 where username = ?1"
,
nativeQuery
=
true
)
void
updatePass
(
String
username
,
String
pass
,
Date
lastPasswordResetTime
);
...
...
@@ -128,4 +130,20 @@ public interface UserRepository extends JpaRepository<User, Long>, JpaSpecificat
@Query
(
value
=
"SELECT count(1) FROM sys_user u, sys_users_roles r WHERE "
+
"u.user_id = r.user_id AND r.role_id in ?1"
,
nativeQuery
=
true
)
int
countByRoles
(
Set
<
Long
>
ids
);
/**
* 根据电话查询
* @param phone/
* @return /
*/
@Query
(
value
=
"SELECT * FROM sys_user u WHERE u.phone= ?1"
,
nativeQuery
=
true
)
User
findBySysname
(
String
phone
);
/**
* 根据电话查询
* @param currentUsername/
* @return /
*/
@Query
(
value
=
"SELECT * FROM sys_user u WHERE u.username= ?1"
,
nativeQuery
=
true
)
User
findByname
(
String
currentUsername
);
}
sys-server/src/main/java/com/zq/system/modules/system/rest/DeathRegisterController.java
View file @
8f1741c5
...
...
@@ -13,10 +13,7 @@ import com.zq.system.modules.system.service.ReportDeathService;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
...
...
@@ -45,10 +42,16 @@ public class DeathRegisterController {
@ApiOperation
(
"获取死亡列表"
)
@PostMapping
(
value
=
"/getDeathList"
)
public
ResultVo
<
PageVo
<
ReportDeath
>>
getDeathList
(
@RequestBody
ReportDeathVo
vo
)
{
public
ResultVo
<
PageVo
<
ReportDeath
Vo
>>
getDeathList
(
@RequestBody
ReportDeathVo
vo
)
{
return
ResultVo
.
success
(
reportDeathService
.
getDeathList
(
vo
));
}
@ApiOperation
(
"查询死亡记录"
)
@PostMapping
(
value
=
"/getDeathByName"
)
public
ResultVo
getDeathByName
(
@RequestBody
ReportDeathVo
vo
)
{
return
ResultVo
.
success
(
reportDeathService
.
getDeathByName
(
vo
));
}
@ApiOperation
(
"获取死亡人详情"
)
@AnonymousPostMapping
(
value
=
"/getDeathDetail"
)
public
ResultVo
getDeathDetail
(
@RequestBody
ReportDeathVo
vo
)
{
...
...
@@ -61,5 +64,11 @@ public class DeathRegisterController {
return
ResultVo
.
success
(
reportDeathService
.
updateDeath
(
vo
));
}
@ApiOperation
(
"是否能进入死亡登记系统"
)
@GetMapping
(
value
=
"/inSysDeath"
)
public
ResultVo
inSysDeath
()
{
return
ResultVo
.
success
(
reportDeathService
.
inSysDeath
());
}
}
sys-server/src/main/java/com/zq/system/modules/system/rest/SsoController.java
View file @
8f1741c5
package
com
.
zq
.
system
.
modules
.
system
.
rest
;
import
cn.hutool.core.lang.tree.TreeUtil
;
import
com.zq.common.annotation.rest.AnonymousGetMapping
;
import
com.zq.common.annotation.rest.AnonymousPostMapping
;
import
com.zq.common.config.redis.RedisUtils
;
...
...
sys-server/src/main/java/com/zq/system/modules/system/rest/UserController.java
View file @
8f1741c5
...
...
@@ -180,6 +180,17 @@ public class UserController {
return
ResultVo
.
success
();
}
@ApiOperation
(
"重置sys登录密码"
)
@PostMapping
(
value
=
"/resetPassw"
)
@AnonymousAccess
public
ResultVo
resetPassw
(
@RequestBody
LoginVo
vo
)
{
AssertUtils
.
hasText
(
vo
.
getPhone
(),
"手机号不能为空"
);
AssertUtils
.
isTrue
(
ValidateUtil
.
isMobilePhoneNo
(
vo
.
getPhone
()),
"手机号格式不正确"
);
AssertUtils
.
hasText
(
vo
.
getVerifyCode
(),
"请输入验证码"
);
userService
.
resetPassword2
(
vo
);
return
ResultVo
.
success
();
}
@ApiOperation
(
"修改头像"
)
@PostMapping
(
value
=
"/updateAvatar"
)
public
ResponseEntity
<
Object
>
updateAvatar
(
@RequestParam
MultipartFile
avatar
)
{
...
...
sys-server/src/main/java/com/zq/system/modules/system/service/ReportDeathService.java
View file @
8f1741c5
...
...
@@ -12,9 +12,13 @@ public interface ReportDeathService {
Object
importDeath
(
MultipartFile
file
);
PageVo
<
ReportDeath
>
getDeathList
(
ReportDeathVo
vo
);
PageVo
<
ReportDeath
Vo
>
getDeathList
(
ReportDeathVo
vo
);
Object
getDeathDetail
(
ReportDeathVo
vo
);
ResultVo
updateDeath
(
ReportDeathVo
vo
);
ResultVo
inSysDeath
();
ResultVo
getDeathByName
(
ReportDeathVo
vo
);
}
sys-server/src/main/java/com/zq/system/modules/system/service/SsoService.java
View file @
8f1741c5
...
...
@@ -24,6 +24,7 @@ import com.zq.system.modules.system.dao.SysInfoDao;
import
com.zq.system.modules.system.domain.Job
;
import
com.zq.system.modules.system.domain.Role
;
import
com.zq.system.modules.system.domain.User
;
import
com.zq.system.modules.system.domain.vo.ReportDeathVo
;
import
com.zq.system.modules.system.domain.vo.SsoLoginVo
;
import
com.zq.system.modules.system.domain.vo.SsoRegisterVo
;
import
com.zq.system.modules.system.entity.AreaCode
;
...
...
@@ -246,12 +247,14 @@ public class SsoService {
SysInfo
sysInfo
=
sysInfoDao
.
selectOne
(
Wrappers
.
lambdaQuery
(
SysInfo
.
builder
().
appId
(
appId
).
build
()));
BindUserInfo
bindUserInfo
=
blindUserInfoDao
.
selectOne
(
Wrappers
.
lambdaQuery
(
BindUserInfo
.
builder
().
sysId
(
sysInfo
.
getId
()).
userId
(
adminContext
.
getUserId
()).
build
()));
AssertUtils
.
notNull
(
bindUserInfo
,
501
,
"用户未绑定该系统"
);
Map
<
String
,
Object
>
data
=
new
HashMap
<>();
List
<
BindUserInfo
>
bindUserInfos
=
blindUserInfoDao
.
selectList
(
Wrappers
.
lambdaQuery
(
BindUserInfo
.
builder
().
sysId
(
sysInfo
.
getId
()).
userId
(
adminContext
.
getUserId
()).
build
()));
AssertUtils
.
notNull
(
bindUserInfos
.
size
()==
0
,
501
,
"用户未绑定该系统"
);
for
(
BindUserInfo
bindUserInfo:
bindUserInfos
)
{
data
.
put
(
"userId"
,
bindUserInfo
.
getSystemUserId
());
data
.
put
(
"username"
,
bindUserInfo
.
getSystemUserName
());
}
return
data
;
}
...
...
sys-server/src/main/java/com/zq/system/modules/system/service/UserService.java
View file @
8f1741c5
...
...
@@ -165,4 +165,6 @@ public interface UserService {
* @return
*/
ApiTokenVo
passwdLogin
(
LoginVo
vo
);
void
resetPassword2
(
LoginVo
vo
);
}
sys-server/src/main/java/com/zq/system/modules/system/service/impl/ReportDeathImpl.java
View file @
8f1741c5
...
...
@@ -5,12 +5,8 @@ import cn.hutool.core.convert.Convert;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.poi.excel.ExcelReader
;
import
cn.hutool.poi.excel.ExcelUtil
;
import
com.baomidou.dynamic.datasource.annotation.DS
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.zq.common.exception.BusinessException
;
import
com.zq.common.utils.AssertUtils
;
import
com.zq.common.utils.PagingUtils
;
import
com.zq.common.vo.PageVo
;
import
com.zq.common.vo.ResultVo
;
import
com.zq.system.modules.system.dao.CremationInfoSumDao
;
...
...
@@ -25,7 +21,6 @@ import com.zq.system.modules.system.service.ReportDeathService;
import
com.zq.system.modules.system.service.SsoService
;
import
com.zq.system.utils.SecurityUtils
;
import
lombok.RequiredArgsConstructor
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.web.multipart.MultipartFile
;
...
...
@@ -45,13 +40,12 @@ public class ReportDeathImpl implements ReportDeathService {
private
final
HdptRstSwmdDao
hdptRstSwmdDao
;
@Override
public
ResultVo
save
(
ReportDeathVo
vo
)
{
ReportDeath
Death
=
reportDeathDao
.
selectByIdCard
(
vo
.
getIdCard
());
if
(
Death
!=
null
)
{
ReportDeath
Death
=
reportDeathDao
.
selectByIdCard
(
vo
.
getIdCard
());
if
(
Death
!=
null
)
{
return
ResultVo
.
fail
(
"该死者已重复上报"
);
}
else
{
}
else
{
ReportDeath
reportDeath
=
new
ReportDeath
();
reportDeath
.
setName
(
vo
.
getName
());
reportDeath
.
setIdCard
(
vo
.
getIdCard
());
...
...
@@ -92,9 +86,9 @@ public class ReportDeathImpl implements ReportDeathService {
reportDeath
.
setUserArea
(
user
.
getUserArea
());
reportDeath
.
setDeathType
(
"1"
);
ReportDeath
reportDeaths
=
reportDeathDao
.
selectOne
(
Wrappers
.
lambdaQuery
(
ReportDeath
.
builder
().
idCard
(
Convert
.
toStr
(
CollUtil
.
get
(
objectList
,
2
))).
build
()));
if
(
reportDeaths
!=
null
)
{
return
"已上报过该死者"
+
reportDeaths
.
getName
()+
"信息"
;
}
else
{
if
(
reportDeaths
!=
null
)
{
return
"已上报过该死者"
+
reportDeaths
.
getName
()
+
"信息"
;
}
else
{
reportDeathDao
.
insert
(
reportDeath
);
}
}
...
...
@@ -102,49 +96,59 @@ public class ReportDeathImpl implements ReportDeathService {
}
@Override
public
PageVo
<
ReportDeath
>
getDeathList
(
ReportDeathVo
vo
)
{
L
ambdaQueryWrapper
<
ReportDeath
>
lambdaQuery
=
Wrappers
.
lambdaQuery
(
ReportDeath
.
builder
().
build
()
);
i
f
(
StringUtils
.
isNotBlank
(
vo
.
getIdCard
())){
lambdaQuery
.
like
(
ReportDeath:
:
getIdCard
,
vo
.
getIdCard
()
);
}
if
(
StringUtils
.
isNotBlank
(
vo
.
getName
())){
lambdaQuery
.
like
(
ReportDeath:
:
getName
,
vo
.
getNam
e
());
}
if
(
StringUtils
.
isNotBlank
(
vo
.
getDeathType
()))
{
lambdaQuery
.
like
(
ReportDeath:
:
getDeathType
,
vo
.
getDeathTyp
e
());
public
PageVo
<
ReportDeath
Vo
>
getDeathList
(
ReportDeathVo
vo
)
{
L
ist
<
ReportDeathVo
>
list
=
reportDeathDao
.
selectAllDeaths
(
vo
);
i
nt
i
=
reportDeathDao
.
selectAllCount
(
vo
);
PageVo
<
ReportDeathVo
>
p
=
new
PageVo
<
ReportDeathVo
>(
);
if
(
vo
.
getPage
()
-
1
==
0
)
{
vo
.
setStart
(
0
);
vo
.
setEnd
(
vo
.
getPage
()
*
vo
.
getSiz
e
());
}
else
{
vo
.
setStart
((
vo
.
getPage
()
-
1
)
*
vo
.
getSize
());
vo
.
setEnd
(
vo
.
getPage
()
*
vo
.
getSiz
e
());
}
PageVo
<
ReportDeath
>
paging
=
PagingUtils
.
paging
(
vo
,
reportDeathDao
,
lambdaQuery
);
return
paging
;
p
.
setRows
(
list
);
p
.
setStart
(
vo
.
getPage
());
p
.
setSize
(
vo
.
getSize
());
p
.
setTotal
(
i
);
return
p
;
}
@Override
public
Object
getDeathDetail
(
ReportDeathVo
vo
)
{
HashMap
<
String
,
Object
>
map
=
new
HashMap
<>();
CremationInfoSum
cremationInfoSum
=
cremationInfoSumDao
.
selectByNameOrIdcard
(
vo
);
switch
(
vo
.
getSource
())
{
case
"1"
:
EnbuzMemberStop
enbuzMemberStop
=
enbuzMemberStopDao
.
selectByNameOrIdcard
(
vo
);
map
.
put
(
"enbuzMemberStop"
,
enbuzMemberStop
);
break
;
case
"2"
:
CremationInfoSum
cremationInfoSum
=
cremationInfoSumDao
.
selectByNameOrIdcard
(
vo
);
map
.
put
(
"cremationInfoSum"
,
cremationInfoSum
);
break
;
case
"3"
:
HdptRstSwmd
hdptRstSwmd
=
hdptRstSwmdDao
.
selectByNameOrIdcard
(
vo
);
if
(
cremationInfoSum
==
null
&&
enbuzMemberStop
==
null
&&
hdptRstSwmd
==
null
){
return
"未查到该死者信息"
;
}
else
{
map
.
put
(
"此数据来源殡葬火化库"
,
cremationInfoSum
);
map
.
put
(
"此数据来源死亡上报小程序(低保)"
,
enbuzMemberStop
);
map
.
put
(
"此数据来源共享平台死亡记录数"
,
hdptRstSwmd
);
map
.
put
(
"hdptRstSwmd"
,
hdptRstSwmd
);
break
;
case
"4"
:
ReportDeath
death
=
reportDeathDao
.
selectByNameOrIdcard
(
vo
);
map
.
put
(
"death"
,
death
);
default
:
map
.
put
(
"list"
,
"无此人具体数据"
);
}
return
map
;
}
@Override
public
ResultVo
updateDeath
(
ReportDeathVo
vo
)
{
List
<
BindUserInfo
>
bindSysList
=
ssoService
.
getBindSysList
();
for
(
BindUserInfo
bindUser:
bindSysList
)
{
if
(
bindUser
.
getSysId
()==
3
||
bindUser
.
getSysId
()==
9
||
bindUser
.
getSysId
()==
4
)
{
User
user
=
userRepository
.
findByUsername
(
SecurityUtils
.
getCurrentUsername
());
ReportDeath
reportDeath
=
reportDeathDao
.
selectById
(
vo
.
getId
());
AssertUtils
.
notNull
(
reportDeath
,
"无此条记录"
);
ReportDeath
reportDeath1
=
reportDeathDao
.
selectByIdCard
(
vo
.
getIdCard
());
ReportDeath
death
=
new
ReportDeath
();
death
.
setId
(
vo
.
getId
());
death
.
setName
(
vo
.
getName
());
int
i
=
0
;
User
user
=
userRepository
.
findByname
(
SecurityUtils
.
getCurrentUsername
());
death
.
setName
(
vo
.
getName
().
trim
());
death
.
setIdCard
(
vo
.
getIdCard
());
death
.
setDeathPlace
(
vo
.
getDeathPlace
());
death
.
setDeathReason
(
vo
.
getDeathReason
());
...
...
@@ -153,14 +157,36 @@ public class ReportDeathImpl implements ReportDeathService {
death
.
setNotes
(
vo
.
getNotes
());
death
.
setSource
(
vo
.
getSource
());
death
.
setUserArea
(
user
.
getUserArea
());
death
.
setUserName
(
reportDeath
.
getUserN
ame
());
death
.
setUserName
(
user
.
getUsern
ame
());
death
.
setUpdateTime
(
DateUtil
.
date
());
reportDeathDao
.
updateById
(
death
);
return
ResultVo
.
success
(
"标注成功"
);
}
else
{
return
ResultVo
.
fail
(
"无权限修改"
);
if
(
reportDeath1
==
null
)
{
i
=
reportDeathDao
.
insertInTo
(
death
);
}
else
{
i
=
reportDeathDao
.
updateDeath
(
death
);
}
return
ResultVo
.
success
(
i
>
0
?
"标注成功"
:
"标注失败"
);
}
@Override
public
ResultVo
inSysDeath
()
{
List
<
BindUserInfo
>
bindSysList
=
ssoService
.
getBindSysList
();
String
sysId
=
null
;
for
(
BindUserInfo
bindUser
:
bindSysList
)
{
sysId
=
bindUser
.
getSysId
().
toString
();
if
(
sysId
.
equals
(
"3"
)
||
sysId
.
equals
(
"9"
)
||
sysId
.
equals
(
"4"
))
{
return
ResultVo
.
success
();
}
}
return
ResultVo
.
fail
(
"抱歉您目前无权限进入此系统"
);
}
@Override
public
ResultVo
getDeathByName
(
ReportDeathVo
vo
)
{
List
<
ReportDeathVo
>
list
=
reportDeathDao
.
getDeathByName
(
vo
);
if
(
list
.
size
()
==
0
)
{
return
ResultVo
.
fail
(
"抱歉查无此人信息!"
);
}
else
{
return
ResultVo
.
success
(
list
);
}
}
}
sys-server/src/main/java/com/zq/system/modules/system/service/impl/UserServiceImpl.java
View file @
8f1741c5
...
...
@@ -429,4 +429,12 @@ public class UserServiceImpl implements UserService {
return
getApiToken
(
user
);
}
@Override
public
void
resetPassword2
(
LoginVo
vo
)
{
verificationCode
(
vo
.
getPhone
(),
vo
.
getVerifyCode
());
User
user
=
userRepository
.
findBySysname
(
vo
.
getPhone
());
AssertUtils
.
notNull
(
user
,
"手机号不存在"
);
updatePass
(
user
.
getUsername
(),
passwordEncoder
.
encode
(
vo
.
getPasswd
()));
}
}
sys-server/src/main/resources/mapper/CremationInfoSumMapper.xml
View file @
8f1741c5
...
...
@@ -12,6 +12,6 @@
</resultMap>
<select
id=
"selectByNameOrIdcard"
resultMap=
"BaseResultMap"
>
select * from GX_BZ.FIS_CREMATION_INFO_SUM t
where t.ID_CARD=#{idCard}
and
t.NAME=#{name}
where t.ID_CARD=#{idCard}
OR
t.NAME=#{name}
</select>
</mapper>
sys-server/src/main/resources/mapper/EnbuzMemberStopMapper.xml
View file @
8f1741c5
sys-server/src/main/resources/mapper/HdptRstSwmdMapper.xml
View file @
8f1741c5
...
...
@@ -15,6 +15,6 @@
FROM
GX_BZ.HDPT_RST_SWMD
WHERE
ID = ( SELECT MAX( ID ) FROM GX_BZ.HDPT_RST_SWMD t WHERE t.ID_CARD = #{idCard}
AND
t.NAME = #{name} )
ID = ( SELECT MAX( ID ) FROM GX_BZ.HDPT_RST_SWMD t WHERE t.ID_CARD = #{idCard}
OR
t.NAME = #{name} )
</select>
</mapper>
sys-server/src/main/resources/mapper/ReportDeathMapper.xml
View file @
8f1741c5
...
...
@@ -17,28 +17,90 @@
<result
property=
"createTime"
column=
"create_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"updateTime"
column=
"update_time"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
<insert
id=
"insertInTo"
>
INSERT INTO GX_BZ.REPORT_DEATHS (NAME, ID_CARD, DEATH_REASON,DEATH_PLACE,DEATH_DATE, SOURCE,USER_AREA, USER_NAME, DEATH_TYPE, update_time)
VALUES (#{name,jdbcType=VARCHAR}, #{idCard,jdbcType=VARCHAR},#{deathReason,jdbcType=VARCHAR}, #{deathPlace,jdbcType=VARCHAR},#{deathDate,jdbcType=VARCHAR},#{source,jdbcType=VARCHAR},#{userArea,jdbcType=VARCHAR},#{userName,jdbcType=VARCHAR},#{deathType,jdbcType=VARCHAR},#{updateTime,jdbcType=TIMESTAMP})
</insert>
<update
id=
"updateDeath"
>
UPDATE GX_BZ.REPORT_DEATHS SET DEATH_TYPE=#{deathType} WHERE ID_CARD=#{idCard}
</update>
<select
id=
"selectByIdCard"
resultMap=
"BaseResultMap"
>
select * from GX_BZ.REPORT_DEATHS t where t.ID_CARD=#{idCard}
select *
from GX_BZ.REPORT_DEATHS t
where t.ID_CARD = #{idCard}
</select>
<!-- <update id="updateByappId">-->
<!-- UPDATE report_death-->
<!-- <set>-->
<!-- <if test="appId != null">-->
<!-- app_id = #{appId, jdbcType=OTHER},-->
<select
id=
"selectAllDeaths"
resultType=
"com.zq.system.modules.system.domain.vo.ReportDeathVo"
>
SELECT
*
FROM
( SELECT t.*, ROWNUM r FROM GX_BZ.REPORT_DEATH t WHERE UPDATE_TIME IS NOT NULL) h
WHERE
r BETWEEN ( ( #{page} - 1 ) * #{size} + 1 )
AND ( #{page} * #{size} )
<!-- <if test="idCard != null">-->
<!-- AND h.ID_CARD = #{idCard, jdbcType=VARCHAR}-->
<!-- </if>-->
<!--
<if test="systemN
ame != null">-->
<!--
system_name = #{systemName, jdbcType=OTHER},
-->
<!--
<if test="n
ame != null">-->
<!--
AND h.NAME = #{name, jdbcType=VARCHAR}
-->
<!-- </if>-->
<!-- <if test="systemTag != null">-->
<!-- system_tag = #{systemTag, jdbcType=OTHER},-->
<!-- </if>-->
<!-- <if test="createTime != null">-->
<!-- create_time = #{createTime, jdbcType=TIMESTAMP},-->
<!-- </if>-->
<!-- <if test="updateTime != null">-->
<!-- update_time = #{updateTime, jdbcType=TIMESTAMP},-->
<!-- </if>-->
<!-- </set>-->
<!-- WHERE app_id = #{appId}-->
<!-- </update>-->
ORDER BY UPDATE_TIME DESC
</select>
<select
id=
"selectAllCount"
resultType=
"java.lang.Integer"
>
select count(1) from GX_BZ.REPORT_DEATH t
<where>
<if
test=
"idCard != null"
>
AND t.ID_CARD = #{idCard, jdbcType=OTHER}
</if>
<if
test=
"name != null"
>
AND t.NAME = #{name, jdbcType=OTHER}
</if>
<if
test=
"deathType != null"
>
AND t.DEATH_TYPE = #{deathType, jdbcType=OTHER}
</if>
</where>
</select>
<select
id=
"selectByNameOrIdcard"
resultType=
"com.zq.system.modules.system.entity.ReportDeath"
>
SELECT *
FROM GX_BZ.REPORT_DEATHS t
WHERE t.ID_CARD = #{idCard}
OR t.NAME LIKE CONCAT('#{name}','%' )
</select>
<select
id=
"getDeathByName"
resultType=
"com.zq.system.modules.system.domain.vo.ReportDeathVo"
>
select * from GX_BZ.REPORT_DEATH t
<where>
<if
test=
"idCard != null"
>
AND t.ID_CARD = #{idCard}
</if>
<if
test=
"name != null"
>
AND t.NAME LIKE CONCAT('${name}','%' )
</if>
<if
test=
"deathType"
>
AND t.DEATH_TYPE = #{deathType}
</if>
</where>
</select>
<!-- <update id="updateByappId">-->
<!-- UPDATE report_death-->
<!-- <set>-->
<!-- <if test="appId != null">-->
<!-- app_id = #{appId, jdbcType=OTHER},-->
<!-- </if>-->
<!-- <if test="systemName != null">-->
<!-- system_name = #{systemName, jdbcType=OTHER},-->
<!-- </if>-->
<!-- <if test="systemTag != null">-->
<!-- system_tag = #{systemTag, jdbcType=OTHER},-->
<!-- </if>-->
<!-- <if test="createTime != null">-->
<!-- create_time = #{createTime, jdbcType=TIMESTAMP},-->
<!-- </if>-->
<!-- <if test="updateTime != null">-->
<!-- update_time = #{updateTime, jdbcType=TIMESTAMP},-->
<!-- </if>-->
<!-- </set>-->
<!-- WHERE app_id = #{appId}-->
<!-- </update>-->
</mapper>
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