提交 1acf5f4f authored 作者: 133's avatar 133

[用户 决算 核查] 用户添加判断是否为已冻结的账号 决算 查询标题接口修改为标题和截止时间 决算标题 改为 xx-xx决算报告

上级 722f3a25
......@@ -179,9 +179,9 @@ public class DeviceCheckController {
Integer provId = taskService.get(examJobId).getParentTaskId();
// 检查的job id 找到 father 进而找到 father的billid 进而找到title Id
Integer statId = taskService.get(provId).getBillId();
String title = statRepo.getOne(statId).getTitle();
return ResponseEntity.ok(title);
DeviceCheckStat deviceCheckStat = statRepo.getOne(statId);
String title = deviceCheckStat.getTitle();
return ResponseEntity.ok(new CheckTitleAndTimeVo(title,deviceCheckStat.getEndTime()));
}
@ApiOperation(value = "发起自动核查", notes = "发起自动核查")
......
package com.tykj.dev.device.confirmcheck.entity.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.time.LocalDateTime;
/**
* @author zjm
* @version 1.0.0
* @ClassName CheckTitleAndTimeVo.java
* @Description TODO
* @createTime 2021年04月24日 17:52:00
*/
@AllArgsConstructor
@NoArgsConstructor
@Data
public class CheckTitleAndTimeVo {
@ApiModelProperty("标题")
private String title;
@ApiModelProperty("截止时间")
private LocalDateTime createTime;
}
......@@ -55,7 +55,7 @@ public class FinalCheckServiceImpl implements FinalCheckService {
@Override
public FinalReportVo generateReport(LocalDate startTime, LocalDate endTime) {
String name = LocalDate.now().getYear() + "决算报告";
String name = startTime+"~"+endTime + "决算报告";
String unitName = userService.getCurrentUserUnitName();
String operatorName = userService.getCurrentUserName();
FinalReport report = new FinalReport(name, unitName, startTime, endTime, LocalDateTime.now(), operatorName);
......
......@@ -495,7 +495,7 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
@Override
public void judgeSeqNumbersInNotEqualLifeStatus(List<String> seqNumbers, Integer leftStatus) {
if (!deviceLibraryDao.existsAllBySeqNumberInAndLifeStatus(seqNumbers, leftStatus)){
if(!deviceLibraryDao.existsAllBySeqNumberInAndLifeStatus(seqNumbers, leftStatus)){
throw new ApiException(ResponseEntity.status(303).body("装备已被其他同单位专管员操作"));
}
}
......
......@@ -22,8 +22,7 @@ import javax.persistence.*;
public class DeviceChange {
@Id
@GeneratedValue
@ApiModelProperty(name = "主键id")
@GeneratedValue(strategy=GenerationType.IDENTITY) @ApiModelProperty(name = "主键id")
@Column(columnDefinition = "integer NOT NULL AUTO_INCREMENT")
private Integer id;
......
......@@ -135,7 +135,7 @@ public class DeviceLibrary {
@ApiModelProperty(value = "管理状态,0-不再所属单位,1-在所属单位")
private Integer manageStatus;
/**
* 生命状态,0-入库待审核,1-入库审核失败,2-在库,3-配发,4-维修,5,维修失败,6-退回,7-待退装,8-退装,9-待销毁,10-已销毁,11-丢失
* 生命状态,0-入库待审核,1-入库审核失败,2-在库,3-配发,4-维修,5,维修失败,6-退回,7-待退装,8-退装,9-待销毁,10-已销毁,11-丢失 12.清退
*/
@ApiModelProperty(value = "生命状态,0-入库待审核,1-入库审核失败,2-在库,3-配发,4-维修,5,维修失败,6-退回,7-待退装,8-退装,9-待销毁,10-已销毁,11-丢失")
private Integer lifeStatus;
......
......@@ -276,7 +276,7 @@ public class ScrapBusinessServiceImpl implements ScrapBusinessService {
private TaskBto sealOfAuditTask(Integer unitId, Integer repelDetailId,Integer userId){
List<Integer> list=new ArrayList<>();
list.add(userId);
return taskService.start(new TaskBto(StatusEnum.SCRAP_2224.id, "报废任务", null, ".", repelDetailId, BusinessEnum.SCRAP.id, unitId, 0, "", list));
return taskService.start(new TaskBto(StatusEnum.SCRAP_2224.id, "报废设备任务", null, ".", repelDetailId, BusinessEnum.SCRAP.id, unitId, 0, "", list));
}
/**
......
......@@ -7,6 +7,7 @@ import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.time.LocalDateTime;
import java.util.Date;
/**
......@@ -30,16 +31,15 @@ public class ConditionsTrainVo {
@ApiModelProperty(value = "开始时间", example = "bmxx", name = "statusTime")
private String dimName;
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ApiModelProperty(value = "开始时间", example = "bmxx", name = "statusTime")
private Date statusTime;
private LocalDateTime startTime;
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ApiModelProperty(value = "结束时间", example = "bmxx", name = "endTime")
private Date endTime;
private LocalDateTime endTime;
@ApiModelProperty(value = "单位id", example = "unitId", name = "statusTime")
private Integer unitId;
}
......@@ -244,9 +244,9 @@ public class TrainThemeServiceImpl implements TrainThemeService {
private Page<TrainTheme> getContacts(ConditionsTrainVo conditionsTrainVo, Pageable pageable) {
PredicateBuilder<TrainTheme> predicateBuilder = Specifications.and();
if (conditionsTrainVo.getEndTime() != null && conditionsTrainVo.getStatusTime() != null) {
predicateBuilder.gt("startTime", conditionsTrainVo.getStatusTime());
predicateBuilder.lt("endTime", conditionsTrainVo.getEndTime());
if (conditionsTrainVo.getEndTime() != null && conditionsTrainVo.getStartTime() != null) {
predicateBuilder.gt("createTime", conditionsTrainVo.getStartTime());
predicateBuilder.lt("createTime", conditionsTrainVo.getEndTime());
}
predicateBuilder.eq("unitsId",conditionsTrainVo.getUnitId());
if (conditionsTrainVo.getDimName() != null) {
......
package com.tykj.dev.device.train.task;
import com.tykj.dev.device.task.service.TaskService;
import com.tykj.dev.device.task.subject.bto.TaskBto;
import com.tykj.dev.device.train.dao.TrainThemeDao;
import com.tykj.dev.device.train.entity.TrainTheme;
import com.tykj.dev.device.train.service.TrainTaskService;
import com.tykj.dev.device.train.service.TrainThemeService;
import com.tykj.dev.device.user.subject.dao.UnitsDao;
import com.tykj.dev.device.user.subject.service.MgrcertService;
import com.tykj.dev.device.user.subject.service.UserService;
import com.tykj.dev.misc.base.BusinessEnum;
import com.tykj.dev.misc.base.StatusEnum;
import com.tykj.dev.socket.MyWebSocket;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PathVariable;
import java.util.Date;
......@@ -40,60 +46,67 @@ public class TrainTask {
@Autowired
MyWebSocket myWebSocket;
@Autowired
TrainThemeDao trainThemeDao;
@Scheduled(cron = "0 0/1 * * * ?")
private void signUpDeadline() {
trainThemeService.findAllStatus(1).forEach(
trainThemeService.findAllStatus(StatusEnum.TRAIN1000.id).forEach(
trainTheme -> {
log.info("[培训] 检查报名时间是否结束");
long time = new Date().getTime();
if (trainTheme.getTrainTime().getTime() > time) {
//查询所有必须报名而没有报名的task 状态直接转为待培训
trainTaskService.selectBillidAndBillType(trainTheme.getTrainId(), 13, StatusEnum.TRAIN1001.id).forEach(
taskBto -> taskService.moveToSpecial(taskBto, StatusEnum.TRAIN1003, -1)
);
trainTaskService.selectBillidAndBillType(trainTheme.getTrainId(), 13, StatusEnum.TRAIN1002.id).forEach(
taskBto -> taskService.moveToEnd(taskBto)
);
trainTaskService.selectBillidAndBillType(trainTheme.getTrainId(), 13, StatusEnum.TRAIN1000.id).forEach(
taskBto -> taskService.moveToSpecial(taskBto, StatusEnum.TRAIN1010)
);
trainTheme.setTrainStatus(StatusEnum.TRAIN1010.id);
trainThemeService.save(trainTheme);
myWebSocket.sendMessage1();
if (trainTheme.getTrainTime().getTime() <= time) {
log.info("[培训] 检查报名时间{}",trainTheme.getTrainId());
signUpEnd(trainTheme.getTrainId());
}
}
);
}
public void signUpEnd(Integer trainId) {
TrainTheme trainTheme = trainThemeService.findById(trainId);
//查询所有必须报名而没有报名的task 状态直接转为待培训
trainTaskService.selectBillidAndBillType(trainId, BusinessEnum.TRAIN.id, StatusEnum.TRAIN1002.id).forEach(
taskBto -> {
taskService.moveToEnd(taskBto);
}
);
//查询主task
TaskBto taskBto = trainTaskService.selectFatherIsNullAndBillidAndBillType(trainTheme.getTrainId(), BusinessEnum.TRAIN.id);
//主task往下推待培训状态,0
taskService.moveToSpecial(taskBto, StatusEnum.TRAIN1010, 0);
//5 待培训
trainTheme.setTrainStatus(StatusEnum.TRAIN1010.id);
trainThemeService.save(trainTheme);
}
@Scheduled(cron = "0 0/1 * * * ?")
private void trainingStarted() {
trainThemeService.findAllStatus(2).forEach(
long time=new Date().getTime();
trainThemeService.findAllStatus(StatusEnum.TRAIN1010.id).forEach(
trainTheme -> {
//5 培训中
trainTaskService.selectBillidAndBillType(trainTheme.getTrainId(), 13, StatusEnum.TRAIN1010.id).forEach(
taskBto -> taskService.moveToSpecial(taskBto, StatusEnum.TRAIN1004)
);
trainTheme.setTrainStatus(StatusEnum.TRAIN1004.id);
trainThemeService.save(trainTheme);
if (trainTheme.getStartTime().getTime() <= time){
inTraining(trainTheme.getTrainId());
}
});
}
@Scheduled(cron = "0 0/1 * * * ?")
private void trainingEnd() {
trainThemeService.findAllStatus(3).forEach(
trainTheme -> {
trainTaskService.selectBillidAndBillType(trainTheme.getTrainId(), 13, StatusEnum.TRAIN1004.id).forEach(
taskBto -> taskService.moveToSpecial(taskBto, StatusEnum.TRAIN1008)
);
//5 录入成绩
trainTheme.setTrainStatus(StatusEnum.TRAIN1008.id);
trainThemeService.save(trainTheme);
});
private void inTraining( Integer trainId) {
TrainTheme trainTheme = trainThemeService.findById(trainId);
trainTaskService.selectBillidAndBillType(trainId, BusinessEnum.TRAIN.id, StatusEnum.TRAIN1010.id).forEach(
taskBto -> taskService.moveToSpecial(taskBto, StatusEnum.TRAIN1004, taskBto.getInvolveUserIdList().get(0))
);
//5 培训中
TaskBto taskBto = trainTaskService.selectFatherIsNullAndBillidAndBillType(trainTheme.getTrainId(), BusinessEnum.TRAIN.id);
// //主task往下推待培训状态,0
taskService.moveToSpecial(taskBto, StatusEnum.TRAIN1004, 0);
trainTheme.setTrainStatus(StatusEnum.TRAIN1004.id);
trainThemeService.save(trainTheme);
}
// @Scheduled(cron = "10 * * * * ?")
// private void trainingEnd1() {
// log.info("定时启动web推送");
......
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta charset="UTF-8" />
<title>Document</title>
<style>
body{
font-family:SimHei;
body {
font-family: SimHei;
margin: 0;
padding: 0;
}
/*@page{size:297mm 210mm;}<!-- 设置PDF页面大小,此配置只对生成PDF文件有效,不会对页面显示生效 -->*/
@page {
size:297mm 210mm;
size: 297mm 210mm;
}
.bottomTxt {
text-align: center;
font-size: 10px;
......@@ -20,24 +23,28 @@
height: 10px;
line-height: 10px;
}
.returnTablePrint{
.returnTablePrint {
width: 100%;
height: 100%;
overflow: hidden;
color: #000;
cursor: default;
}
.returnTablePrint .content{
.returnTablePrint .content {
width: 100%;
height: 100%;
}
.returnTablePrint .content>div{
.returnTablePrint .content>div {
width: 100%;
height: 100%;
background: #fff;
/* padding: 30px; */
box-sizing: border-box;
}
/* .returnTablePrint .content>p{
width: 100%;
text-align: center;
......@@ -46,24 +53,27 @@
color: #4a475d;
} */
.returnTablePrint .listWrapper{
.returnTablePrint .listWrapper {
/*margin: 0 auto;*/
/* height: calc(100% - 40px); */
box-sizing: border-box;
}
.returnTablePrint .list{
.returnTablePrint .list {
/*margin: 0 auto;*/
height:calc(100% - 12px)
height: calc(100% - 12px)
}
.returnTablePrint .title{
.returnTablePrint .title {
width: 100%;
font-size: 22px;
text-align: center;
position: relative;
/* margin: 0 0 15px; */
padding:0 20px;
box-sizing: border-box;
margin-bottom: 4px;
}
/* .returnTablePrint .title span:nth-child(2){
font-size: 28px;
color: #000000;
......@@ -72,10 +82,11 @@
font-size: 20px;
color: #141414;
} */
.returnTablePrint .title .number{
font-size: 12px;
color: #646464;
.returnTablePrint .title .number {
font-size: 10px;
color: #828282;
}
/* .returnTablePrint .other{
width: 100%;
color: #141414;
......@@ -91,56 +102,69 @@
display: inline-block;
margin:0 40px 0 10px;
} */
.returnTablePrint .listCon{
.returnTablePrint .listCon {
height: 100%;
border: 1px solid #7f7f7f;
}
.returnTablePrint .line1{
.returnTablePrint .line1 {
width: 100%;
font-size: 12px;
font-size: 10px;
box-sizing: border-box;
border-bottom: 1px solid #7f7f7f;
color:#000;
color: #333;
line-height: 20px;
height: 20px;
}
.returnTablePrint .line1 .sendTo {
display: inline-block;
width: 49%;
text-indent: 5px;
box-sizing: border-box;
/*padding-left: 20px;*/
}
.returnTablePrint .line1 .sendNum {
display: inline-block;
width: 49%;
font-size: 10px;
box-sizing: border-box;
/*padding-left: 20px;*/
}
.returnTablePrint .line1 .sendTo{
.returnTablePrint .line1 .sendTo {
border-right: 1px solid #7f7f7f;
}
.returnTablePrint .line1 .sendTo span:nth-child(2),.returnTablePrint .line1 .sendNum span:nth-child(2){
color: #4a475d;
.returnTablePrint .line1 .sendTo span:nth-child(2),
.returnTablePrint .line1 .sendNum span:nth-child(2) {
display: inline-block;
margin-left: 5px;
}
.returnTablePrint .line2{
.returnTablePrint .line2 {
height: 100%;
/* padding: 20px; */
border-bottom: 1px solid #7f7f7f;
}
.returnTablePrint .tableList{
.returnTablePrint .tableList {
height: 500px;
}
.returnTablePrint .line2>>>.el-table tbody tr:nth-child(odd) {
background-color:#fff;
background-color: #fff;
}
.returnTablePrint .line2>>>.el-table tbody tr:nth-child(even) {
background-color:#fff;
background-color: #fff;
}
.returnTablePrint .line3{
.returnTablePrint .line3 {
height: 94px;
width: 100%;
}
.returnTablePrint .line3 .left {
display: inline-block;
width: 49%;
......@@ -148,33 +172,40 @@
position: relative;
/* padding-bottom: 80px; */
}
.returnTablePrint .line3 .right {
display: inline-block;
width: 49%;
/* width: 49%; */
box-sizing: border-box;
position: relative;
/* padding-bottom: 80px; */
}
.returnTablePrint .line3 .left{
.returnTablePrint .line3 .left {
border-right: 1px solid #7f7f7f;
height: 96px;
}
.returnTablePrint .line3 .left>span {
text-indent: 10px;
padding: 5px 10px;
box-sizing: border-box;
height: 90%;
}
.returnTablePrint .line3 .left>span,.returnTablePrint .line3 .right>span{
.returnTablePrint .line3 .left>span,
.returnTablePrint .line3 .right>span {
display: block;
margin: 6px 0px;
/* line-height: 50px; */
}
.returnTablePrint .line3 .right{
.returnTablePrint .line3 .right {
height: 100%;
height: 96px;
padding: 5px 10px;
box-sizing: border-box;
}
.returnTablePrint .line3 .left>span>span:nth-child(2),.returnTablePrint .line3 .right>span>span:nth-child(2){
display: inline-block;
margin-left: 20px;
.returnTablePrint .line3 .left>span>span:nth-child(2),
.returnTablePrint .line3 .right>span>span:nth-child(2) {
margin-left: 8px;
}
.returnTablePrint .line3 i{
.returnTablePrint .line3 i {
display: block;
text-align: right;
position: absolute;
......@@ -183,51 +214,61 @@
font-style: normal;
font-size: 12px;
}
.returnTablePrint .line3 .right i{
.returnTablePrint .line3 .right i {
font-style: normal;
}
.returnTablePrint .line3 i>span>span{
.returnTablePrint .line3 i>span>span {
display: block;
}
.returnTablePrint>>>.el-scrollbar__wrap {
overflow-x: hidden;
margin-bottom:0;
margin-bottom: 0;
}
.returnTablePrint .checkName span:nth-child(2){
.returnTablePrint .checkName span:nth-child(2) {
color: #4a475d;
display: inline-block;
margin-left: 20px;
}
.returnTablePrint>>>.el-table tbody .cell{
.returnTablePrint>>>.el-table tbody .cell {
color: #141414;
}
.returnTablePrint .label{
color: #646464;
font-size: 12px;
.returnTablePrint .label {
color: #666;
font-size: 10px;
}
.returnTablePrint .value{
color: #000;
font-size: 12px;
.returnTablePrint .value {
color: #333;
font-size: 10px;
}
.returnTablePrint .main-title {
font-size: 20px;
color: #000000;
font-size: 17px;
color: #333;
line-height: 20px;
text-align: center;
}
.returnTablePrint .footer{
.returnTablePrint .footer {
display: flex;
justify-content:flex-end;
padding:0 40px;
justify-content: flex-end;
padding: 0 40px;
box-sizing: border-box;
}
.button-submit{
margin-left:50px;
.button-submit {
margin-left: 50px;
}
table.altrowstable {
width: 100%;
font-size: 11px;
color:#141414;
font-size: 16px;
color: #333;
border-width: 0px;
border-color: #a9c6c9;
border-collapse: collapse;
......@@ -235,43 +276,57 @@
table-layout: fixed;
word-break: break-all;
}
table.altrowstable th {
border-width: 0px;
padding: 5px;
border-style: solid;
border-color: #a9c6c9;
background-color: #dedede;
height: 20px;
font-size: 10px;
background-color: #f3f3f3;
}
table.altrowstable td {
border-width: 0px;
padding: 2px 5px;
/*border-style: solid;*/
/*border-color: #a9c6c9;*/
height: 18px;
font-size: 10px;
word-break: break-all;
word-wrap: break-word;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
table.altrowstable .altrowstableTr:nth-child(odd) {
height: 18px;
word-break: break-all;
word-wrap: break-word;
border-bottom: 1px solid #bebebe;
background-color: #f8f8f8;
}
.leftImg {
position: absolute;
top: -53px;
right: 85px;
bottom: 0px;
right: 69px;
}
.rightImg {
position: absolute;
bottom: 0px;
right: 70px;
}
.oddrowcolor{
background-color:#fff;
.oddrowcolor {
background-color: #fff;
}
.evenrowcolor{
background-color:#fafafa;
.evenrowcolor {
background-color: #fafafa;
}
/*tr:nth-child(odd) {*/
/* background: #fafafa;*/
/*}*/
</style>
</head>
<body>
......@@ -286,14 +341,17 @@
${title}
</span>
</div>
<div style="width:100%;text-align:left">
<div style="text-align:left;display: inline-block; width: 32%" class="number">
<span class="number">${number}</span>
<div style="width:100%;font-size: 1px;">
<div style="display:inline-block;text-align:left; width: 33%; font-size: 10px;"
class="number">
<span>${number}</span>
</div>
<div style="text-align:center;display: inline-block; width: 32%" class="number">
<span >${ul}</span>
<div style="display:inline-block;text-align:center; width: 33%; font-size: 10px;"
class="number">
<span>(${ul})</span>
</div>
<div style="text-align:right;display: inline-block; width: 28%" class="number">
<div style="display:inline-block;text-align:right; width: 33%; font-size: 10px;"
class="number">
<span>机密</span>
</div>
</div>
......@@ -301,36 +359,44 @@
<div class="listCon">
<div class="line1">
<span class="sendTo">
<span>发往:</span>
<span style="text-indent: 25px; display: inline-block;">发往:</span>
<span>${receiveUnit}</span>
</span>
<span class="sendNum">
<span>批复文号:</span>
<span style="text-indent: 25px; display: inline-block;">批复文号:</span>
<span>${replyNum}</span>
</span>
</div>
<div class="line2 tableList">
<table class="altrowstable" id="alternatecolor">
<tr>
<th>序号</th><th>型号</th><th>形态</th><th>密级</th><th>应用领域</th><th>数量</th><th style="width: 420px;">装备序列号</th><th>备注</th>
<tr style="border-bottom: 1px solid #dedede; border-top: 1px solid #dedede;">
<!-- <th>序号</th><th>型号</th><th>形态</th><th>密级</th><th>应用领域</th><th>数量</th><th style="width: 420px;">装备序列号</th><th>备注</th> -->
<th>序号</th>
<th>型号</th>
<th>形态</th>
<th>密级</th>
<th>应用领域</th>
<th>数量</th>
<th>装备序列号</th>
<th>备注</th>
</tr>
<#list documentDevices as dev>
<tr>
<td>
<#if dev.code != 0>
${dev.code}
</#if>
</td>
<td>${dev.model!}</td><td>${dev.category!}</td><td>${dev.securityClassification!}</td><td>${dev.applicationField!}</td>
<td>
<#if dev.count != 0>
${dev.count}
</#if>
</td>
<td>${dev.deviceSerialNumber!}</td>
<td>${dev.remark!}</td>
</tr>
</#list>
<tr class="altrowstableTr">
<td>
<#if dev.code != 0>
${dev.code}
</#if>
</td>
<td>${dev.model!}</td><td>${dev.category!}</td><td>${dev.securityClassification!}</td><td>${dev.applicationField!}</td>
<td>
<#if dev.count != 0>
${dev.count}
</#if>
</td>
<td>${dev.deviceSerialNumber!}</td>
<td>${dev.remark!}</td>
</tr>
</#list>
</table>
</div>
<div class="line3">
......@@ -340,49 +406,57 @@
<span class="value">${senderUnit}</span>
</span>
<span>
<span class="label">签发人:</span>
<span class="label"><span style="letter-spacing: 7px;">签发</span>人:</span>
<span class="value">${nameA1!}</span>
</span>
<span>
<span class="label">经办人:</span>
<span class="label"><span style="letter-spacing: 7px;">经办</span>人:</span>
<span class="value">${nameA!}</span>
</span>
<i>
<span style="position: relative;color: #646464">
<span style="color: #646464">
<span style="margin-bottom: 5px;">(公章)</span>
<span><span style="color: #fff;">1234</span><span style="color: #fff;">0121</span><span style="color: #fff;">0232</span></span>
<span><span style="color: #fff;">1234</span><span
style="color: #fff;">0121</span><span
style="color: #fff;">0232</span></span>
<div class="leftImg">
<div id="pos0" >
<img style="width:80px;height:80px" src=${srcA} class="" id=""/>
<div id="pos0">
<img style="width:80px;height:80px" src=${srcA} class="" id="" />
</div>
</div>
</span>
</i>
</span>
<span class="right">
<span>
<span class="label">收件单位:</span>
<span class="value">${receiveUnit}</span>
</span>
<span>
<span class="label">经办人:</span>
<span class="value">${nameB!}</span>
</span>
<span>
<span class="label">经办人:</span>
<span class="value">${nameB1!}</span>
</span>
<i>
<span style="color: #646464">
<span style="margin-bottom: 5px;">(公章)</span>
<span><span style="color: #fff;">1234</span><span style="color: #fff;">0121</span><span style="color: #fff;">0232</span></span>
<div class="rightImg">
<div id="pos1" >
<img style="width:80px;height:80px" src=${srcB}/>
</div>
</div>
<div style="width: 100%;">
<span style="width: 100%;display: inline-block;">
<span class="label">收件单位:</span>
<span class="value">${receiveUnit}</span>
</span>
</i>
<span style="width: 100%;display: inline-block;">
<span class="label"><span style="letter-spacing: 7px;">经办</span>人:</span>
<span class="value">${nameB!}</span>
</span>
<span style="width: 100%;display: inline-block;">
<span class="label"><span style="letter-spacing: 7px;">经办</span>人:</span>
<span class="value">${nameB1!}</span>
</span>
</div>
<div style="position: relative;left: 280px;top: 38px;">
<i>
<span style="color: #646464">
<span style="margin-bottom: 5px;">(公章)</span>
<span><span style="color: #fff;">1234</span><span
style="color: #fff;">0121</span><span
style="color: #fff;">0232</span></span>
<div class="rightImg">
<div id="pos1">
<img style="width:80px;height:80px" src=${srcB} />
</div>
</div>
</span>
</i>
</div>
</span>
</div>
</div>
......@@ -390,28 +464,11 @@
</div>
</div>
</div>
<p class="bottomTxt">第${page}页/共${count}页</p >
<div>
<p class="bottomTxt" style="float: left;">注:编号连续使用"-"省略</p>
<p class="bottomTxt" style="float: right;">第${page}页/共${count}页</p>
</div>
</div>
<!--<script type="text/javascript">-->
<!--function altRows(id){-->
<!--if(document.getElementsByTagName){-->
<!--var table = document.getElementById(id);-->
<!--var rows = table.getElementsByTagName("tr");-->
<!--for(i = 0; i < rows.length; i++){-->
<!--if(i % 2 == 0){-->
<!--rows[i].className = "evenrowcolor";-->
<!--}else{-->
<!--rows[i].className = "oddrowcolor";-->
<!--}-->
<!--}-->
<!--}-->
<!--}-->
<!--window.onload=function(){-->
<!--altRows('alternatecolor');-->
<!--}-->
<!--</script>-->
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta charset="UTF-8" />
<title>Document</title>
<style>
body{
font-family:SimHei;
body {
font-family: SimHei;
padding: 0;
margin: 0;
}
/*@page{size:297mm 210mm;}<!-- 设置PDF页面大小,此配置只对生成PDF文件有效,不会对页面显示生效 -->*/
@page {
size:297mm 210mm;
size: 297mm 210mm;
/*margin: 0.25in;*/
/*-fs-flow-bottom: "footer";*/
/*-fs-flow-left: "left";*/
......@@ -17,6 +21,7 @@
/*border: thin solid black;*/
/*padding: 1em;*/
}
.bottomTxt {
text-align: center;
font-size: 10px;
......@@ -24,14 +29,16 @@
height: 10px;
line-height: 10px;
}
.returnTablePrint{
.returnTablePrint {
width: 100%;
height: 100%;
overflow: hidden;
color: #000;
cursor: default;
}
.returnTablePrint .content{
.returnTablePrint .content {
width: 100%;
height: 100%;
/* background: url("../../../assets/img/detailsBg.png") no-repeat; */
......@@ -39,13 +46,15 @@
/*padding: 30px;*/
/*box-sizing: border-box;*/
}
.returnTablePrint .content>div{
.returnTablePrint .content>div {
width: 100%;
height: 100%;
background: #fff;
/* padding: 30px; */
box-sizing: border-box;
}
/* .returnTablePrint .content>p{
width: 100%;
text-align: center;
......@@ -54,7 +63,7 @@
color: #4a475d;
} */
.returnTablePrint .listWrapper{
.returnTablePrint .listWrapper {
/* width: 92%; */
/* margin: 0 auto; */
/* padding: 0px 20px 20px 20px; */
......@@ -62,22 +71,26 @@
/*padding: 10px 30px;*/
box-sizing: border-box;
}
.returnTablePrint .list{
.returnTablePrint .list {
/* width: 92%; */
/* margin: 0 auto; */
/* padding: 0px 20px 20px 20px; */
/* height: calc(100% - 75px); */
height:calc(100% - 12px)
height: calc(100% - 12px)
}
.returnTablePrint .title{
.returnTablePrint .title {
width: 100%;
font-size: 22px;
text-align: center;
position: relative;
/* margin: 0 0 15px; */
padding:0 20px;
padding: 0;
box-sizing: border-box;
margin-top: 9px;
}
/* .returnTablePrint .title span:nth-child(2){
font-size: 28px;
color: #000000;
......@@ -86,10 +99,11 @@
font-size: 20px;
color: #141414;
} */
.returnTablePrint .title .number{
font-size: 12px;
.returnTablePrint .title .number {
font-size: 10px;
color: #646464;
}
/* .returnTablePrint .other{
width: 100%;
color: #141414;
......@@ -105,18 +119,20 @@
display: inline-block;
margin:0 40px 0 10px;
} */
.returnTablePrint .listCon{
.returnTablePrint .listCon {
height: 100%;
border: 1px solid #7f7f7f;
}
.returnTablePrint .line1{
.returnTablePrint .line1 {
width: 100%;
font-size: 12px;
font-size: 10px;
box-sizing: border-box;
border-bottom: 1px solid #7f7f7f;
color:#000;
color: #000;
line-height: 20px;
}
.returnTablePrint .line1 .sendTo {
display: inline-block;
width: 49%;
......@@ -124,6 +140,7 @@
box-sizing: border-box;
/*padding-left: 20px;*/
}
.returnTablePrint .line1 .sendNum {
display: inline-block;
width: 49%;
......@@ -131,62 +148,76 @@
text-indent: 5px;
border-left: 1px solid #7f7f7f;
}
.returnTablePrint .line1 .sendTo span:nth-child(2),.returnTablePrint .line1 .sendNum span:nth-child(2){
.returnTablePrint .line1 .sendTo span:nth-child(2),
.returnTablePrint .line1 .sendNum span:nth-child(2) {
color: #4a475d;
display: inline-block;
margin-left: 5px;
}
.returnTablePrint .line2{
.returnTablePrint .line2 {
height: 100%;
/* padding: 20px; */
border-bottom: 1px solid #7f7f7f;
}
.returnTablePrint .tableList{
height: 500px;
.returnTablePrint .tableList {
height: 492px;
}
.returnTablePrint .line2>>>.el-table tbody tr:nth-child(odd) {
background-color:#fff;
background-color: #fff;
}
.returnTablePrint .line2>>>.el-table tbody tr:nth-child(even) {
background-color:#fff;
background-color: #fff;
}
.returnTablePrint .line3{
.returnTablePrint .line3 {
width: 100%;
height: 70px;
height: 82px;
/* box-sizing: border-box; */
/*height:150px;*/
/*display: flex;*/
/* height:170px; */
/* padding:20px 0 20px 0; */
}
.returnTablePrint .line3 .left {
display: inline-block;
width: 25%;
box-sizing: border-box;
/*padding-left: 20px;*/
position: relative;
line-height: 70px;
line-height: 81px;
}
.returnTablePrint .line3 .left{
.returnTablePrint .line3 .left {
border-right: 1px solid #7f7f7f;
/*padding-bottom: 40px;*/
}
.returnTablePrint .line3 .left:last-child{
.returnTablePrint .line3 .left:last-child {
border-right: none;
/*padding-bottom: 40px;*/
}
.returnTablePrint .line3 .left>span {
text-indent: 10px;
}
.returnTablePrint .line3 .left>span{
.returnTablePrint .line3 .left>span {
display: block;
/* margin: 15px 0px; */
}
.returnTablePrint .line3 .left>span>span:nth-child(2){
.returnTablePrint .line3 .left>span>span:nth-child(2) {
display: inline-block;
margin-left: 10px;
}
.returnTablePrint .line3 i{
.returnTablePrint .line3 i {
display: block;
text-align: right;
position: absolute;
......@@ -194,82 +225,108 @@
bottom: 5px;
font-style: normal;
}
.returnTablePrint .line3 i>span>span{
.returnTablePrint .line3 i>span>span {
display: block;
}
.returnTablePrint>>>.el-scrollbar__wrap {
overflow-x: hidden;
margin-bottom:0;
margin-bottom: 0;
}
.returnTablePrint .checkName span:nth-child(2){
.returnTablePrint .checkName span:nth-child(2) {
color: #4a475d;
display: inline-block;
margin-left: 20px;
}
.returnTablePrint>>>.el-table tbody .cell{
.returnTablePrint>>>.el-table tbody .cell {
color: #141414;
}
.returnTablePrint .label{
.returnTablePrint .label {
color: #646464;
font-size: 12px;;
font-size: 12px;
;
}
.returnTablePrint .value{
.returnTablePrint .value {
color: #000;
font-size: 12px;;
font-size: 12px;
;
}
.returnTablePrint .main-title {
font-size: 20px;
font-size: 17px;
color: #000000;
/* margin-bottom: 20px; */
text-align: center;
}
.returnTablePrint .footer{
.returnTablePrint .footer {
display: flex;
justify-content:flex-end;
padding:0 40px;
justify-content: flex-end;
padding: 0 40px;
box-sizing: border-box;
}
.button-submit{
margin-left:50px;
.button-submit {
margin-left: 50px;
}
table.altrowstable {
width: 100%;
font-size:11px;
color:#141414;
font-size: 11px;
color: #141414;
border-width: 0px;
border-color: #a9c6c9;
border-collapse: collapse;
text-align: center;
table-layout: fixed;
word-break:break-all;
word-break: break-all;
}
table.altrowstable th {
border-width: 0px;
padding: 5px;
border-style: solid;
border-color: #a9c6c9;
background-color: #dedede;
height: 20px;
line-height: 20px;
font-size: 10px;
}
table.altrowstable td {
border-width: 0px;
padding: 2px 5px;
height: 20px;
line-height: 20px;
font-size: 10px;
/*border-style: solid;*/
/*border-color: #a9c6c9;*/
border: 1px solid #bebebe;
word-break:break-all;
word-wrap : break-word;
word-break: break-all;
word-wrap: break-word;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.oddrowcolor{
background-color:#fff;
.oddrowcolor {
background-color: #fff;
}
.evenrowcolor{
background-color:#fafafa;
.evenrowcolor {
background-color: #fafafa;
}
tr:nth-child(odd) {
background: #fafafa;
}
</style>
</head>
<body>
......@@ -284,14 +341,14 @@
${title}
</span>
</div>
<div style="width:100%;text-align:left">
<div style="text-align:left;display: inline-block; width: 32%" class="number">
<div style="width:100%;text-align:left;font-size: 1px;margin-bottom: 2px;">
<div style="text-align:left;display: inline-block; width: 33%" class="number">
<span class="number">${number}</span>
</div>
<div style="text-align:center;display: inline-block; width: 32%" class="number">
<span >${ul}</span>
<div style="text-align:center;display: inline-block; width: 33%" class="number">
<span>(${ul})</span>
</div>
<div style="text-align:right;display: inline-block; width: 28%" class="number">
<div style="text-align:right;display: inline-block; width: 33%" class="number">
<span>机密</span>
</div>
</div>
......@@ -310,23 +367,32 @@
<div class="line2 tableList">
<table class="altrowstable" id="alternatecolor">
<tr>
<th>序号</th><th>型号</th><th>形态</th><th>密级</th><th>应用领域</th><th>数量</th><th style="width: 420px;">装备序列号</th><th>备注</th>
<th>序号</th>
<th>型号</th>
<th>形态</th>
<th>密级</th>
<th>应用领域</th>
<th>数量</th>
<th>装备序列号</th>
<th>备注</th>
</tr>
<#list documentDevices as dev>
<tr>
<td>
<#if dev.code != 0>
${dev.code}
</#if>
</td>
<td>${dev.model!}</td><td>${dev.category!}</td><td>${dev.securityClassification!}</td><td>${dev.applicationField!}</td>
<td>
<#if dev.count != 0>
${dev.count}
</#if>
</td><td>${dev.deviceSerialNumber!}</td>
<td>${dev.remark!}</td>
</tr>
<tr>
<td>
<!--<#if dev.code !=0>-->
${dev.code!}
<!--</#if>-->
</td>
<td>${dev.model!}</td>
<td>${dev.category!}</td>
<td>${dev.securityClassification!}</td>
<td>${dev.applicationField!}</td>
<td>
${dev.count!}
</td>
<td>${dev.deviceSerialNumber!}</td>
<td>${dev.remark!}</td>
</tr>
</#list>
</table>
</div>
......@@ -361,8 +427,12 @@
</div>
</div>
</div>
<p class="bottomTxt">第${page}页/共${count}页</p >
<div>
<p class="bottomTxt" style="float: left;">注:编号连续使用"-"省略</p>
<p class="bottomTxt" style="float: right;">第${page}页/共${count}页</p>
</div>
</div>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta charset="UTF-8" />
<title>Document</title>
<style>
body{
font-family:SimHei;
body {
margin: 0;
padding: 0;
font-family: SimHei;
}
.bottomTxt {
text-align: center;
font-size: 10px;
......@@ -14,9 +18,10 @@
height: 10px;
line-height: 10px;
}
/*@page{size:297mm 210mm;}<!-- 设置PDF页面大小,此配置只对生成PDF文件有效,不会对页面显示生效 -->*/
@page {
size:210mm 297mm;
size: 210mm 297mm;
/*margin: 0.25in;*/
/*-fs-flow-bottom: "footer";*/
/*-fs-flow-left: "left";*/
......@@ -24,14 +29,16 @@
/*border: thin solid black;*/
/*padding: 1em;*/
}
.returnTablePrint{
.returnTablePrint {
width: 100%;
height: 100%;
overflow: hidden;
color: #000;
cursor: default;
}
.returnTablePrint .content{
.returnTablePrint .content {
width: 100%;
height: 100%;
/* background: url("../../../assets/img/detailsBg.png") no-repeat; */
......@@ -39,14 +46,16 @@
/*padding: 30px;*/
/*box-sizing: border-box;*/
}
.returnTablePrint .content>div{
.returnTablePrint .content>div {
width: 100%;
height: 100%;
background: #fff;
/* padding: 30px; */
box-sizing: border-box;
}
.returnTablePrint .content>p{
.returnTablePrint .content>p {
width: 100%;
text-align: center;
font-size: 22px;
......@@ -54,7 +63,7 @@
color: #4a475d;
}
.returnTablePrint .listWrapper{
.returnTablePrint .listWrapper {
/* width: 92%; */
margin: 0 auto;
/* padding: 0px 20px 20px 20px; */
......@@ -62,142 +71,174 @@
/*padding: 10px 30px;*/
box-sizing: border-box;
}
.returnTablePrint .list{
.returnTablePrint .list {
/* width: 92%; */
margin: 0 auto;
/* padding: 0px 20px 20px 20px; */
/* height: calc(100% - 75px); */
height:calc(100% - 12px)
height: calc(100% - 12px)
}
.returnTablePrint .title{
.returnTablePrint .title {
width: 100%;
font-size: 20px;
text-align: center;
position: relative;
margin: 0 0 15px;
padding:0 20px;
margin: 0;
padding: 0;
box-sizing: border-box;
margin-top: 9px;
}
.returnTablePrint .title span:nth-child(2){
.returnTablePrint .title span:nth-child(2) {
font-size: 28px;
color: #000000;
}
.returnTablePrint .title span:nth-child(2) span{
.returnTablePrint .title span:nth-child(2) span {
font-size: 20px;
color: #141414;
}
.returnTablePrint .main-title {
font-size: 22px;
font-size: 17px;
color: #000000;
margin-bottom: 20px;
text-align: center;
}
table.altrowstable {
width: 100%;
font-size:14px;
color:#141414;
font-size: 14px;
color: #141414;
border-width: 0px;
border-color: #a9c6c9;
border-collapse: collapse;
text-align: center;
table-layout: fixed;
word-break:break-all;
word-break: break-all;
}
table.altrowstable th {
border-width: 0px;
padding: 8px;
border-style: solid;
border-color: #a9c6c9;
background-color: #dedede;
height: 20px;
line-height: 20px;
font-size: 10px;
}
table.altrowstable td {
border-width: 0px;
padding: 8px;
border-style: solid;
border-color: #a9c6c9;
word-break:break-all;
word-wrap : break-word;
word-break: break-all;
word-wrap: break-word;
height: 20px;
line-height: 20px;
font-size: 10px;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.oddrowcolor{
background-color:#fff;
.oddrowcolor {
background-color: #fff;
}
.evenrowcolor{
background-color:#fafafa;
.evenrowcolor {
background-color: #fafafa;
}
.person{
.person {
color: #4a475b;
text-align: right;
font-size: 16px;
}
.person > span{
.person>span {
display: inline-block;
margin-right: 30pt;
}
tr:nth-child(odd) {
background: #fafafa;
}
</style>
</head>
<body>
<div class="returnTablePrint">
<div class="content">
<div>
<div class="listWrapper">
<div class="list">
<p class="title">
<p class="title" style="margin-bottom:20px">
<div class="main-title">
<span>
${title}
</span>
</div>
</p>
<div style="height: 825px;">
<div style="height: 900px;">
<table class="altrowstable" id="alternatecolor">
<tr>
<th>序号</th><th style="width: 150px;">型号</th><th>形态</th><th>密级</th><th>应用领域</th><th style="width: 150px;">装备序列号</th>
<th>序号</th>
<th style="width: 150px;">型号</th>
<th>形态</th>
<th>密级</th>
<th>应用领域</th>
<th style="width: 150px;">装备序列号</th>
</tr>
<#list documentDevices as dev>
<tr>
<td>
<#if dev.code != 0>
${dev.code}
</#if>
</td>
<td>${dev.model}</td><td>${dev.category}</td><td>${dev.securityClassification}</td><td>${dev.applicationField}</td><td>${dev.deviceSerialNumber}</td>
</tr>
</#list>
<tr>
<td>
${dev.code!}
</td>
<td>${dev.model}</td>
<td>${dev.category}</td>
<td>${dev.securityClassification}</td>
<td>${dev.applicationField}</td>
<td>${dev.deviceSerialNumber}</td>
</tr>
</#list>
</table>
</div>
</div>
<p class="person" style="margin-top: 20px">
<p class="person" style="margin-top: 20px;font-size: 10px;">
<span style="width: 200px;text-align: left">经办人:</span>
<span style="width: 200px;text-align: left">审核人:</span>
</p>
</div>
</div>
</div>
<p class="bottomTxt">第${page}页/共${count}页</p >
<p class="bottomTxt">第${page}页/共${count}页</p>
</div>
<!--<script type="text/javascript">-->
<!--function altRows(id){-->
<!--if(document.getElementsByTagName){-->
<!--var table = document.getElementById(id);-->
<!--var rows = table.getElementsByTagName("tr");-->
<!--for(i = 0; i < rows.length; i++){-->
<!--if(i % 2 == 0){-->
<!--rows[i].className = "evenrowcolor";-->
<!--}else{-->
<!--rows[i].className = "oddrowcolor";-->
<!--}-->
<!--}-->
<!--}-->
<!--}-->
<!--window.onload=function(){-->
<!--altRows('alternatecolor');-->
<!--}-->
<!--function altRows(id){-->
<!--if(document.getElementsByTagName){-->
<!--var table = document.getElementById(id);-->
<!--var rows = table.getElementsByTagName("tr");-->
<!--for(i = 0; i < rows.length; i++){-->
<!--if(i % 2 == 0){-->
<!--rows[i].className = "evenrowcolor";-->
<!--}else{-->
<!--rows[i].className = "oddrowcolor";-->
<!--}-->
<!--}-->
<!--}-->
<!--}-->
<!--window.onload=function(){-->
<!--altRows('alternatecolor');-->
<!--}-->
<!--</script>-->
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<title>Document</title>
<style>
body{
font-family:SimHei;
margin: 0;
padding: 0;
}
/*@page{size:297mm 210mm;}<!-- 设置PDF页面大小,此配置只对生成PDF文件有效,不会对页面显示生效 -->*/
@page {
size:297mm 210mm;
}
.bottomTxt {
text-align: center;
font-size: 10px;
color: #646464;
height: 10px;
line-height: 10px;
}
.returnTablePrint{
width: 100%;
height: 100%;
overflow: hidden;
color: #000;
cursor: default;
}
.returnTablePrint .content{
width: 100%;
height: 100%;
}
.returnTablePrint .content>div{
width: 100%;
height: 100%;
background: #fff;
/* padding: 30px; */
box-sizing: border-box;
}
/* .returnTablePrint .content>p{
width: 100%;
text-align: center;
font-size: 22px;
font-weight: bold;
color: #4a475d;
} */
.returnTablePrint .listWrapper{
/*margin: 0 auto;*/
/* height: calc(100% - 40px); */
box-sizing: border-box;
}
.returnTablePrint .list{
/*margin: 0 auto;*/
height:calc(100% - 12px)
}
.returnTablePrint .title{
width: 100%;
font-size: 22px;
text-align: center;
position: relative;
/* margin: 0 0 15px; */
padding:0 20px;
box-sizing: border-box;
}
/* .returnTablePrint .title span:nth-child(2){
font-size: 28px;
color: #000000;
}
.returnTablePrint .title span:nth-child(2) span{
font-size: 20px;
color: #141414;
} */
.returnTablePrint .title .number{
font-size: 12px;
color: #646464;
}
/* .returnTablePrint .other{
width: 100%;
color: #141414;
font-size: 20px;
margin-top: 20px;
padding-left: 50px;
position: relative;
box-sizing: border-box;
margin-bottom: 20px;
}
.returnTablePrint .other>span span:nth-child(2){
display: inline-block;
margin:0 40px 0 10px;
} */
.returnTablePrint .listCon{
height: 100%;
border: 1px solid #7f7f7f;
}
.returnTablePrint .line1{
width: 100%;
font-size: 12px;
box-sizing: border-box;
border-bottom: 1px solid #7f7f7f;
color:#000;
line-height: 20px;
}
.returnTablePrint .line1 .sendTo {
display: inline-block;
width: 49%;
text-indent: 5px;
box-sizing: border-box;
/*padding-left: 20px;*/
}
.returnTablePrint .line1 .sendNum {
display: inline-block;
width: 49%;
box-sizing: border-box;
/*padding-left: 20px;*/
}
.returnTablePrint .line1 .sendTo{
border-right: 1px solid #7f7f7f;
}
.returnTablePrint .line1 .sendTo span:nth-child(2),.returnTablePrint .line1 .sendNum span:nth-child(2){
color: #4a475d;
display: inline-block;
margin-left: 5px;
}
.returnTablePrint .line2{
height: 100%;
/* padding: 20px; */
border-bottom: 1px solid #7f7f7f;
}
.returnTablePrint .tableList{
height: 500px;
}
.returnTablePrint .line2>>>.el-table tbody tr:nth-child(odd) {
background-color:#fff;
}
.returnTablePrint .line2>>>.el-table tbody tr:nth-child(even) {
background-color:#fff;
}
.returnTablePrint .line3{
width: 100%;
}
.returnTablePrint .line3 .left {
display: inline-block;
width: 49%;
box-sizing: border-box;
position: relative;
/* padding-bottom: 80px; */
}
.returnTablePrint .line3 .right {
display: inline-block;
width: 49%;
box-sizing: border-box;
position: relative;
/* padding-bottom: 80px; */
}
.returnTablePrint .line3 .left{
border-right: 1px solid #7f7f7f;
height: 96px;
}
.returnTablePrint .line3 .left>span {
text-indent: 10px;
}
.returnTablePrint .line3 .left>span,.returnTablePrint .line3 .right>span{
display: block;
margin: 6px 0px;
}
.returnTablePrint .line3 .right{
height: 100%;
height: 96px;
}
.returnTablePrint .line3 .left>span>span:nth-child(2),.returnTablePrint .line3 .right>span>span:nth-child(2){
display: inline-block;
margin-left: 20px;
}
.returnTablePrint .line3 i{
display: block;
text-align: right;
position: absolute;
right: 5px;
bottom: 5px;
font-style: normal;
font-size: 12px;
}
.returnTablePrint .line3 .right i{
font-style: normal;
}
.returnTablePrint .line3 i>span>span{
display: block;
}
.returnTablePrint>>>.el-scrollbar__wrap {
overflow-x: hidden;
margin-bottom:0;
}
.returnTablePrint .checkName span:nth-child(2){
color: #4a475d;
display: inline-block;
margin-left: 20px;
}
.returnTablePrint>>>.el-table tbody .cell{
color: #141414;
}
.returnTablePrint .label{
color: #646464;
font-size: 12px;
}
.returnTablePrint .value{
color: #000;
font-size: 12px;
}
.returnTablePrint .main-title {
font-size: 20px;
color: #000000;
line-height: 20px;
text-align: center;
}
.returnTablePrint .footer{
display: flex;
justify-content:flex-end;
padding:0 40px;
box-sizing: border-box;
}
.button-submit{
margin-left:50px;
}
table.altrowstable {
width: 100%;
font-size: 11px;
color:#141414;
border-width: 0px;
border-color: #a9c6c9;
border-collapse: collapse;
text-align: center;
table-layout: fixed;
word-break: break-all;
}
table.altrowstable th {
border-width: 0px;
padding: 5px;
border-style: solid;
border-color: #a9c6c9;
background-color: #dedede;
}
table.altrowstable td {
border-width: 0px;
padding: 2px 5px;
/*border-style: solid;*/
/*border-color: #a9c6c9;*/
word-break: break-all;
word-wrap: break-word;
border-bottom: 1px solid #bebebe;
}
.leftImg {
position: absolute;
top: -53px;
right: 85px;
}
.rightImg {
position: absolute;
bottom: 0px;
right: 70px;
}
.oddrowcolor{
background-color:#fff;
}
.evenrowcolor{
background-color:#fafafa;
}
/*tr:nth-child(odd) {*/
/* background: #fafafa;*/
/*}*/
</style>
</head>
<body>
<div class="returnTablePrint">
<div class="content">
<div>
<div class="listWrapper">
<div class="list">
<div class="title">
<div class="main-title">
<span>
${title}
</span>
</div>
<div style="width:100%;text-align:left">
<div style="text-align:left;display: inline-block; width: 32%" class="number">
<span class="number">${number}</span>
</div>
<div style="text-align:center;display: inline-block; width: 32%" class="number">
<span >${ul}</span>
</div>
<div style="text-align:right;display: inline-block; width: 28%" class="number">
<span>机密</span>
</div>
</div>
</div>
<div class="listCon">
<div class="line1">
<span class="sendTo">
<span>发往:</span>
<span>${receiveUnit}</span>
</span>
<span class="sendNum">
<span>批复文号:</span>
<span>${replyNum}</span>
</span>
</div>
<div class="line2 tableList">
<table class="altrowstable" id="alternatecolor">
<tr>
<th>序号</th><th>型号</th><th>形态</th><th>密级</th><th>应用领域</th><th>数量</th><th style="width: 420px;">装备序列号</th><th>备注</th>
</tr>
<#list documentDevices as dev>
<tr>
<td>
<#if dev.code != 0>
${dev.code}
</#if>
</td>
<td>${dev.model!}</td><td>${dev.category!}</td><td>${dev.securityClassification!}</td><td>${dev.applicationField!}</td>
<td>
<#if dev.count != 0>
${dev.count}
</#if>
</td>
<td>${dev.deviceSerialNumber!}</td>
<td>${dev.remark!}</td>
</tr>
</#list>
</table>
</div>
<div class="line3">
<span class="left">
<span>
<span class="label">发件单位:</span>
<span class="value">${senderUnit}</span>
</span>
<span>
<span class="label">签发人:</span>
<span class="value">${nameA1!}</span>
</span>
<span>
<span class="label">经办人:</span>
<span class="value">${nameA!}</span>
</span>
<i>
<span style="position: relative;color: #646464">
<span style="margin-bottom: 5px;">(公章)</span>
<span><span style="color: #fff;">1234</span><span style="color: #fff;">0121</span><span style="color: #fff;">0232</span></span>
<div class="leftImg">
<div id="pos0" >
<img style="width:80px;height:80px" src=${srcA} class="" id=""/>
</div>
</div>
</span>
</i>
</span>
<span class="right">
<span>
<span class="label">收件单位:</span>
<span class="value">${receiveUnit}</span>
</span>
<span>
<span class="label">经办人:</span>
<span class="value">${nameB!}</span>
</span>
<span>
<span class="label">经办人:</span>
<span class="value">${nameB1!}</span>
</span>
<i>
<span style="color: #646464">
<span style="margin-bottom: 5px;">(公章)</span>
<span><span style="color: #fff;">1234</span><span style="color: #fff;">0121</span><span style="color: #fff;">0232</span></span>
<div class="rightImg">
<div id="pos1" >
<img style="width:80px;height:80px" src=${srcB}/>
</div>
</div>
</span>
</i>
</span>
</div>
</div>
</div>
</div>
</div>
</div>
<p class="bottomTxt">第${page}页/共${count}页</p >
</div>
<!--<script type="text/javascript">-->
<!--function altRows(id){-->
<!--if(document.getElementsByTagName){-->
<!--var table = document.getElementById(id);-->
<!--var rows = table.getElementsByTagName("tr");-->
<!--for(i = 0; i < rows.length; i++){-->
<!--if(i % 2 == 0){-->
<!--rows[i].className = "evenrowcolor";-->
<!--}else{-->
<!--rows[i].className = "oddrowcolor";-->
<!--}-->
<!--}-->
<!--}-->
<!--}-->
<!--window.onload=function(){-->
<!--altRows('alternatecolor');-->
<!--}-->
<!--</script>-->
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta charset="UTF-8" />
<title>Document</title>
<style>
body{
font-family:SimHei;
body {
font-family: SimHei;
margin: 0;
padding: 0;
}
/*@page{size:297mm 210mm;}<!-- 设置PDF页面大小,此配置只对生成PDF文件有效,不会对页面显示生效 -->*/
@page {
size:297mm 210mm;
size: 297mm 210mm;
}
.bottomTxt {
text-align: center;
font-size: 10px;
......@@ -20,24 +23,28 @@
height: 10px;
line-height: 10px;
}
.returnTablePrint{
.returnTablePrint {
width: 100%;
height: 100%;
overflow: hidden;
color: #000;
cursor: default;
}
.returnTablePrint .content{
.returnTablePrint .content {
width: 100%;
height: 100%;
}
.returnTablePrint .content>div{
.returnTablePrint .content>div {
width: 100%;
height: 100%;
background: #fff;
/* padding: 30px; */
box-sizing: border-box;
}
/* .returnTablePrint .content>p{
width: 100%;
text-align: center;
......@@ -46,24 +53,26 @@
color: #4a475d;
} */
.returnTablePrint .listWrapper{
.returnTablePrint .listWrapper {
/*margin: 0 auto;*/
/* height: calc(100% - 40px); */
box-sizing: border-box;
}
.returnTablePrint .list{
.returnTablePrint .list {
/*margin: 0 auto;*/
height:calc(100% - 12px)
height: calc(100% - 12px)
}
.returnTablePrint .title{
.returnTablePrint .title {
width: 100%;
font-size: 22px;
text-align: center;
position: relative;
/* margin: 0 0 15px; */
padding:0 20px;
box-sizing: border-box;
}
/* .returnTablePrint .title span:nth-child(2){
font-size: 28px;
color: #000000;
......@@ -72,10 +81,11 @@
font-size: 20px;
color: #141414;
} */
.returnTablePrint .title .number{
font-size: 12px;
.returnTablePrint .title .number {
font-size: 10px;
color: #646464;
}
/* .returnTablePrint .other{
width: 100%;
color: #141414;
......@@ -91,18 +101,20 @@
display: inline-block;
margin:0 40px 0 10px;
} */
.returnTablePrint .listCon{
.returnTablePrint .listCon {
height: 100%;
border: 1px solid #7f7f7f;
}
.returnTablePrint .line1{
.returnTablePrint .line1 {
width: 100%;
font-size: 12px;
box-sizing: border-box;
border-bottom: 1px solid #7f7f7f;
color:#000;
color: #000;
line-height: 20px;
}
.returnTablePrint .line1 .sendTo {
display: inline-block;
width: 49%;
......@@ -110,106 +122,130 @@
box-sizing: border-box;
/*padding-left: 20px;*/
}
.returnTablePrint .line1 .sendNum {
display: inline-block;
width: 49%;
box-sizing: border-box;
/*padding-left: 20px;*/
}
.returnTablePrint .line1 .sendTo{
.returnTablePrint .line1 .sendTo {
border-right: 1px solid #7f7f7f;
}
.returnTablePrint .line1 .sendTo span:nth-child(2),.returnTablePrint .line1 .sendNum span:nth-child(2){
.returnTablePrint .line1 .sendTo span:nth-child(2),
.returnTablePrint .line1 .sendNum span:nth-child(2) {
color: #4a475d;
display: inline-block;
margin-left: 5px;
}
.returnTablePrint .line2{
.returnTablePrint .line2 {
height: 100%;
/* padding: 20px; */
border-bottom: 1px solid #7f7f7f;
}
.returnTablePrint .tableList{
height: 546px;
.returnTablePrint .tableList {
height: 514px;
}
.returnTablePrint .line2>>>.el-table tbody tr:nth-child(odd) {
background-color:#fff;
background-color: #fff;
}
.returnTablePrint .line2>>>.el-table tbody tr:nth-child(even) {
background-color:#fff;
background-color: #fff;
}
.returnTablePrint .line3{
.returnTablePrint .line3 {
width: 100%;
height:70px;
height: 94px;
/* box-sizing: border-box; */
/*height:150px;*/
/*display: flex;*/
/* height:170px; */
/* padding:20px 0 20px 0; */
}
.returnTablePrint .line3 .left {
display: inline-block;
width: 25%;
box-sizing: border-box;
/*padding-left: 20px;*/
position: relative;
line-height: 70px;
line-height: 94px;
}
.returnTablePrint .line3 .left{
.returnTablePrint .line3 .left {
border-right: 1px solid #7f7f7f;
/*padding-bottom: 40px;*/
}
.returnTablePrint .line3 .left:last-child{
.returnTablePrint .line3 .left:last-child {
border-right: none;
/*padding-bottom: 40px;*/
}
.returnTablePrint .line3 .left>span{
.returnTablePrint .line3 .left>span {
display: block;
/* margin: 15px 0px; */
}
.returnTablePrint .line3 .left>span>span:nth-child(2){
.returnTablePrint .line3 .left>span>span:nth-child(2) {
display: inline-block;
margin-left: 10px;
}
.returnTablePrint>>>.el-scrollbar__wrap {
overflow-x: hidden;
margin-bottom:0;
margin-bottom: 0;
}
.returnTablePrint .checkName span:nth-child(2){
.returnTablePrint .checkName span:nth-child(2) {
color: #4a475d;
display: inline-block;
margin-left: 20px;
}
.returnTablePrint>>>.el-table tbody .cell{
.returnTablePrint>>>.el-table tbody .cell {
color: #141414;
}
.returnTablePrint .label{
.returnTablePrint .label {
color: #646464;
font-size: 12px;
font-size: 10px;
}
.returnTablePrint .value{
.returnTablePrint .value {
color: #000;
font-size: 12px;
font-size: 10px;
}
.returnTablePrint .main-title {
font-size: 20px;
font-size: 17px;
color: #000000;
line-height: 20px;
line-height: 17px;
text-align: center;
margin-top: 9px;
}
.returnTablePrint .footer{
.returnTablePrint .footer {
display: flex;
justify-content:flex-end;
padding:0 40px;
justify-content: flex-end;
padding: 0 40px;
box-sizing: border-box;
}
.button-submit{
margin-left:50px;
.button-submit {
margin-left: 50px;
}
table.altrowstable {
width: 100%;
font-size: 11px;
color:#141414;
color: #141414;
border-width: 0px;
border-color: #a9c6c9;
border-collapse: collapse;
......@@ -217,34 +253,49 @@
table-layout: fixed;
word-break: break-all;
}
table.altrowstable th {
border-width: 0px;
padding: 5px;
border-style: solid;
border-color: #a9c6c9;
background-color: #dedede;
word-break:break-all;
word-break: break-all;
height: 20px;
line-height: 20px;
font-size: 10px;
}
table.altrowstable td {
border-width: 0px;
padding: 5px;
height: 20px;
line-height: 20px;
font-size: 10px;
/*border-style: solid;*/
/*border-color: #a9c6c9;*/
word-break: break-all;
word-wrap: break-word;
border-bottom: 1px solid #bebebe;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.oddrowcolor{
background-color:#fff;
.oddrowcolor {
background-color: #fff;
}
.evenrowcolor{
background-color:#fafafa;
.evenrowcolor {
background-color: #fafafa;
}
/*tr:nth-child(odd) {*/
/* background: #fafafa;*/
/*}*/
</style>
</head>
<body>
......@@ -259,14 +310,14 @@
工作交接单2
</span>
</div>
<div style="width:100%;text-align:left">
<div style="text-align:left;display: inline-block; width: 32%" class="number">
<div style="width:100%;text-align:left;font-size: 1px;margin-bottom:20px">
<div style="text-align:left;display: inline-block; width: 49%" class="number">
<span class="number">时间:${time}</span>
</div>
<div style="text-align:center;display: inline-block; width: 32%" class="number">
<!-- <div style="text-align:center;display: inline-block; width: 34%" class="number">
<span></span>
</div>
<div style="text-align:right;display: inline-block; width: 28%" class="number">
</div> -->
<div style="text-align:right;display: inline-block; width: 50%" class="number">
<span>机密</span>
</div>
</div>
......@@ -275,42 +326,59 @@
<div class="line2 tableList">
<table class="altrowstable" id="alternatecolor">
<tr>
<th>序号</th><th>型号</th><th>名称</th><th>在库</th><th>维修</th><th>报废</th><th>清退</th><th>其他</th><th style="width: 420px;">装备序列号</th>
<th>序号</th>
<th>型号</th>
<th>名称</th>
<th>在库</th>
<th>维修</th>
<th>报废</th>
<th>清退</th>
<th>其他</th>
<th >装备序列号</th>
</tr>
<#list documentDevices as dev>
<tr>
<td>
<#if dev.code != 0>
${dev.code}
</#if>
</td>
<td>${dev.model}</td><td>${dev.name}</td><td>${dev.inLibraryNum}</td><td>${dev.repairNum}</td><td>${dev.scrappedNum}</td><td>${dev.retiredNum}</td><td>${dev.otherNum}</td><td>${dev.seqs}</td>
</tr>
</#list>
<tr>
<td>
${dev.code!}
</td>
<td>${dev.model}</td>
<td>${dev.name}</td>
<td>${dev.inLibraryNum}</td>
<td>${dev.repairNum}</td>
<td>${dev.scrappedNum}</td>
<td>${dev.retiredNum}</td>
<td>${dev.otherNum}</td>
<td>${dev.seqs}</td>
</tr>
</#list>
</table>
</div>
<div class="line3" style="position: relative;">
<span class="left">
<span>
<span style="position: absolute; top: -20px; left: 8px;" class="label">交接人:</span>
<span style="position: absolute; top: -20px; left: 8px;"
class="label">交接人:</span>
<span class="value"></span>
</span>
</span>
<span class="left">
<span>
<span style="position: absolute; top: -20px; left: 8px;" class="label" >移交人:</span>
<span style="position: absolute; top: -20px; left: 8px;"
class="label">移交人:</span>
<span class="value"></span>
</span>
</span>
<span class="left" style="width: 23%;">
<span>
<span style="position: absolute; top: -20px; left: 8px;" class="label">监交人:</span>
<span style="position: absolute; top: -20px; left: 8px;"
class="label">监交人:</span>
<span class="value"></span>
</span>
</span>
<span class="left" style="width: 23%;">
<span>
<span style="position: absolute; top: -20px; left: 8px;" class="label" >上级领导:</span>
<span style="position: absolute; top: -20px; left: 8px;"
class="label">上级领导:</span>
<span class="value"></span>
</span>
</span>
......@@ -323,25 +391,26 @@
<p class="bottomTxt">第${page}页/共${count}页</p>
</div>
<!--<script type="text/javascript">-->
<!--function altRows(id){-->
<!--if(document.getElementsByTagName){-->
<!--var table = document.getElementById(id);-->
<!--var rows = table.getElementsByTagName("tr");-->
<!--for(i = 0; i < rows.length; i++){-->
<!--if(i % 2 == 0){-->
<!--rows[i].className = "evenrowcolor";-->
<!--}else{-->
<!--rows[i].className = "oddrowcolor";-->
<!--}-->
<!--}-->
<!--}-->
<!--}-->
<!--window.onload=function(){-->
<!--altRows('alternatecolor');-->
<!--}-->
<!--function altRows(id){-->
<!--if(document.getElementsByTagName){-->
<!--var table = document.getElementById(id);-->
<!--var rows = table.getElementsByTagName("tr");-->
<!--for(i = 0; i < rows.length; i++){-->
<!--if(i % 2 == 0){-->
<!--rows[i].className = "evenrowcolor";-->
<!--}else{-->
<!--rows[i].className = "oddrowcolor";-->
<!--}-->
<!--}-->
<!--}-->
<!--}-->
<!--window.onload=function(){-->
<!--altRows('alternatecolor');-->
<!--}-->
<!--</script>-->
</body>
</html>
\ No newline at end of file
package com.tykj.dev.device.user.base.ret;
import com.tykj.dev.misc.base.CustomPage;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
......@@ -19,14 +20,13 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor
@ApiModel(value = "用户查询条件对象", description = "用户查询条件信息")
@Builder
public class UserConditionsVo {
public class UserConditionsVo extends CustomPage {
@ApiModelProperty(value = "单位id", name = "unitsId", example = "12321L")
private Integer unitsId;
@ApiModelProperty(value = "页码", name = "page", example = "12321L")
private Integer page;
@ApiModelProperty(value = "条数", name = "size", example = "12321L")
private Integer size;
@ApiModelProperty(value = "模糊搜索", name = "dim", example = "12321L")
private String dim;
@ApiModelProperty(value = "类型" ,name = "type")
private Integer type;
}
......@@ -74,4 +74,11 @@ public class AreaController {
return ResponseEntity.ok(areaService.selectPage(page,size));
}
@GetMapping("/page/{size}")
@ApiOperation(value = "1111111", notes = "成功返回区域对象")
public ResponseEntity selectPage1( @PathVariable Integer size){
return ResponseEntity.ok(areaService.findIdQuerySubordinateIds(size));
}
}
......@@ -44,7 +44,7 @@ public class UserArchivesController {
@Autowired
LogoutUtil logout;
//
@PostMapping(value = "/archives/summary/page")
@ApiOperation(value = "根据单位id查询用户接口(分页)", notes = "成功返回用户对象集合")
......
......@@ -32,4 +32,6 @@ public interface AreaService extends PublicService<Area> {
Area findByid(Integer areaId);
List<Integer> findIdQuerySubordinateIds(Integer areaId);
}
......@@ -120,6 +120,25 @@ public class AreaServiceImpl implements AreaService {
return areaDao.findById(areaId).get();
}
@Override
public List<Integer> findIdQuerySubordinateIds(Integer areaId) {
List<Integer> ids=new ArrayList<>();
return areaId(ids,areaId);
}
private List<Integer> areaId(List<Integer> ids,Integer areaId){
List<Area> areas= areaDao.findAllByFatherId(areaId);
ids.add(areaId);
if (areas!=null&&areas.size()!=0){
areas.forEach(
area -> {
areaId(ids,area.getId());
}
);
}
return ids;
}
private List<UnitsVo> subordinateAllUnits(List<UnitsVo> units, Area area) {
List<Area> list = areaDao.findAllByFatherId(area.getId());
if (list.size() == 0) {
......
package com.tykj.dev.device.user.subject.service.impl;
import com.github.wenhao.jpa.PredicateBuilder;
import com.github.wenhao.jpa.Specifications;
import com.tykj.dev.config.cache.ConfigCache;
import com.tykj.dev.device.user.base.req.DropDownUserLocation;
import com.tykj.dev.device.user.base.req.NotIsUser;
......@@ -14,10 +16,13 @@ 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.entity.*;
import com.tykj.dev.device.user.subject.service.*;
import com.tykj.dev.misc.base.StatusEnum;
import com.tykj.dev.misc.exception.ApiException;
import com.tykj.dev.misc.utils.SpringUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.http.ResponseEntity;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.stereotype.Service;
......@@ -183,36 +188,87 @@ public class UserServiceImpl implements UserService {
}
// public UserPage findAllByUnitePage(UserConditionsVo userConditionsVo) {
// Integer page = userConditionsVo.getPage();
// Integer size = userConditionsVo.getSize();
// List<MemberThat> memberThats = new ArrayList<>();
// userDao.findAllByUnitsId(userConditionsVo.getUnitsId())
// .stream()
// .filter(user -> user.getTrainStatus()!=5)
// .filter(user ->{
// boolean isNull=userConditionsVo.getDim()!=null;
// if (isNull) {
// boolean isName = user.getName().contains(userConditionsVo.getDim());
// boolean isSex = user.getSex() != 1 ? "男".contains(userConditionsVo.getDim()) : "女".contains(userConditionsVo.getDim());
// boolean isUnit = unitsService.findById(user.getUnitsId()).getName().contains(userConditionsVo.getDim());
// boolean isMobile=user.getMobile()!=null&&user.getMobile().contains(userConditionsVo.getDim());
// boolean isPosition = configCache.getPositionMap().get(user.getPosition()).contains(userConditionsVo.getDim());
// return isName || isSex || isUnit || isPosition||isMobile;
// }else {
// return true;
// }
// })
// .forEach(
// user -> {
// MemberThat memberThat = user.toVo();
// memberThat.setUnitsName(unitsService.findById(user.getUnitsId()).getName());
// Mgrcert mgrcert = mgrcertDao.findByUserId(user.getUserId());
// if (mgrcert != null) {
// memberThat.setCertName(mgrcert.getCertName());
// memberThat.setCertNum(mgrcert.getCertNum());
// memberThat.setIssueDate(mgrcert.getIssueDate());
// memberThat.setExpiryDate(mgrcert.getExpiryDate());
// memberThat.setIsExpiry(mgrcert.getIsExpiry());
// memberThat.setRemaining(mgrcert.getExpiryDate().getTime() - mgrcert.getIssueDate().getTime());
// } else {
// memberThat.setRemaining(0L);
// }
// memberThats.add(memberThat);
// }
// );
//// if (userConditionsVo.getDim()!=null){
//// memberThats= memberThats.stream().filter(memberThat -> memberThat.getName().contains(userConditionsVo.getDim())||memberThat.getSex()==1?"男".contains(userConditionsVo.getDim()):"女".equals(userConditionsVo.getDim())||
//// memberThat.getUnitsName().contains(userConditionsVo.getDim())||memberThat.getPosition()==1?"领导".contains(userConditionsVo.getDim()):"专管员".contains(userConditionsVo.getDim())).collect(Collectors.toList());
//// }
//
// memberThats.sort((o1, o2) -> {
// //升序
// return o2.getRemaining().compareTo(o1.getRemaining());
// });
//
//
// int count = memberThats.size();
// if (size > count) {
// return UserPage.builder()
// .total(count)
// .page(page)
// .size(size)
// .data(memberThats).build();
// }
// int countPage = count / size;
// if (count % size != 0) {
// countPage = countPage + 1;
// }
// if (page >= countPage) {
// return UserPage.builder()
// .total(count)
// .page(page)
// .size(size)
// .data(memberThats.subList((page - 1) * size, count)).build();
// } else {
// return UserPage.builder()
// .total(count)
// .page(page)
// .size(size)
// .data(memberThats.subList((page - 1) * size, page * size)).build();
// }
//
// }
@Override
public UserPage findAllByUnitePage(UserConditionsVo userConditionsVo) {
// Pageable pageable = PageRequest.of(page, size, Sort.Direction.ASC, "seq");
// Page<User> all = getContacts(unitsId, pageable);
// return UserPage.builder()
// .data(all.getContent())
// .page(page)
// .size(size)
// .total((int)all.getTotalElements())
// .build();
Integer page = userConditionsVo.getPage();
Integer size = userConditionsVo.getSize();
List<MemberThat> memberThats = new ArrayList<>();
userDao.findAllByUnitsId(userConditionsVo.getUnitsId())
.stream()
.filter(user -> user.getTrainStatus()!=5)
.filter(user ->{
boolean isNull=userConditionsVo.getDim()!=null;
if (isNull) {
boolean isName = user.getName().contains(userConditionsVo.getDim());
boolean isSex = user.getSex() != 1 ? "男".contains(userConditionsVo.getDim()) : "女".contains(userConditionsVo.getDim());
boolean isUnit = unitsService.findById(user.getUnitsId()).getName().contains(userConditionsVo.getDim());
boolean isMobile=user.getMobile()!=null&&user.getMobile().contains(userConditionsVo.getDim());
boolean isPosition = configCache.getPositionMap().get(user.getPosition()).contains(userConditionsVo.getDim());
return isName || isSex || isUnit || isPosition||isMobile;
}else {
return true;
}
})
.forEach(
public UserPage findAllByUnitePage(UserConditionsVo userConditionsVo){
Page<User> userPage= userDao.findAll(getUserSpecification(userConditionsVo),userConditionsVo.getPageable());
List<MemberThat> list=new ArrayList<>();
userPage.getContent().forEach(
user -> {
MemberThat memberThat = user.toVo();
memberThat.setUnitsName(unitsService.findById(user.getUnitsId()).getName());
......@@ -227,60 +283,33 @@ public class UserServiceImpl implements UserService {
} else {
memberThat.setRemaining(0L);
}
memberThats.add(memberThat);
list.add(memberThat);
}
);
// if (userConditionsVo.getDim()!=null){
// memberThats= memberThats.stream().filter(memberThat -> memberThat.getName().contains(userConditionsVo.getDim())||memberThat.getSex()==1?"男".contains(userConditionsVo.getDim()):"女".equals(userConditionsVo.getDim())||
// memberThat.getUnitsName().contains(userConditionsVo.getDim())||memberThat.getPosition()==1?"领导".contains(userConditionsVo.getDim()):"专管员".contains(userConditionsVo.getDim())).collect(Collectors.toList());
// }
memberThats.sort((o1, o2) -> {
//升序
return o2.getRemaining().compareTo(o1.getRemaining());
});
return UserPage.builder()
.total((int)userPage.getTotalElements())
.page(userPage.getPageable().getPageNumber())
.size(userPage.getPageable().getPageSize())
.data(list).build();
}
int count = memberThats.size();
if (size > count) {
return UserPage.builder()
.total(count)
.page(page)
.size(size)
.data(memberThats).build();
}
int countPage = count / size;
if (count % size != 0) {
countPage = countPage + 1;
}
if (page >= countPage) {
return UserPage.builder()
.total(count)
.page(page)
.size(size)
.data(memberThats.subList((page - 1) * size, count)).build();
} else {
return UserPage.builder()
.total(count)
.page(page)
.size(size)
.data(memberThats.subList((page - 1) * size, page * size)).build();
private Specification<User> getUserSpecification(UserConditionsVo userConditionsVo) {
PredicateBuilder<User> predicateBuilder = Specifications.and();
if (userConditionsVo.getType()==1){
List<Integer> ids= areaService.findIdQuerySubordinateIds(userConditionsVo.getUnitsId());
List<Integer> unitIds= unitsDao.findAllByAreaIdIn(ids).stream().map(Units::getUnitId).collect(Collectors.toList());
predicateBuilder.in("unitsId",unitIds.toArray());
}else {
predicateBuilder.eq("unitsId",userConditionsVo.getUnitsId());
}
return predicateBuilder.build();
}
// private Page<User> getContacts(Integer depId, Pageable pageable) {
// Specification<User> contactSpecification = new Specification<User>() {
// @Override
// public Predicate toPredicate(Root root, CriteriaQuery criteriaQuery, CriteriaBuilder criteriaBuilder) {
// Predicate predicate = criteriaBuilder.equal(root.get("department"), depId);
// Predicate status = criteriaBuilder.equal(root.get("status"), "1");
// return criteriaBuilder.and(predicate, status);
// }
// };
// return userDao.findAll(contactSpecification, pageable);
// }
@Override
public Integer updatePw(UserUpdatePw userUpdatePw) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论