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

[用户 退役 清退] 代码提交

上级 b81cd0dd
package com.tykj.dev.device.decommissioning.entity.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.tykj.dev.misc.base.CustomPage;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
......@@ -23,9 +24,11 @@ import java.util.Date;
@ApiModel("退役业务分页查询业务")
public class DecommissioningSelectVo extends CustomPage {
@ApiModelProperty(name = "开始清退的年份 默认各式 2020-01-01 00:00:00")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private LocalDateTime startTime;
@ApiModelProperty(name = "开始清退的年份 默认各式 2020-01-01 00:00:00")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private LocalDateTime endTime;
}
......@@ -119,6 +119,7 @@ public class DeviceDecommissioningBusinessServiceImpl implements DeviceDecommiss
DeviceDecommissioningDetail deviceDecommissioningDetail1 = deviceDecommissioningDetailService.findDeviceDecommissioningDetail(taskBto.getBillId());
deviceDecommissioningDetail.setId(deviceDecommissioningDetail1.getId());
deviceDecommissioningDetail.setDecommissioningStatus(taskBto.getBillStatus());
deviceDecommissioningDetail.setNum(deviceDecommissioningDetail1.getNum());
}
deviceDecommissioningDetail.setApplyNumber(decommissioningOrderOutData.getApplyNumber());
deviceDecommissioningDetail.setReplayNumber(decommissioningOrderOutData.getReplayNumber());
......
......@@ -25,6 +25,9 @@ public interface DeviceLibraryDao extends JpaRepository<DeviceLibrary, Integer>,
List<DeviceLibrary> findAllBySeqNumberIn(List<String> seqNumbers);
List<DeviceLibrary> findAllBySeqNumberInAndOwnUnitIn(List<String> seqNumbers,List<String> unitNames);
boolean existsAllBySeqNumberInAndLifeStatus(List<String> seqNumbers,Integer lifeStatus);
/**
......
......@@ -111,6 +111,8 @@ public class ScrapBusinessServiceImpl implements ScrapBusinessService {
Scrap scrap1= scrapService.findScrap(taskBto.getBillId());
scrap.setId(scrap1.getId());
scrap.setScrapStatus(taskBto.getBillStatus());
scrap.setNum(scrap1.getNum());
}
scrap.setApplyNumber(scrapOrderOutData.getApplyNumber());
scrap.setReplayNumber(scrapOrderOutData.getReplayNumber());
......
......@@ -169,5 +169,11 @@ public class RepelQueryController {
}
@GetMapping(value ="/provinceDirectlyUnder/device/{taskId}")
@ApiOperation(value = "直属单位全部清退装备查询接口", notes = "直属单位全部清退装备查询接口")
public ResponseEntity provinceDirectlyUnderDevice( @PathVariable Integer taskId){
return ResponseEntity.ok(repelQueryService.provinceDirectlyUnderDev(taskId));
}
}
......@@ -203,6 +203,7 @@ public class DeviceRepelDetail extends BaseEntity {
private String scriptJson;
@Column(name = "directly_under_devices",columnDefinition = "TEXT")
@ApiModelProperty(value = "直属单位列表使用")
private String directlyUnderDevices;
@Transient
......
package com.tykj.dev.device.sendback.entity.vo;
import com.tykj.dev.device.library.subject.domin.DeviceLibrary;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
import java.util.Map;
/**
* @author zjm
* @version 1.0.0
* @ClassName AllDirectUnderDevVo.java
* @Description
* @createTime 2021年04月27日 14:46:00
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("直属单位查询所有装备的可选对象")
public class AllDirectUnderDevVo {
private Map<String, List<DeviceLibrary>> unitNameDeviceMap;
private boolean isNotAbnormal;
private String unitName;
}
package com.tykj.dev.device.sendback.entity.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.tykj.dev.misc.base.CustomPage;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
......@@ -22,9 +23,11 @@ import java.time.LocalDateTime;
@ApiModel("退役业务分页查询业务")
public class RepelDetailSelectVo extends CustomPage {
@ApiModelProperty(name = "开始清退的年份 默认各式 2020-01-01 00:00:00")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private LocalDateTime startTime;
@ApiModelProperty(name = "开始清退的年份 默认各式 2020-01-01 00:00:00")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private LocalDateTime endTime;
@ApiModelProperty(name = "单位id")
......
......@@ -75,10 +75,9 @@ public interface RepelQueryService {
List<ModelNameGroup> retiredList(RepelManagementVo repelManagementVo);
/**
*省直属任务装备查询接口 (无用)
*省直属任务装备查询接口
*/
List<DeviceLibrary> provinceDirectlyUnderDev(Integer taskId);
AllDirectUnderDevVo provinceDirectlyUnderDev(Integer taskId);
/**
* 查询直属单位列表
......
......@@ -104,8 +104,10 @@ public class DeviceRepelDetailServiceImpl implements DeviceRepelDetailService {
@Override
public Page<DeviceRepelDetail> findPageDeviceRepelDetail(RepelDetailSelectVo repelDetailSelectVo) {
return deviceRepelDetailDao.findAll(getFindRetiredSpecification(repelDetailSelectVo),repelDetailSelectVo.getPageable()).map(deviceRepelDetail -> {
deviceRepelDetail.setScripts(JacksonUtil.readValue(deviceRepelDetail.getScriptJson(), new TypeReference<List<ScriptSaveVo>>() {
}));
if (deviceRepelDetail.getScriptJson()!=null) {
deviceRepelDetail.setScripts(JacksonUtil.readValue(deviceRepelDetail.getScriptJson(), new TypeReference<List<ScriptSaveVo>>() {
}));
}
deviceRepelDetail.setBillFiles(FilesUtil.stringFileToList(deviceRepelDetail.getBillFile()));
deviceRepelDetail.setOutboundFiles(FilesUtil.stringFileToList(deviceRepelDetail.getOutboundFile()));
deviceRepelDetail.setInFiles(FilesUtil.stringFileToList(deviceRepelDetail.getInFile()));
......
......@@ -314,12 +314,61 @@ public class RepelQueryServiceImpl implements RepelQueryService {
}
@Override
public List<DeviceLibrary> provinceDirectlyUnderDev(Integer taskId) {
public AllDirectUnderDevVo provinceDirectlyUnderDev(Integer taskId) {
TaskBto taskBto= taskService.get(taskId);
Map<String,List<DeviceLibrary>> map=new HashMap<>();
List<DeviceLibrary> librarieList=new ArrayList<>();
AllDirectUnderDevVo allDirectUnderDevVo=new AllDirectUnderDevVo();
DeviceRepelDetail deviceRepelDetail=repelDetailService.findDeviceRepelDetailNoDev(taskBto.getBillId());
DeviceRepel deviceRepel=deviceRepelService.findDeviceRepel(deviceRepelDetail.getRepelId());
List<String> unitNames=unitsService.finAllDirectlUnderUnits().stream().map(Units::getName).collect(Collectors.toList());
return deviceLibraryDao.findAllByPackingIdInAndOwnUnitIn(StringUtils.stringToList(deviceRepel.getFielding()),unitNames).stream().map(DeviceLibrary::setConfigName).collect(Collectors.toList());
List<String> unitNameList= unitsService.findAllByIdIn(StringUtils.stringToList(deviceRepel.getTaskScope())).stream().filter(units -> units.getType()==2).map(Units::getName).collect(Collectors.toList());
List<DeviceLibrary> deviceLibraries;
if (deviceRepel.getSeqNumbers()==null||deviceRepel.getSeqNumbers().equals("")) {
deviceLibraries = deviceLibraryDao.findAllByPackingIdInAndOwnUnitIn(StringUtils.stringToList(deviceRepel.getFielding()), unitNameList).stream()
.filter(deviceLibrary -> deviceLibrary.getLifeStatus().equals(DeviceLifeStatus.IN_LIBRARY.id)
|| deviceLibrary.getLifeStatus().equals(DeviceLifeStatus.REPEL.id)
|| deviceLibrary.getLifeStatus().equals(DeviceLifeStatus.SEND_BACK.id)
|| deviceLibrary.getLifeStatus().equals(DeviceLifeStatus.REPAIRING.id)
|| deviceLibrary.getLifeStatus().equals(DeviceLifeStatus.IN_TRANSIT.id)
|| deviceLibrary.getLifeStatus().equals(DeviceLifeStatus.USE.id))
.map(DeviceLibrary::setConfigName).collect(Collectors.toList());
}else {
deviceLibraries= deviceLibraryDao.findAllBySeqNumberInAndOwnUnitIn(DeviceSeqUtil.selectDeviceSeqs(deviceRepel.getSeqNumbers()),unitNameList).stream()
.filter(deviceLibrary -> deviceLibrary.getLifeStatus().equals(DeviceLifeStatus.IN_LIBRARY.id)
|| deviceLibrary.getLifeStatus().equals(DeviceLifeStatus.REPEL.id)
|| deviceLibrary.getLifeStatus().equals(DeviceLifeStatus.SEND_BACK.id)
|| deviceLibrary.getLifeStatus().equals(DeviceLifeStatus.REPAIRING.id)
|| deviceLibrary.getLifeStatus().equals(DeviceLifeStatus.IN_TRANSIT.id)
|| deviceLibrary.getLifeStatus().equals(DeviceLifeStatus.USE.id))
.map(DeviceLibrary::setConfigName).collect(Collectors.toList());
}
for (DeviceLibrary deviceLibrary:deviceLibraries) {
if (deviceLibrary.getOwnUnit().equals(deviceLibrary.getLocationUnit())) {
if (deviceLibrary.getLifeStatus() == 2 || deviceLibrary.getLifeStatus() == 15 || deviceLibrary.getLifeStatus() == 14 || deviceLibrary.getLifeStatus() == 6) {
if (map.containsKey(deviceLibrary.getOwnUnit())) {
List<DeviceLibrary> libraries = map.get(deviceLibrary.getOwnUnit());
libraries.add(deviceLibrary);
map.put(deviceLibrary.getOwnUnit(), libraries);
} else {
librarieList.add(deviceLibrary);
map.put(deviceLibrary.getOwnUnit(), librarieList);
}
} else {
allDirectUnderDevVo.setUnitName(deviceLibrary.getName());
allDirectUnderDevVo.setNotAbnormal(true);
break;
}
} else {
allDirectUnderDevVo.setUnitName(deviceLibrary.getName());
allDirectUnderDevVo.setNotAbnormal(true);
break;
}
}
allDirectUnderDevVo.setUnitNameDeviceMap(map);
return allDirectUnderDevVo;
}
......@@ -341,6 +390,7 @@ public class RepelQueryServiceImpl implements RepelQueryService {
}
}
);
return list;
}
......
......@@ -48,6 +48,11 @@
<groupId>com.tykj</groupId>
<artifactId>dev-confirmcheck</artifactId>
</dependency>
<dependency>
<groupId>com.tykj</groupId>
<artifactId>dev-train</artifactId>
</dependency>
<dependency>
<groupId>com.tykj</groupId>
<artifactId>dev-matching</artifactId>
......
......@@ -17,6 +17,8 @@ import com.tykj.dev.device.task.service.TaskService;
import com.tykj.dev.device.task.subject.domin.Task;
import com.tykj.dev.device.task.subject.vo.TaskSelectVo;
import com.tykj.dev.device.task.subject.vo.TaskUserVo;
import com.tykj.dev.device.train.dao.TrainThemeDao;
import com.tykj.dev.device.train.entity.TrainTheme;
import com.tykj.dev.device.user.base.ret.UserSituationVo;
import com.tykj.dev.device.user.cache.AreaCache;
import com.tykj.dev.device.user.cache.UnitsCache;
......@@ -57,6 +59,9 @@ public class StatisticalServiceImpl implements StatisticalService {
@Autowired
private UnitsDao unitsDao;
@Autowired
TrainThemeDao trainThemeDao;
@Autowired
private SelfCheckBillDao selfCheckBillDao;
......@@ -507,6 +512,9 @@ public class StatisticalServiceImpl implements StatisticalService {
workBench.setExamNum(Long.valueOf(tasks.stream().filter(task -> task.getParentTaskId()==0&&"exam".equals(task.getCustomInfo())&&task.getOwnUnit().equals(unit)).count()).intValue());
workBench.setExamCompleteNum(Long.valueOf(tasks.stream().filter(task -> task.getBillStatus()==9999&&task.getParentTaskId()==0&&"exam".equals(task.getCustomInfo())&&task.getOwnUnit().equals(unit)).count()).intValue());
workBench.setSelfCheckNum(Long.valueOf(tasks2.stream().filter(task -> task.getBillStatus()==9999&&unit.equals(task.getOwnUnit())).count()).intValue());
List<TrainTheme> themeList=trainThemeDao.findAll();
workBench.setTrainNum(themeList.size());
workBench.setTrainCompleteNum((int)themeList.stream().filter(trainTheme -> trainTheme.getTrainStatus()==9999).count());
return workBench;
}
......
......@@ -20,7 +20,9 @@ import com.tykj.dev.device.user.read.service.MessageService;
import com.tykj.dev.device.user.read.subject.bto.MessageBto;
import com.tykj.dev.device.user.subject.entity.SecurityUser;
import com.tykj.dev.device.user.subject.entity.User;
import com.tykj.dev.device.user.subject.entity.UserLog;
import com.tykj.dev.device.user.subject.service.UnitsService;
import com.tykj.dev.device.user.subject.service.UserLogService;
import com.tykj.dev.device.user.subject.service.UserService;
import com.tykj.dev.misc.base.BusinessEnum;
import com.tykj.dev.misc.base.StatusEnum;
......@@ -51,6 +53,9 @@ public class WorkHandoverServiceImpl implements WorkHandoverService {
@Autowired
TaskService taskService;
@Autowired
UserLogService userLogService;
@Autowired
WorkHandoverDao workHandoverDao;
......@@ -135,7 +140,10 @@ public class WorkHandoverServiceImpl implements WorkHandoverService {
//把交接人账号状态改为冻结
List<User> users= userService.findAllUserIdInUser(integerList);
users.forEach(
user -> user.setIsDel(1)
user -> {
user.setIsDel(1);
userLogService.save(new UserLog(user.getUserId(),new Date(),"交接成功完成,账号冻结"));
}
);
userService.saveAll(users);
return workHandover;
......
......@@ -297,8 +297,6 @@
</head>
<body>
<div class="returnTablePrint">
<div class="content">
<div>
......@@ -310,7 +308,7 @@
工作交接单
</span>
</div>
<div style="width:100%;text-align:left;font-size: 1px;margin-bottom:20px">
<div style="width:100%;text-align:left;font-size: 1px;margin-bottom:2px">
<div style="text-align:left;display: inline-block; width: 49%" class="number">
<span class="number">时间:${time!}</span>
</div>
......
......@@ -19,9 +19,9 @@ import javax.persistence.Entity;
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Data
@ApiModel(value = "建议反馈", description = "地区详细信息")
public class Feedback extends BaseEntity {
@Column(name = "content" ,columnDefinition = "TEXT")
private String content;
}
......@@ -179,12 +179,12 @@ public class UserServiceImpl implements UserService {
@Override
public List<UserShenRe> findByUniteId1(Integer unitsId) {
return userDao.findAllByUnitsId(unitsId).stream().filter(user -> user.getTrainStatus()!=5).map(User::toRe).sorted(Comparator.comparing(UserShenRe::getShowOrder)).collect(Collectors.toList());
return userDao.findAllByUnitsId(unitsId).stream().filter(user -> user.getTrainStatus()!=5&&user.getIsDel()==0).map(User::toRe).sorted(Comparator.comparing(UserShenRe::getShowOrder)).collect(Collectors.toList());
}
@Override
public List<User> findAllByUnite(Integer unitsId) {
return userDao.findAllByUnitsId(unitsId);
return userDao.findAllByUnitsId(unitsId).stream().filter(user -> user.getTrainStatus()!=5&&user.getIsDel()==0).collect(Collectors.toList());
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论