提交 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 {
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
差异被折叠。
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) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论