提交 041c640b authored 作者: zjm's avatar zjm

fix(单位模块): 添加用户修改后 加入档案

添加用户修改后 加入档案
上级 7fe91103
...@@ -5,7 +5,11 @@ ...@@ -5,7 +5,11 @@
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<title>Document</title> <title>Document</title>
<style> <style>
body,span,p,tr,td { body,
span,
p,
tr,
td {
font-size: 15px; font-size: 15px;
font-family: FangSong_GB2312; font-family: FangSong_GB2312;
margin: 0; margin: 0;
...@@ -16,13 +20,15 @@ ...@@ -16,13 +20,15 @@
@page { @page {
size: 297mm 210mm; size: 297mm 210mm;
} }
.erwei{
.erwei {
width: 43px; width: 43px;
height: 43px; height: 43px;
position: fixed; position: fixed;
left: 150px; left: 150px;
top: 0px; top: 0px;
} }
.bottomTxt { .bottomTxt {
text-align: center; text-align: center;
font-size: 15px; font-size: 15px;
...@@ -164,7 +170,7 @@ ...@@ -164,7 +170,7 @@
.returnTablePrint .tableList { .returnTablePrint .tableList {
height: 375px; height: 375px;
overflow:hidden; overflow: hidden;
} }
.returnTablePrint .line2>>>.el-table tbody tr:nth-child(odd) { .returnTablePrint .line2>>>.el-table tbody tr:nth-child(odd) {
...@@ -200,7 +206,7 @@ ...@@ -200,7 +206,7 @@
border-right: 1px solid #7f7f7f; border-right: 1px solid #7f7f7f;
padding: 5px 10px 0; padding: 5px 10px 0;
height:97%; height: 97%;
} }
.returnTablePrint .line3 .left>span, .returnTablePrint .line3 .left>span,
...@@ -261,11 +267,13 @@ ...@@ -261,11 +267,13 @@
color: #000; color: #000;
font-size: 15px; font-size: 15px;
} }
.returnTablePrint .main-title span{
.returnTablePrint .main-title span {
font-size: 22px; font-size: 22px;
color: #333; color: #333;
font-weight: bold; font-weight: bold;
} }
.returnTablePrint .main-title { .returnTablePrint .main-title {
font-size: 22px; font-size: 22px;
color: #333; color: #333;
...@@ -299,58 +307,71 @@ ...@@ -299,58 +307,71 @@
table.altrowstable2 th { table.altrowstable2 th {
height: 25px; height: 25px;
line-height:25px; line-height: 25px;
font-size: 15px; font-size: 15px;
background-color: #fff; background-color: #fff;
border:1px solid #bebebe; border: 1px solid #bebebe;
padding-top: 0; padding-top: 0;
} }
table.altrowstable2 td { table.altrowstable2 td {
height: 25px; height: 25px;
line-height:25px; line-height: 25px;
font-size: 15px; font-size: 15px;
word-break: break-all; word-break: break-all;
word-wrap: break-word; word-wrap: break-word;
border:1px solid #bebebe; border: 1px solid #bebebe;
width: 100%; width: 100%;
} }
.td2{
.td2 {
height: 50px !important; height: 50px !important;
} }
.td3{
.td3 {
height: 75px !important; height: 75px !important;
} }
.td4{
.td4 {
height: 100px !important; height: 100px !important;
} }
.td5{
.td5 {
height: 125px !important; height: 125px !important;
} }
.td6{
.td6 {
height: 150px !important; height: 150px !important;
} }
.td7{
.td7 {
height: 175px !important; height: 175px !important;
} }
.td8{
.td8 {
height: 200px !important; height: 200px !important;
} }
.td9{
.td9 {
height: 225px !important; height: 225px !important;
} }
.td10{
.td10 {
height: 250px !important; height: 250px !important;
} }
.td11{
.td11 {
height: 275px !important; height: 275px !important;
} }
.td12{
.td12 {
height: 300px !important; height: 300px !important;
} }
.td13{
.td13 {
height: 325px !important; height: 325px !important;
} }
table.altrowstable { table.altrowstable {
width: 100%; width: 100%;
font-size: 16px; font-size: 16px;
...@@ -365,22 +386,22 @@ ...@@ -365,22 +386,22 @@
table.altrowstable th { table.altrowstable th {
height: 24px; height: 24px;
line-height:24px; line-height: 24px;
font-size: 15px; font-size: 15px;
background-color: #ebebeb; background-color: #ebebeb;
marign-top:none; marign-top: none;
border:1px solid #bebebe; border: 1px solid #bebebe;
padding-top: 0; padding-top: 0;
padding-bottom: 0; padding-bottom: 0;
} }
table.altrowstable td { table.altrowstable td {
height: 24px; height: 24px;
line-height:24px; line-height: 24px;
font-size: 15px; font-size: 15px;
word-break: normal; word-break: normal;
word-wrap: normal; word-wrap: normal;
border:1px solid #bebebe; border: 1px solid #bebebe;
width: 100%; width: 100%;
} }
...@@ -401,7 +422,7 @@ ...@@ -401,7 +422,7 @@
position: absolute; position: absolute;
bottom: 0px; bottom: 0px;
right: 150px; right: 150px;
}
.oddrowcolor { .oddrowcolor {
background-color: #fff; background-color: #fff;
...@@ -414,6 +435,27 @@ ...@@ -414,6 +435,27 @@
/*tr:nth-child(odd) {*/ /*tr:nth-child(odd) {*/
/* background: #fafafa;*/ /* background: #fafafa;*/
/*}*/ /*}*/
.signNameGroup {
position: absolute;
top: 5px;
width: 150px;
height: 125px;
display: flex;
flex-direction: column;
}
#signNameGroupLeft {
left: 200px;
}
#signNameGroupRight {
right: 0px;
}
.signNamePic {
width: 100%;
height: 50%;
}
</style> </style>
</head> </head>
...@@ -421,7 +463,6 @@ ...@@ -421,7 +463,6 @@
<div class="returnTablePrint"> <div class="returnTablePrint">
<img class="erwei" src=${QRCode} />
<div class="content"> <div class="content">
<div> <div>
<div class="listWrapper"> <div class="listWrapper">
...@@ -476,50 +517,65 @@ ...@@ -476,50 +517,65 @@
<td> <td>
${dev.code!} ${dev.code!}
</td> </td>
<td>${dev.model!}</td><td>${dev.parts!}</td><td>${dev.securityClassification!}</td><td>${dev.applicationField!}</td> <td>${dev.model!}</td>
<td>${dev.parts!}</td>
<td>${dev.securityClassification!}</td>
<td>${dev.applicationField!}</td>
<td> <td>
${dev.count!} ${dev.count!}
</td> </td>
<!--<td>${dev.deviceSerialNumber!}</td>--> <!--<td>${dev.deviceSerialNumber!}</td>-->
<#if dev.oneCount == 1> <#if dev.oneCount==1>
<td>${dev.deviceSerialNumber!}</td> <td>${dev.deviceSerialNumber!}</td>
<#elseif dev.oneCount == 2> <#elseif dev.oneCount==2>
<td class="td2">${dev.deviceSerialNumber!}</td> <td class="td2">${dev.deviceSerialNumber!}</td>
<#elseif dev.oneCount == 3> <#elseif dev.oneCount==3>
<td class="td3">${dev.deviceSerialNumber!}</td> <td class="td3">${dev.deviceSerialNumber!}</td>
<#elseif dev.oneCount == 4> <#elseif dev.oneCount==4>
<td class="td4">${dev.deviceSerialNumber!}</td> <td class="td4">${dev.deviceSerialNumber!}</td>
<#elseif dev.oneCount == 5> <#elseif dev.oneCount==5>
<td class="td5">${dev.deviceSerialNumber!}</td> <td class="td5">${dev.deviceSerialNumber!}</td>
<#elseif dev.oneCount == 6> <#elseif dev.oneCount==6>
<td class="td6">${dev.deviceSerialNumber!}</td> <td class="td6">${dev.deviceSerialNumber!}</td>
<#elseif dev.oneCount == 7> <#elseif dev.oneCount==7>
<td class="td7">${dev.deviceSerialNumber!}</td> <td class="td7">${dev.deviceSerialNumber!}</td>
<#elseif dev.oneCount == 8> <#elseif dev.oneCount==8>
<td class="td8">${dev.deviceSerialNumber!}</td> <td class="td8">${dev.deviceSerialNumber!}
</td>
<#elseif dev.oneCount == 9> <#elseif dev.oneCount==9>
<td class="td9">${dev.deviceSerialNumber!}</td> <td class="td9">
${dev.deviceSerialNumber!}</td>
<#elseif dev.oneCount == 10> <#elseif dev.oneCount==10>
<td class="td10">${dev.deviceSerialNumber!}</td> <td class="td10">
${dev.deviceSerialNumber!}</td>
<#elseif dev.oneCount == 11> <#elseif dev.oneCount==11>
<td class="td11">${dev.deviceSerialNumber!}</td> <td class="td11">
${dev.deviceSerialNumber!}
</td>
<#elseif dev.oneCount == 12> <#elseif dev.oneCount==12>
<td class="td12">${dev.deviceSerialNumber!}</td> <td class="td12">
${dev.deviceSerialNumber!}
</td>
<#elseif dev.oneCount == 13> <#elseif dev.oneCount==13>
<td class="td13">${dev.deviceSerialNumber!}</td> <td class="td13">
<#elseif dev.oneCount == 14> ${dev.deviceSerialNumber!}
<td class="td14">${dev.deviceSerialNumber!}</td> </td>
<#elseif
dev.oneCount==14>
<td class="td14">
${dev.deviceSerialNumber!}
</td>
</#if> </#if>
<td>${dev.remark!}</td> <td>${dev.remark!}</td>
...@@ -694,6 +750,12 @@ ...@@ -694,6 +750,12 @@
<span class="label"><span style="letter-spacing: 7px;">经办</span>人:</span> <span class="label"><span style="letter-spacing: 7px;">经办</span>人:</span>
<span class="value">${nameA!}</span> <span class="value">${nameA!}</span>
</span> </span>
<span class="signNameGroup" id="signNameGroupLeft">
<img class="signNamePic"
src="https://ss0.baidu.com/94o3dSag_xI4khGko9WTAnF6hhy/zhidao/wh%3D450%2C600/sign=d79eccd8d300baa1ba794fbf72209524/00e93901213fb80e334f60e334d12f2eb9389463.jpg" />
<img class="signNamePic"
src="https://ss0.baidu.com/94o3dSag_xI4khGko9WTAnF6hhy/zhidao/wh%3D450%2C600/sign=d79eccd8d300baa1ba794fbf72209524/00e93901213fb80e334f60e334d12f2eb9389463.jpg" />
</span>
<i> <i>
<span style="color: #000"> <span style="color: #000">
<span style="margin-bottom: 5px;">(公章)</span> <span style="margin-bottom: 5px;">(公章)</span>
...@@ -722,9 +784,19 @@ ...@@ -722,9 +784,19 @@
<span class="label"><span style="letter-spacing: 7px;">经办</span>人:</span> <span class="label"><span style="letter-spacing: 7px;">经办</span>人:</span>
<span class="value">${nameB1!}</span> <span class="value">${nameB1!}</span>
</span> </span>
<span class="signNameGroup" id="signNameGroupRight">
<!--<img class="signNamePic"-->
<!--src="https://ss0.baidu.com/94o3dSag_xI4khGko9WTAnF6hhy/zhidao/pic/item/0eb30f2442a7d93360b9ee89af4bd11373f00132.jpg" />-->
<!--<img class="signNamePic"-->
<!--src="https://ss0.baidu.com/94o3dSag_xI4khGko9WTAnF6hhy/zhidao/pic/item/0eb30f2442a7d93360b9ee89af4bd11373f00132.jpg" />-->
<img class="signNamePic"
src="https://ss0.baidu.com/94o3dSag_xI4khGko9WTAnF6hhy/zhidao/wh%3D450%2C600/sign=d79eccd8d300baa1ba794fbf72209524/00e93901213fb80e334f60e334d12f2eb9389463.jpg" />
<img class="signNamePic"
src="https://ss0.baidu.com/94o3dSag_xI4khGko9WTAnF6hhy/zhidao/wh%3D450%2C600/sign=d79eccd8d300baa1ba794fbf72209524/00e93901213fb80e334f60e334d12f2eb9389463.jpg" />
</span>
</div> </div>
<div style="left: 250px;top: 38px;"> <div style="left: 250px;top: 38px;">
<!--<div style="position: relative;left: 250px;top: 38px;">--> <!--<div style="position: relative;left: 250px;top: 38px;">-->
<#if srcB=='"1"'> <#if srcB=='"1"'>
<i style="position: absolute;bottom: 10px;right: -150px;"> <i style="position: absolute;bottom: 10px;right: -150px;">
<#else> <#else>
...@@ -732,7 +804,7 @@ ...@@ -732,7 +804,7 @@
</#if> </#if>
<!--<i style="bottom: 30px;right: 90px;"> --> <!--<i style="bottom: 30px;right: 90px;"> -->
<span style="color: #000"> <span style="color: #000">
<span style="margin-bottom: 5px;">(公章)</span> <span style="margin-bottom: 5px;">(公章)</span>
<span><span style="color: #fff;">1234</span><span <span><span style="color: #fff;">1234</span><span
...@@ -740,7 +812,9 @@ ...@@ -740,7 +812,9 @@
style="color: #fff;">0232</span></span> style="color: #fff;">0232</span></span>
<!--<div class="rightImg">--> <!--<div class="rightImg">-->
<!--<div id="pos1">--> <!--<div id="pos1">-->
<img id="imgB" style="position: fixed;bottom: 95px;right: 164px;width:80px;height:80px" src=${srcB} /> <img id="imgB"
style="position: fixed;bottom: 95px;right: 164px;width:80px;height:80px"
src=${srcB} />
<!--</div>--> <!--</div>-->
<!--</div>--> <!--</div>-->
...@@ -762,8 +836,3 @@ ...@@ -762,8 +836,3 @@
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -3,6 +3,7 @@ package com.tykj.dev.device.user.subject.controller; ...@@ -3,6 +3,7 @@ package com.tykj.dev.device.user.subject.controller;
import com.tykj.dev.config.swagger.AutoDocument; import com.tykj.dev.config.swagger.AutoDocument;
import com.tykj.dev.device.user.base.req.*; import com.tykj.dev.device.user.base.req.*;
import com.tykj.dev.device.user.base.ret.UserUpdatePw; import com.tykj.dev.device.user.base.ret.UserUpdatePw;
import com.tykj.dev.device.user.cache.UserCache;
import com.tykj.dev.device.user.config.MyFilter; import com.tykj.dev.device.user.config.MyFilter;
import com.tykj.dev.device.user.config.MyUserDetailsServiceImpl; import com.tykj.dev.device.user.config.MyUserDetailsServiceImpl;
import com.tykj.dev.device.user.subject.entity.SecurityUser; import com.tykj.dev.device.user.subject.entity.SecurityUser;
...@@ -59,6 +60,9 @@ public class UserController { ...@@ -59,6 +60,9 @@ public class UserController {
@Autowired @Autowired
LogoutUtil logout; LogoutUtil logout;
@Autowired
UserCache userCache;
@Autowired @Autowired
MyWebSocket myWebSocket; MyWebSocket myWebSocket;
// @PostMapping(value = "/login") // @PostMapping(value = "/login")
...@@ -112,6 +116,7 @@ public class UserController { ...@@ -112,6 +116,7 @@ public class UserController {
@PostMapping(value = "/update") @PostMapping(value = "/update")
@ApiOperation(value = "用户更新接口", notes = "更新成功返回用户对象") @ApiOperation(value = "用户更新接口", notes = "更新成功返回用户对象")
public ResponseEntity updateUser(@RequestBody User user) { public ResponseEntity updateUser(@RequestBody User user) {
return ResponseEntity.ok(userService.update(user)); return ResponseEntity.ok(userService.update(user));
} }
......
...@@ -17,6 +17,7 @@ import com.tykj.dev.device.user.subject.dao.UserDao; ...@@ -17,6 +17,7 @@ import com.tykj.dev.device.user.subject.dao.UserDao;
import com.tykj.dev.device.user.subject.dao.UserRoleDao; import com.tykj.dev.device.user.subject.dao.UserRoleDao;
import com.tykj.dev.device.user.subject.entity.*; import com.tykj.dev.device.user.subject.entity.*;
import com.tykj.dev.device.user.subject.service.*; import com.tykj.dev.device.user.subject.service.*;
import com.tykj.dev.device.user.util.UserUtils;
import com.tykj.dev.misc.exception.ApiException; import com.tykj.dev.misc.exception.ApiException;
import com.tykj.dev.misc.utils.SpringUtils; import com.tykj.dev.misc.utils.SpringUtils;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
...@@ -163,18 +164,44 @@ public class UserServiceImpl implements UserService { ...@@ -163,18 +164,44 @@ public class UserServiceImpl implements UserService {
return userDao.findAll(); return userDao.findAll();
} }
@Autowired
UserUtils userUtils;
@Override @Override
public User update(User user) { public User update(User user) {
Optional<User> userOptional = userDao.findById(user.getUserId()); User oldUser=userCache.findById(user.getUserId());
if (userOptional.isPresent()){ if (!oldUser.getName().equals(user.getName())){
User user1= userOptional.get(); userLogService.save(new UserLog(userUtils.getCurrentUserId(),new Date(),"修改信息 名称:"+oldUser.getName()+"->"+user.getName()));
user.setNoPassword(user1.getNoPassword());
user.setShowOrder(user1.getShowOrder()); }
user.setTrainStatus(user1.getTrainStatus()); if (!oldUser.getMobile().equals(user.getMobile())){
user.setIsDel(user1.getIsDel()); userLogService.save(new UserLog(userUtils.getCurrentUserId(),new Date(),"修改信息 手机号码:"+oldUser.getMobile()+"->"+user.getMobile()));
}else {
throw new ApiException(ResponseEntity.status(500).body("没找到对应的用户id")); }
if (!oldUser.getSex().equals(user.getSex())){
userLogService.save(new UserLog(userUtils.getCurrentUserId(),new Date(),"修改信息 性别:"+(oldUser.getSex()==0 ? "男" : "女")+"->"+(user.getSex()==0 ? "男" : "女")));
}
if (!oldUser.getPosition().equals(user.getPosition())){
userLogService.save(new UserLog(userUtils.getCurrentUserId(),new Date(),"修改信息 职位:"+ (oldUser.getPosition()==0 ? "领导" : "职员")+"->"+(user.getPosition()==0 ? "领导" : "职员")));
}
if (!oldUser.getEmail().equals(user.getEmail())){
userLogService.save(new UserLog(userUtils.getCurrentUserId(),new Date(),"修改信息 邮箱:"+oldUser.getEmail()+"->"+user.getEmail()));
}
if (!oldUser.getIdCard().equals(user.getIdCard())){
userLogService.save(new UserLog(userUtils.getCurrentUserId(),new Date(),"修改信息 身份证:"+oldUser.getIdCard()+"->"+user.getIdCard()));
}
if (!oldUser.getTelphone().equals(user.getTelphone())){
userLogService.save(new UserLog(userUtils.getCurrentUserId(),new Date(),"修改信息 固定电话:"+oldUser.getTelphone()+"->"+user.getTelphone()));
} }
user.setNoPassword(oldUser.getNoPassword());
user.setShowOrder(oldUser.getShowOrder());
user.setTrainStatus(oldUser.getTrainStatus());
user.setIsDel(oldUser.getIsDel());
User user1 = userDao.save(user); User user1 = userDao.save(user);
userCache.refresh(userDao.findAll()); userCache.refresh(userDao.findAll());
return user1; return user1;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论