提交 d09d3dc3 authored 作者: 133's avatar 133

[user file] 代码添加

上级 4bb8c2e2
...@@ -12,11 +12,12 @@ ...@@ -12,11 +12,12 @@
<artifactId>dev-file</artifactId> <artifactId>dev-file</artifactId>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>com.itextpdf</groupId> <groupId>org.xhtmlrenderer</groupId>
<artifactId>itextpdf</artifactId> <artifactId>flying-saucer-pdf</artifactId>
<version>5.5.10</version> <version>9.1.5</version>
</dependency> </dependency>
<!-- https://mvnrepository.com/artifact/org.xhtmlrenderer/flying-saucer-pdf-itext5 -->
<dependency> <dependency>
<groupId>org.apache.poi</groupId> <groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId> <artifactId>poi</artifactId>
......
...@@ -56,8 +56,20 @@ public class FileController { ...@@ -56,8 +56,20 @@ public class FileController {
@PostMapping("/printDocuments") @PostMapping("/printDocuments")
public ResponseEntity printDocuments(@RequestBody Documents documents) throws IOException, DocumentException { public ResponseEntity printDocuments(@RequestBody Documents documents) throws IOException, DocumentException {
String[] content = JavaToPdfHtmlFreeMarker.freeMarkerRender(documents,url+"htmlModel/"); String[] content = JavaToPdfHtmlFreeMarker.freeMarkerRender(documents,url+"htmlModel/");
log.info("[file] 调用了生成出入单据对接口"); log.info("[file] 调用了生成出入单据对接口 documents");
return ResponseEntity.ok(JavaToPdfHtmlFreeMarker.createPdf(content,url,preview)); return ResponseEntity.ok(JavaToPdfHtmlFreeMarker.createPdf(content,url,preview,"documents/"));
}
/**
* 生成工作交接的单据
* @return
*/
@ApiOperation(value = "生成工作交接的单据")
@PostMapping("/wordHandover")
public ResponseEntity wordHandover(@RequestBody WorkHandoverDoc workHandoverDoc) {
String[] content = JavaToPdfHtmlFreeMarker.freeMarkerRenderWorkHandover(workHandoverDoc,url+"htmlModel/");
log.info("[file] 生成工作交接的单据");
return ResponseEntity.ok(JavaToPdfHtmlFreeMarker.createPdf(content,url,preview,"workHandover/"));
} }
/** /**
...@@ -68,8 +80,8 @@ public class FileController { ...@@ -68,8 +80,8 @@ public class FileController {
@PostMapping("/printConfirm") @PostMapping("/printConfirm")
public ResponseEntity printConfirm(@RequestBody Confirm confirm) { public ResponseEntity printConfirm(@RequestBody Confirm confirm) {
String[] content = JavaToPdfHtmlFreeMarker.freeMarkerRenderConfirm(confirm,url+"htmlModel/"); String[] content = JavaToPdfHtmlFreeMarker.freeMarkerRenderConfirm(confirm,url+"htmlModel/");
log.info("[file] 调用了生成确认单据对接口"); log.info("[file] 调用了生成确认单据对接口 confirm");
return ResponseEntity.ok(JavaToPdfHtmlFreeMarker.createPdfConfirm(content,url,preview)); return ResponseEntity.ok(JavaToPdfHtmlFreeMarker.createPdf(content,url,preview,"confirm/"));
} }
/** /**
...@@ -81,7 +93,7 @@ public class FileController { ...@@ -81,7 +93,7 @@ public class FileController {
public ResponseEntity printDestruction(@RequestBody Destruction destruction){ public ResponseEntity printDestruction(@RequestBody Destruction destruction){
String[] content = JavaToPdfHtmlFreeMarker.freeMarkerRenderDestruction(destruction,url+"htmlModel/"); String[] content = JavaToPdfHtmlFreeMarker.freeMarkerRenderDestruction(destruction,url+"htmlModel/");
log.info("[file] 调用了生成销毁单据对接口"); log.info("[file] 调用了生成销毁单据对接口");
return ResponseEntity.ok(JavaToPdfHtmlFreeMarker.createPdfDestruction(content,url,preview)); return ResponseEntity.ok(JavaToPdfHtmlFreeMarker.createPdf(content,url,preview,"destruction/"));
} }
/** /**
...@@ -114,7 +126,7 @@ public class FileController { ...@@ -114,7 +126,7 @@ public class FileController {
documents.setDocumentDevices(documentDevices); documents.setDocumentDevices(documentDevices);
String[] content = JavaToPdfHtmlFreeMarker.freeMarkerRender(documents,url+"htmlModel/"); String[] content = JavaToPdfHtmlFreeMarker.freeMarkerRender(documents,url+"htmlModel/");
showPdf(response,JavaToPdfHtmlFreeMarker.createPdf(content,url,preview).getFilePath()); showPdf(response,JavaToPdfHtmlFreeMarker.createPdf(content,url,preview,"documents/").getFilePath());
return ResponseEntity.ok("ok"); return ResponseEntity.ok("ok");
} }
......
...@@ -2,6 +2,7 @@ package com.tykj.dev.device.file.entity; ...@@ -2,6 +2,7 @@ package com.tykj.dev.device.file.entity;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
...@@ -19,11 +20,14 @@ import lombok.NoArgsConstructor; ...@@ -19,11 +20,14 @@ import lombok.NoArgsConstructor;
@ApiModel(value = "工作交接单据", description = "工作交接单据提供数据") @ApiModel(value = "工作交接单据", description = "工作交接单据提供数据")
public class WorkHandoverDevice { public class WorkHandoverDevice {
@ApiModelProperty(value = "序列号" ,example = "1")
private Integer code;
@ApiModelProperty(value = "型号", example = "bmxx") @ApiModelProperty(value = "型号", example = "bmxx")
public String model; private String model;
@ApiModelProperty(value = "名称", example = "BM-1") @ApiModelProperty(value = "名称", example = "BM-1")
public String name; private String name;
@ApiModelProperty(value = "装备类型总数", example = "100") @ApiModelProperty(value = "装备类型总数", example = "100")
private Integer deviceNumber; private Integer deviceNumber;
...@@ -49,6 +53,13 @@ public class WorkHandoverDevice { ...@@ -49,6 +53,13 @@ public class WorkHandoverDevice {
@ApiModelProperty(value = "使用数量", example = "10") @ApiModelProperty(value = "使用数量", example = "10")
private Integer useNum; private Integer useNum;
@ApiModelProperty(value = "其他数据",example = "10")
private Integer otherNum=0;
@ApiModelProperty(value = "序列号区间") @ApiModelProperty(value = "序列号区间")
public String seqs; public String seqs;
public Integer getLen(){
return seqs.length();
}
} }
...@@ -47,9 +47,9 @@ public class RepelQueryServiceImpl implements RepelQueryService { ...@@ -47,9 +47,9 @@ public class RepelQueryServiceImpl implements RepelQueryService {
RepelDeviceUnitService deviceUnitService; RepelDeviceUnitService deviceUnitService;
@Override @Override
public RepelStatisticsVo findRepelTaskStatisticals(Integer taskId, Integer billId) { public RepelStatisticsVo findRepelTaskStatisticals(Integer taskId, Integer billId) {
DeviceRepelDetail deviceRepelDetail= repelDetailService.findDeviceRepelDetailNoDev(billId); // DeviceRepelDetail deviceRepelDetail= repelDetailService.findDeviceRepelDetailNoDev(billId);
DeviceRepel deviceRepel=deviceRepelService.findDeviceRepel(deviceRepelDetail.getRepelId()); DeviceRepel deviceRepel=deviceRepelService.findDeviceRepel(billId);
return new RepelStatisticsVo(deviceRepel.getInitiateName(),deviceRepel.getTime(),repelTaskStatisticalService.findAllRepelTaskStatistical(taskId,deviceRepelDetail.getRepelId())); return new RepelStatisticsVo(deviceRepel.getInitiateName(),deviceRepel.getTime(),repelTaskStatisticalService.findAllRepelTaskStatistical(taskId,billId));
} }
@Override @Override
......
...@@ -14,6 +14,8 @@ import org.springframework.security.core.annotation.AuthenticationPrincipal; ...@@ -14,6 +14,8 @@ import org.springframework.security.core.annotation.AuthenticationPrincipal;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore; import springfox.documentation.annotations.ApiIgnore;
import java.util.stream.Collectors;
/** /**
* @author zjm * @author zjm
* @version 1.0.0 * @version 1.0.0
...@@ -80,4 +82,15 @@ public class HandoverController { ...@@ -80,4 +82,15 @@ public class HandoverController {
return ResponseEntity.ok(workHandoverService.handover(workHandoverAddVo.getTurnOverUserAId())); return ResponseEntity.ok(workHandoverService.handover(workHandoverAddVo.getTurnOverUserAId()));
} }
/**
* 工作交接-查询交接人下拉
*/
@GetMapping(value = "/userList")
@ApiOperation(value = "工作交接-查询交接人下拉")
public ResponseEntity userList(@ApiIgnore @AuthenticationPrincipal SecurityUser securityUser) {
return ResponseEntity.ok(userService.findByUniteId1(securityUser.getCurrentUserInfo().getUnitsId()).stream().filter(userShenRe -> userShenRe.getTrainStatus()!=5).collect(Collectors.toList()));
}
} }
package com.tykj.dev.device.train.dao;
import com.tykj.dev.device.train.entity.WorkHandoverDev;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import java.util.List;
public interface WorkHandoverDevDao extends JpaRepository<WorkHandoverDev, Integer>, JpaSpecificationExecutor<WorkHandoverDev> {
List<WorkHandoverDev> findAllByWordId(Integer wordId);
}
...@@ -11,8 +11,10 @@ import lombok.NoArgsConstructor; ...@@ -11,8 +11,10 @@ import lombok.NoArgsConstructor;
import org.modelmapper.ModelMapper; import org.modelmapper.ModelMapper;
import org.springframework.data.annotation.CreatedDate; import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate; import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import javax.persistence.*; import javax.persistence.*;
import java.util.Date;
import java.util.List; import java.util.List;
/** /**
...@@ -26,12 +28,13 @@ import java.util.List; ...@@ -26,12 +28,13 @@ import java.util.List;
@AllArgsConstructor @AllArgsConstructor
@NoArgsConstructor @NoArgsConstructor
@Entity @Entity
@EntityListeners(AuditingEntityListener.class)
public class WorkHandover { public class WorkHandover {
/** /**
* 工作交接id * 工作交接id
*/ */
@Id @Id
@GeneratedValue @GeneratedValue()
@ApiModelProperty(value = "工作交接id") @ApiModelProperty(value = "工作交接id")
@Column(columnDefinition = "integer NOT NULL AUTO_INCREMENT") @Column(columnDefinition = "integer NOT NULL AUTO_INCREMENT")
private Integer workHandoverId; private Integer workHandoverId;
...@@ -84,17 +87,19 @@ public class WorkHandover { ...@@ -84,17 +87,19 @@ public class WorkHandover {
* 创建时间 * 创建时间
*/ */
@CreatedDate @CreatedDate
private Integer createTime; private Date createTime;
/** /**
* 更新时间 * 更新时间
*/ */
@LastModifiedDate @LastModifiedDate
private Integer updateTime; private Date updateTime;
@ApiModelProperty(value = "区块链RID",name = "recordId") @ApiModelProperty(value = "区块链RID",name = "recordId")
private String recordId; private String recordId;
/** /**
* 发起用户集合 * 发起用户集合
*/ */
...@@ -112,4 +117,10 @@ public class WorkHandover { ...@@ -112,4 +117,10 @@ public class WorkHandover {
*/ */
@Transient @Transient
private List<FileRet> fileRets; private List<FileRet> fileRets;
/**
* 本次交接装备信息清单
*/
@Transient
private List<WorkHandoverDev> workHandoverDevs;
} }
package com.tykj.dev.device.train.entity;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.persistence.*;
import java.util.ArrayList;
import java.util.List;
/**
* @author zjm
* @version 1.0.0
* @ClassName WorkHandoverDevice.java
* @Description TODO
* @createTime 2021年03月09日 15:52:00
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Entity
public class WorkHandoverDev {
@Id
@GeneratedValue
@ApiModelProperty(value = "数据id")
private Integer id;
@ApiModelProperty(value = "业务数据id")
private Integer wordId;
@ApiModelProperty(value = "型号", example = "bmxx")
private String model;
@ApiModelProperty(value = "名称", example = "BM-1")
private String name;
@ApiModelProperty(value = "所属单位", example = "省机要局")
private String ownUnit;
@ApiModelProperty(value = "装备类型总数", example = "100")
private Integer deviceNumber;
@ApiModelProperty(value = "在库数量", example = "10")
private Integer inLibraryNum;
@ApiModelProperty(value = "维修数量", example = "10")
private Integer repairNum;
@ApiModelProperty(value = "销毁数量", example = "10")
private Integer destoryNum;
@ApiModelProperty(value = "退役数量", example = "10")
private Integer retiredNum;
@ApiModelProperty(value = "报废数量", example = "10")
private Integer scrappedNum;
@ApiModelProperty(value = "运输中数量", example = "10")
private Integer allotNum;
@ApiModelProperty(value = "使用数量", example = "10")
private Integer useNum;
// @ApiModelProperty(value = "该型号所有装备Id列表")
// @Transient
// private List<Integer> deviceIds = new ArrayList<>();
//
// @Transient
// @ApiModelProperty(value = "该型号在库装备Id列表")
// private List<Integer> inLibraryIds = new ArrayList<>();
//
// @Transient
// @ApiModelProperty(value = "该型号维修装备Id列表")
// private List<Integer> repairIds = new ArrayList<>();
//
// @Transient
// @ApiModelProperty(value = "该型号销毁装备Id列表")
// private List<Integer> destoryIds = new ArrayList<>();
//
// @Transient
// @ApiModelProperty(value = "该型号退役装备Id列表")
// private List<Integer> retiredIds = new ArrayList<>();
//
// @Transient
// @ApiModelProperty(value = "该型号报废装备Id列表")
// private List<Integer> scrappedIds = new ArrayList<>();
//
// @Transient
// @ApiModelProperty(value = "该型号运输中装备Id列表")
// private List<Integer> allotIds = new ArrayList<>();
//
// @Transient
// @ApiModelProperty(value = "该型号使用中装备Id列表")
// private List<Integer> useIds = new ArrayList<>();
@ApiModelProperty(value = "序列号区间")
@Column(name = "seq_s" ,columnDefinition = "TEXT")
public String seqs;
}
package com.tykj.dev.device.train.entity.vo; package com.tykj.dev.device.train.entity.vo;
import com.tykj.dev.device.library.subject.vo.DeviceStatisticsVo;
import com.tykj.dev.device.train.entity.WorkHandover; import com.tykj.dev.device.train.entity.WorkHandover;
import com.tykj.dev.misc.base.BeanHelper; import com.tykj.dev.device.train.entity.WorkHandoverDev;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
...@@ -27,6 +28,9 @@ public class WorkHandoverAddVo { ...@@ -27,6 +28,9 @@ public class WorkHandoverAddVo {
private List<Integer> turnOverUserAId; private List<Integer> turnOverUserAId;
/**
* 单据装备数据统计数据
*/
List<WorkHandoverDev> workHandoverDevices;
} }
...@@ -7,7 +7,9 @@ import com.tykj.dev.device.task.service.TaskService; ...@@ -7,7 +7,9 @@ import com.tykj.dev.device.task.service.TaskService;
import com.tykj.dev.device.task.subject.bto.TaskBto; import com.tykj.dev.device.task.subject.bto.TaskBto;
import com.tykj.dev.device.task.subject.vo.TaskUserVo; import com.tykj.dev.device.task.subject.vo.TaskUserVo;
import com.tykj.dev.device.train.dao.WorkHandoverDao; import com.tykj.dev.device.train.dao.WorkHandoverDao;
import com.tykj.dev.device.train.dao.WorkHandoverDevDao;
import com.tykj.dev.device.train.entity.WorkHandover; import com.tykj.dev.device.train.entity.WorkHandover;
import com.tykj.dev.device.train.entity.WorkHandoverDev;
import com.tykj.dev.device.train.entity.vo.WorkHandoverAddVo; import com.tykj.dev.device.train.entity.vo.WorkHandoverAddVo;
import com.tykj.dev.device.train.entity.vo.WorkHandoverEndAddVo; import com.tykj.dev.device.train.entity.vo.WorkHandoverEndAddVo;
import com.tykj.dev.device.train.entity.vo.WorkHandoverVo; import com.tykj.dev.device.train.entity.vo.WorkHandoverVo;
...@@ -29,6 +31,7 @@ import org.springframework.http.ResponseEntity; ...@@ -29,6 +31,7 @@ import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Optional; import java.util.Optional;
import java.util.stream.Collector; import java.util.stream.Collector;
...@@ -59,12 +62,15 @@ public class WorkHandoverServiceImpl implements WorkHandoverService { ...@@ -59,12 +62,15 @@ public class WorkHandoverServiceImpl implements WorkHandoverService {
@Autowired @Autowired
UnitsService unitsService; UnitsService unitsService;
@Autowired
WorkHandoverDevDao workHandoverDevDao;
@Override @Override
public WorkHandover createWorkHandover(WorkHandoverAddVo workHandoverAddVo, SecurityUser securityUser) { public WorkHandover createWorkHandover(WorkHandoverAddVo workHandoverAddVo, SecurityUser securityUser) {
log.info("[workHandover] 新建工作交接"); log.info("[workHandover] 新建工作交接");
// WorkHandover // WorkHandover
List<User> users= userService.findAllByUnite(securityUser.getCurrentUserInfo().getUnitsId()); List<User> users= userService.findAllByUnite(securityUser.getCurrentUserInfo().getUnitsId());
List<Integer> handoverIds= users.stream().map(User::getUserId).collect(Collectors.toList()); List<Integer> handoverIds= users.stream().filter(user -> user.getTrainStatus()!=5).map(User::getUserId).collect(Collectors.toList());
WorkHandover workHandover=new WorkHandover(); WorkHandover workHandover=new WorkHandover();
workHandover.setStatus(1); workHandover.setStatus(1);
workHandover.setTurnOverUserIds(StringSplitUtil.ListToString(workHandoverAddVo.getTurnOverUserAId())); workHandover.setTurnOverUserIds(StringSplitUtil.ListToString(workHandoverAddVo.getTurnOverUserAId()));
...@@ -72,6 +78,12 @@ public class WorkHandoverServiceImpl implements WorkHandoverService { ...@@ -72,6 +78,12 @@ public class WorkHandoverServiceImpl implements WorkHandoverService {
workHandover.setInitiateUserId(securityUser.getCurrentUserInfo().getUserId()); workHandover.setInitiateUserId(securityUser.getCurrentUserInfo().getUserId());
//创建workHandoverDB 存储数据库 //创建workHandoverDB 存储数据库
workHandover = workHandoverDao.save(workHandover); workHandover = workHandoverDao.save(workHandover);
Integer id=workHandover.getWorkHandoverId();
List<WorkHandoverDev> workHandoverDevs=workHandoverAddVo.getWorkHandoverDevices();
workHandoverDevs.forEach(
workHandoverDev -> workHandoverDev.setWordId(id)
);
workHandoverDevDao.saveAll(workHandoverDevs);
List<Integer> integers = new ArrayList<>(); List<Integer> integers = new ArrayList<>();
integers.add(securityUser.getCurrentUserInfo().getUserId()); integers.add(securityUser.getCurrentUserInfo().getUserId());
taskService.start(new TaskBto(StatusEnum.WORKHANDOVER1011.id, "工作交接", null, null, workHandover.getWorkHandoverId(), BusinessEnum.WORK_HANDOVER.id, securityUser.getCurrentUserInfo().getUnitsId(), 0, null, integers)); taskService.start(new TaskBto(StatusEnum.WORKHANDOVER1011.id, "工作交接", null, null, workHandover.getWorkHandoverId(), BusinessEnum.WORK_HANDOVER.id, securityUser.getCurrentUserInfo().getUnitsId(), 0, null, integers));
...@@ -114,6 +126,7 @@ public class WorkHandoverServiceImpl implements WorkHandoverService { ...@@ -114,6 +126,7 @@ public class WorkHandoverServiceImpl implements WorkHandoverService {
workHandover.setHandoverUserList(userService.findAllUserIdInUser(StringSplitUtil.stringToList(workHandover.getHandoverUserIds()))); workHandover.setHandoverUserList(userService.findAllUserIdInUser(StringSplitUtil.stringToList(workHandover.getHandoverUserIds())));
workHandover.setTurnOverUserList(userService.findAllUserIdInUser(StringSplitUtil.stringToList(workHandover.getTurnOverUserIds()))); workHandover.setTurnOverUserList(userService.findAllUserIdInUser(StringSplitUtil.stringToList(workHandover.getTurnOverUserIds())));
workHandover.setFileRets(FilesUtil.stringFileToList(workHandover.getFile())); workHandover.setFileRets(FilesUtil.stringFileToList(workHandover.getFile()));
workHandover.setWorkHandoverDevs(workHandoverDevDao.findAllByWordId(workHandover.getWorkHandoverId()));
return workHandover; return workHandover;
} else { } else {
throw new ApiException(ResponseEntity.status(500).body("没有这个id:" + workHandoverId)); throw new ApiException(ResponseEntity.status(500).body("没有这个id:" + workHandoverId));
......
差异被折叠。
...@@ -130,7 +130,7 @@ public class User { ...@@ -130,7 +130,7 @@ public class User {
private Integer position; private Integer position;
/** /**
* 培训状态 0.已培训 1.已过期 2.未培训 3.快过期 * 培训状态 0.已培训 1.已过期 2.未培训 3.快过期 5.不是专管员
*/ */
private Integer trainStatus=2; private Integer trainStatus=2;
/** /**
......
...@@ -42,6 +42,12 @@ public interface UserService extends PublicService<User> { ...@@ -42,6 +42,12 @@ public interface UserService extends PublicService<User> {
List<UserShenRe> findByUniteId(Integer unitsId); List<UserShenRe> findByUniteId(Integer unitsId);
/**
* 根据单位ID查询人员列表(包括自己)
*/
List<UserShenRe> findByUniteId1(Integer unitsId);
/** /**
* 根据单位id查询用户 * 根据单位id查询用户
*/ */
......
...@@ -168,6 +168,11 @@ public class UserServiceImpl implements UserService { ...@@ -168,6 +168,11 @@ public class UserServiceImpl implements UserService {
return userDao.findAllByUnitsId(unitsId).stream().map(User::toRe).sorted(Comparator.comparing(UserShenRe::getShowOrder)).collect(Collectors.toList()); return userDao.findAllByUnitsId(unitsId).stream().map(User::toRe).sorted(Comparator.comparing(UserShenRe::getShowOrder)).collect(Collectors.toList());
} }
@Override
public List<UserShenRe> findByUniteId1(Integer unitsId) {
return userDao.findAllByUnitsId(unitsId).stream().map(User::toRe).sorted(Comparator.comparing(UserShenRe::getShowOrder)).collect(Collectors.toList());
}
@Override @Override
public List<User> findAllByUnite(Integer unitsId) { public List<User> findAllByUnite(Integer unitsId) {
return userDao.findAllByUnitsId(unitsId); return userDao.findAllByUnitsId(unitsId);
...@@ -189,6 +194,7 @@ public class UserServiceImpl implements UserService { ...@@ -189,6 +194,7 @@ public class UserServiceImpl implements UserService {
List<MemberThat> memberThats = new ArrayList<>(); List<MemberThat> memberThats = new ArrayList<>();
userDao.findAllByUnitsId(userConditionsVo.getUnitsId()) userDao.findAllByUnitsId(userConditionsVo.getUnitsId())
.stream() .stream()
.filter(user -> user.getTrainStatus()!=5)
.filter(user ->{ .filter(user ->{
boolean isNull=userConditionsVo.getDim()!=null; boolean isNull=userConditionsVo.getDim()!=null;
if (isNull) { if (isNull) {
...@@ -448,8 +454,8 @@ public class UserServiceImpl implements UserService { ...@@ -448,8 +454,8 @@ public class UserServiceImpl implements UserService {
user.setName(notIsUser.getName()); user.setName(notIsUser.getName());
user.setUnitsId(notIsUser.getUnitId()); user.setUnitsId(notIsUser.getUnitId());
user.setShowOrder(3); user.setShowOrder(3);
user.setTrainStatus(2); user.setTrainStatus(5);
return user; return userDao.save(user);
} }
@Override @Override
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论