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

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

上级 722f3a25
...@@ -179,9 +179,9 @@ public class DeviceCheckController { ...@@ -179,9 +179,9 @@ public class DeviceCheckController {
Integer provId = taskService.get(examJobId).getParentTaskId(); Integer provId = taskService.get(examJobId).getParentTaskId();
// 检查的job id 找到 father 进而找到 father的billid 进而找到title Id // 检查的job id 找到 father 进而找到 father的billid 进而找到title Id
Integer statId = taskService.get(provId).getBillId(); Integer statId = taskService.get(provId).getBillId();
String title = statRepo.getOne(statId).getTitle(); DeviceCheckStat deviceCheckStat = statRepo.getOne(statId);
String title = deviceCheckStat.getTitle();
return ResponseEntity.ok(title); return ResponseEntity.ok(new CheckTitleAndTimeVo(title,deviceCheckStat.getEndTime()));
} }
@ApiOperation(value = "发起自动核查", notes = "发起自动核查") @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 { ...@@ -55,7 +55,7 @@ public class FinalCheckServiceImpl implements FinalCheckService {
@Override @Override
public FinalReportVo generateReport(LocalDate startTime, LocalDate endTime) { public FinalReportVo generateReport(LocalDate startTime, LocalDate endTime) {
String name = LocalDate.now().getYear() + "决算报告"; String name = startTime+"~"+endTime + "决算报告";
String unitName = userService.getCurrentUserUnitName(); String unitName = userService.getCurrentUserUnitName();
String operatorName = userService.getCurrentUserName(); String operatorName = userService.getCurrentUserName();
FinalReport report = new FinalReport(name, unitName, startTime, endTime, LocalDateTime.now(), operatorName); FinalReport report = new FinalReport(name, unitName, startTime, endTime, LocalDateTime.now(), operatorName);
......
...@@ -495,7 +495,7 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService { ...@@ -495,7 +495,7 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
@Override @Override
public void judgeSeqNumbersInNotEqualLifeStatus(List<String> seqNumbers, Integer leftStatus) { 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("装备已被其他同单位专管员操作")); throw new ApiException(ResponseEntity.status(303).body("装备已被其他同单位专管员操作"));
} }
} }
......
...@@ -22,8 +22,7 @@ import javax.persistence.*; ...@@ -22,8 +22,7 @@ import javax.persistence.*;
public class DeviceChange { public class DeviceChange {
@Id @Id
@GeneratedValue @GeneratedValue(strategy=GenerationType.IDENTITY) @ApiModelProperty(name = "主键id")
@ApiModelProperty(name = "主键id")
@Column(columnDefinition = "integer NOT NULL AUTO_INCREMENT") @Column(columnDefinition = "integer NOT NULL AUTO_INCREMENT")
private Integer id; private Integer id;
......
...@@ -135,7 +135,7 @@ public class DeviceLibrary { ...@@ -135,7 +135,7 @@ public class DeviceLibrary {
@ApiModelProperty(value = "管理状态,0-不再所属单位,1-在所属单位") @ApiModelProperty(value = "管理状态,0-不再所属单位,1-在所属单位")
private Integer manageStatus; 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-丢失") @ApiModelProperty(value = "生命状态,0-入库待审核,1-入库审核失败,2-在库,3-配发,4-维修,5,维修失败,6-退回,7-待退装,8-退装,9-待销毁,10-已销毁,11-丢失")
private Integer lifeStatus; private Integer lifeStatus;
......
...@@ -276,7 +276,7 @@ public class ScrapBusinessServiceImpl implements ScrapBusinessService { ...@@ -276,7 +276,7 @@ public class ScrapBusinessServiceImpl implements ScrapBusinessService {
private TaskBto sealOfAuditTask(Integer unitId, Integer repelDetailId,Integer userId){ private TaskBto sealOfAuditTask(Integer unitId, Integer repelDetailId,Integer userId){
List<Integer> list=new ArrayList<>(); List<Integer> list=new ArrayList<>();
list.add(userId); 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; ...@@ -7,6 +7,7 @@ import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import java.time.LocalDateTime;
import java.util.Date; import java.util.Date;
/** /**
...@@ -30,16 +31,15 @@ public class ConditionsTrainVo { ...@@ -30,16 +31,15 @@ public class ConditionsTrainVo {
@ApiModelProperty(value = "开始时间", example = "bmxx", name = "statusTime") @ApiModelProperty(value = "开始时间", example = "bmxx", name = "statusTime")
private String dimName; 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") @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") @ApiModelProperty(value = "结束时间", example = "bmxx", name = "endTime")
private Date endTime; private LocalDateTime endTime;
@ApiModelProperty(value = "单位id", example = "unitId", name = "statusTime") @ApiModelProperty(value = "单位id", example = "unitId", name = "statusTime")
private Integer unitId; private Integer unitId;
} }
...@@ -244,9 +244,9 @@ public class TrainThemeServiceImpl implements TrainThemeService { ...@@ -244,9 +244,9 @@ public class TrainThemeServiceImpl implements TrainThemeService {
private Page<TrainTheme> getContacts(ConditionsTrainVo conditionsTrainVo, Pageable pageable) { private Page<TrainTheme> getContacts(ConditionsTrainVo conditionsTrainVo, Pageable pageable) {
PredicateBuilder<TrainTheme> predicateBuilder = Specifications.and(); PredicateBuilder<TrainTheme> predicateBuilder = Specifications.and();
if (conditionsTrainVo.getEndTime() != null && conditionsTrainVo.getStatusTime() != null) { if (conditionsTrainVo.getEndTime() != null && conditionsTrainVo.getStartTime() != null) {
predicateBuilder.gt("startTime", conditionsTrainVo.getStatusTime()); predicateBuilder.gt("createTime", conditionsTrainVo.getStartTime());
predicateBuilder.lt("endTime", conditionsTrainVo.getEndTime()); predicateBuilder.lt("createTime", conditionsTrainVo.getEndTime());
} }
predicateBuilder.eq("unitsId",conditionsTrainVo.getUnitId()); predicateBuilder.eq("unitsId",conditionsTrainVo.getUnitId());
if (conditionsTrainVo.getDimName() != null) { if (conditionsTrainVo.getDimName() != null) {
......
package com.tykj.dev.device.train.task; package com.tykj.dev.device.train.task;
import com.tykj.dev.device.task.service.TaskService; 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.TrainTaskService;
import com.tykj.dev.device.train.service.TrainThemeService; import com.tykj.dev.device.train.service.TrainThemeService;
import com.tykj.dev.device.user.subject.dao.UnitsDao; 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.MgrcertService;
import com.tykj.dev.device.user.subject.service.UserService; 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.misc.base.StatusEnum;
import com.tykj.dev.socket.MyWebSocket; import com.tykj.dev.socket.MyWebSocket;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.scheduling.annotation.Scheduled; import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PathVariable;
import java.util.Date; import java.util.Date;
...@@ -40,60 +46,67 @@ public class TrainTask { ...@@ -40,60 +46,67 @@ public class TrainTask {
@Autowired @Autowired
MyWebSocket myWebSocket; MyWebSocket myWebSocket;
@Autowired
TrainThemeDao trainThemeDao;
@Scheduled(cron = "0 0/1 * * * ?") @Scheduled(cron = "0 0/1 * * * ?")
private void signUpDeadline() { private void signUpDeadline() {
trainThemeService.findAllStatus(1).forEach( trainThemeService.findAllStatus(StatusEnum.TRAIN1000.id).forEach(
trainTheme -> { trainTheme -> {
log.info("[培训] 检查报名时间是否结束");
long time = new Date().getTime(); long time = new Date().getTime();
if (trainTheme.getTrainTime().getTime() > time) { if (trainTheme.getTrainTime().getTime() <= time) {
log.info("[培训] 检查报名时间{}",trainTheme.getTrainId());
//查询所有必须报名而没有报名的task 状态直接转为待培训 signUpEnd(trainTheme.getTrainId());
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();
} }
} }
); );
} }
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 * * * ?") @Scheduled(cron = "0 0/1 * * * ?")
private void trainingStarted() { private void trainingStarted() {
trainThemeService.findAllStatus(2).forEach( long time=new Date().getTime();
trainThemeService.findAllStatus(StatusEnum.TRAIN1010.id).forEach(
trainTheme -> { trainTheme -> {
//5 培训中 if (trainTheme.getStartTime().getTime() <= time){
trainTaskService.selectBillidAndBillType(trainTheme.getTrainId(), 13, StatusEnum.TRAIN1010.id).forEach( inTraining(trainTheme.getTrainId());
taskBto -> taskService.moveToSpecial(taskBto, StatusEnum.TRAIN1004) }
);
trainTheme.setTrainStatus(StatusEnum.TRAIN1004.id);
trainThemeService.save(trainTheme);
}); });
} }
@Scheduled(cron = "0 0/1 * * * ?") private void inTraining( Integer trainId) {
private void trainingEnd() { TrainTheme trainTheme = trainThemeService.findById(trainId);
trainThemeService.findAllStatus(3).forEach( trainTaskService.selectBillidAndBillType(trainId, BusinessEnum.TRAIN.id, StatusEnum.TRAIN1010.id).forEach(
trainTheme -> { taskBto -> taskService.moveToSpecial(taskBto, StatusEnum.TRAIN1004, taskBto.getInvolveUserIdList().get(0))
trainTaskService.selectBillidAndBillType(trainTheme.getTrainId(), 13, StatusEnum.TRAIN1004.id).forEach( );
taskBto -> taskService.moveToSpecial(taskBto, StatusEnum.TRAIN1008) //5 培训中
); TaskBto taskBto = trainTaskService.selectFatherIsNullAndBillidAndBillType(trainTheme.getTrainId(), BusinessEnum.TRAIN.id);
//5 录入成绩 // //主task往下推待培训状态,0
trainTheme.setTrainStatus(StatusEnum.TRAIN1008.id); taskService.moveToSpecial(taskBto, StatusEnum.TRAIN1004, 0);
trainThemeService.save(trainTheme); trainTheme.setTrainStatus(StatusEnum.TRAIN1004.id);
}); trainThemeService.save(trainTheme);
} }
// @Scheduled(cron = "10 * * * * ?") // @Scheduled(cron = "10 * * * * ?")
// private void trainingEnd1() { // private void trainingEnd1() {
// log.info("定时启动web推送"); // log.info("定时启动web推送");
......
差异被折叠。
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8"/> <meta charset="UTF-8" />
<title>Document</title> <title>Document</title>
<style> <style>
body{ body {
font-family:SimHei; margin: 0;
padding: 0;
font-family: SimHei;
} }
.bottomTxt { .bottomTxt {
text-align: center; text-align: center;
font-size: 10px; font-size: 10px;
...@@ -14,9 +18,10 @@ ...@@ -14,9 +18,10 @@
height: 10px; height: 10px;
line-height: 10px; line-height: 10px;
} }
/*@page{size:297mm 210mm;}<!-- 设置PDF页面大小,此配置只对生成PDF文件有效,不会对页面显示生效 -->*/ /*@page{size:297mm 210mm;}<!-- 设置PDF页面大小,此配置只对生成PDF文件有效,不会对页面显示生效 -->*/
@page { @page {
size:210mm 297mm; size: 210mm 297mm;
/*margin: 0.25in;*/ /*margin: 0.25in;*/
/*-fs-flow-bottom: "footer";*/ /*-fs-flow-bottom: "footer";*/
/*-fs-flow-left: "left";*/ /*-fs-flow-left: "left";*/
...@@ -24,14 +29,16 @@ ...@@ -24,14 +29,16 @@
/*border: thin solid black;*/ /*border: thin solid black;*/
/*padding: 1em;*/ /*padding: 1em;*/
} }
.returnTablePrint{
.returnTablePrint {
width: 100%; width: 100%;
height: 100%; height: 100%;
overflow: hidden; overflow: hidden;
color: #000; color: #000;
cursor: default; cursor: default;
} }
.returnTablePrint .content{
.returnTablePrint .content {
width: 100%; width: 100%;
height: 100%; height: 100%;
/* background: url("../../../assets/img/detailsBg.png") no-repeat; */ /* background: url("../../../assets/img/detailsBg.png") no-repeat; */
...@@ -39,14 +46,16 @@ ...@@ -39,14 +46,16 @@
/*padding: 30px;*/ /*padding: 30px;*/
/*box-sizing: border-box;*/ /*box-sizing: border-box;*/
} }
.returnTablePrint .content>div{
.returnTablePrint .content>div {
width: 100%; width: 100%;
height: 100%; height: 100%;
background: #fff; background: #fff;
/* padding: 30px; */ /* padding: 30px; */
box-sizing: border-box; box-sizing: border-box;
} }
.returnTablePrint .content>p{
.returnTablePrint .content>p {
width: 100%; width: 100%;
text-align: center; text-align: center;
font-size: 22px; font-size: 22px;
...@@ -54,7 +63,7 @@ ...@@ -54,7 +63,7 @@
color: #4a475d; color: #4a475d;
} }
.returnTablePrint .listWrapper{ .returnTablePrint .listWrapper {
/* width: 92%; */ /* width: 92%; */
margin: 0 auto; margin: 0 auto;
/* padding: 0px 20px 20px 20px; */ /* padding: 0px 20px 20px 20px; */
...@@ -62,142 +71,174 @@ ...@@ -62,142 +71,174 @@
/*padding: 10px 30px;*/ /*padding: 10px 30px;*/
box-sizing: border-box; box-sizing: border-box;
} }
.returnTablePrint .list{
.returnTablePrint .list {
/* width: 92%; */ /* width: 92%; */
margin: 0 auto; margin: 0 auto;
/* padding: 0px 20px 20px 20px; */ /* padding: 0px 20px 20px 20px; */
/* height: calc(100% - 75px); */ /* height: calc(100% - 75px); */
height:calc(100% - 12px) height: calc(100% - 12px)
} }
.returnTablePrint .title{
.returnTablePrint .title {
width: 100%; width: 100%;
font-size: 20px; font-size: 20px;
text-align: center; text-align: center;
position: relative; position: relative;
margin: 0 0 15px; margin: 0;
padding:0 20px; padding: 0;
box-sizing: border-box; box-sizing: border-box;
margin-top: 9px;
} }
.returnTablePrint .title span:nth-child(2){
.returnTablePrint .title span:nth-child(2) {
font-size: 28px; font-size: 28px;
color: #000000; color: #000000;
} }
.returnTablePrint .title span:nth-child(2) span{
.returnTablePrint .title span:nth-child(2) span {
font-size: 20px; font-size: 20px;
color: #141414; color: #141414;
} }
.returnTablePrint .main-title { .returnTablePrint .main-title {
font-size: 22px; font-size: 17px;
color: #000000; color: #000000;
margin-bottom: 20px;
text-align: center; text-align: center;
} }
table.altrowstable { table.altrowstable {
width: 100%; width: 100%;
font-size:14px; font-size: 14px;
color:#141414; color: #141414;
border-width: 0px; border-width: 0px;
border-color: #a9c6c9; border-color: #a9c6c9;
border-collapse: collapse; border-collapse: collapse;
text-align: center; text-align: center;
table-layout: fixed; table-layout: fixed;
word-break:break-all; word-break: break-all;
} }
table.altrowstable th { table.altrowstable th {
border-width: 0px; border-width: 0px;
padding: 8px; padding: 8px;
border-style: solid; border-style: solid;
border-color: #a9c6c9; border-color: #a9c6c9;
background-color: #dedede; background-color: #dedede;
height: 20px;
line-height: 20px;
font-size: 10px;
} }
table.altrowstable td { table.altrowstable td {
border-width: 0px; border-width: 0px;
padding: 8px; padding: 8px;
border-style: solid; border-style: solid;
border-color: #a9c6c9; border-color: #a9c6c9;
word-break:break-all; word-break: break-all;
word-wrap : break-word; 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; color: #4a475b;
text-align: right; text-align: right;
font-size: 16px; font-size: 16px;
} }
.person > span{
.person>span {
display: inline-block; display: inline-block;
margin-right: 30pt; margin-right: 30pt;
} }
tr:nth-child(odd) { tr:nth-child(odd) {
background: #fafafa; background: #fafafa;
} }
</style> </style>
</head> </head>
<body> <body>
<div class="returnTablePrint"> <div class="returnTablePrint">
<div class="content"> <div class="content">
<div> <div>
<div class="listWrapper"> <div class="listWrapper">
<div class="list"> <div class="list">
<p class="title"> <p class="title" style="margin-bottom:20px">
<div class="main-title"> <div class="main-title">
<span> <span>
${title} ${title}
</span> </span>
</div> </div>
</p> </p>
<div style="height: 825px;"> <div style="height: 900px;">
<table class="altrowstable" id="alternatecolor"> <table class="altrowstable" id="alternatecolor">
<tr> <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> </tr>
<#list documentDevices as dev> <#list documentDevices as dev>
<tr> <tr>
<td> <td>
<#if dev.code != 0> ${dev.code!}
${dev.code} </td>
</#if> <td>${dev.model}</td>
</td> <td>${dev.category}</td>
<td>${dev.model}</td><td>${dev.category}</td><td>${dev.securityClassification}</td><td>${dev.applicationField}</td><td>${dev.deviceSerialNumber}</td> <td>${dev.securityClassification}</td>
</tr> <td>${dev.applicationField}</td>
</#list> <td>${dev.deviceSerialNumber}</td>
</tr>
</#list>
</table> </table>
</div> </div>
</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>
<span style="width: 200px;text-align: left">审核人:</span> <span style="width: 200px;text-align: left">审核人:</span>
</p> </p>
</div> </div>
</div> </div>
</div> </div>
<p class="bottomTxt">第${page}页/共${count}页</p > <p class="bottomTxt">第${page}页/共${count}页</p>
</div> </div>
<!--<script type="text/javascript">--> <!--<script type="text/javascript">-->
<!--function altRows(id){--> <!--function altRows(id){-->
<!--if(document.getElementsByTagName){--> <!--if(document.getElementsByTagName){-->
<!--var table = document.getElementById(id);--> <!--var table = document.getElementById(id);-->
<!--var rows = table.getElementsByTagName("tr");--> <!--var rows = table.getElementsByTagName("tr");-->
<!--for(i = 0; i < rows.length; i++){--> <!--for(i = 0; i < rows.length; i++){-->
<!--if(i % 2 == 0){--> <!--if(i % 2 == 0){-->
<!--rows[i].className = "evenrowcolor";--> <!--rows[i].className = "evenrowcolor";-->
<!--}else{--> <!--}else{-->
<!--rows[i].className = "oddrowcolor";--> <!--rows[i].className = "oddrowcolor";-->
<!--}--> <!--}-->
<!--}--> <!--}-->
<!--}--> <!--}-->
<!--}--> <!--}-->
<!--window.onload=function(){--> <!--window.onload=function(){-->
<!--altRows('alternatecolor');--> <!--altRows('alternatecolor');-->
<!--}--> <!--}-->
<!--</script>--> <!--</script>-->
</body> </body>
</html> </html>
\ No newline at end of file
差异被折叠。
package com.tykj.dev.device.user.base.ret; package com.tykj.dev.device.user.base.ret;
import com.tykj.dev.misc.base.CustomPage;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
...@@ -19,14 +20,13 @@ import lombok.NoArgsConstructor; ...@@ -19,14 +20,13 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor @NoArgsConstructor
@ApiModel(value = "用户查询条件对象", description = "用户查询条件信息") @ApiModel(value = "用户查询条件对象", description = "用户查询条件信息")
@Builder @Builder
public class UserConditionsVo { public class UserConditionsVo extends CustomPage {
@ApiModelProperty(value = "单位id", name = "unitsId", example = "12321L") @ApiModelProperty(value = "单位id", name = "unitsId", example = "12321L")
private Integer unitsId; 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") @ApiModelProperty(value = "模糊搜索", name = "dim", example = "12321L")
private String dim; private String dim;
@ApiModelProperty(value = "类型" ,name = "type")
private Integer type;
} }
...@@ -74,4 +74,11 @@ public class AreaController { ...@@ -74,4 +74,11 @@ public class AreaController {
return ResponseEntity.ok(areaService.selectPage(page,size)); 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 { ...@@ -44,7 +44,7 @@ public class UserArchivesController {
@Autowired @Autowired
LogoutUtil logout; LogoutUtil logout;
//
@PostMapping(value = "/archives/summary/page") @PostMapping(value = "/archives/summary/page")
@ApiOperation(value = "根据单位id查询用户接口(分页)", notes = "成功返回用户对象集合") @ApiOperation(value = "根据单位id查询用户接口(分页)", notes = "成功返回用户对象集合")
......
...@@ -32,4 +32,6 @@ public interface AreaService extends PublicService<Area> { ...@@ -32,4 +32,6 @@ public interface AreaService extends PublicService<Area> {
Area findByid(Integer areaId); Area findByid(Integer areaId);
List<Integer> findIdQuerySubordinateIds(Integer areaId);
} }
...@@ -120,6 +120,25 @@ public class AreaServiceImpl implements AreaService { ...@@ -120,6 +120,25 @@ public class AreaServiceImpl implements AreaService {
return areaDao.findById(areaId).get(); 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) { private List<UnitsVo> subordinateAllUnits(List<UnitsVo> units, Area area) {
List<Area> list = areaDao.findAllByFatherId(area.getId()); List<Area> list = areaDao.findAllByFatherId(area.getId());
if (list.size() == 0) { if (list.size() == 0) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论