|
|
|
@ -33,6 +33,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
import java.time.LocalDateTime;
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -97,6 +98,7 @@ public class DeviceRepairApplyDetailServiceImpl extends ServiceImpl<DeviceRepair
|
|
|
|
|
//需要维修创建维修单
|
|
|
|
|
DeviceRepairEntity repairEntity = BeanUtil.copyProperties(one, DeviceRepairEntity.class);
|
|
|
|
|
repairEntity.setId(repairId).setApplyId(param.getApplyId()).setFinishFlag(false)
|
|
|
|
|
.setUpdateTime(LocalDateTime.now())
|
|
|
|
|
.setCreateUserId(user.getId()).setCreateUserName(user.getEmployeeName())
|
|
|
|
|
.setCreateDeptCode(user.getLocDeptCode()).setCreateDeptName(user.getDeptName())
|
|
|
|
|
.setCreateTime(now).setDiagnosisInfo(param.getDiagnosisInfo()).setInnerFlag(param.getInnerFlag())
|
|
|
|
@ -120,6 +122,7 @@ public class DeviceRepairApplyDetailServiceImpl extends ServiceImpl<DeviceRepair
|
|
|
|
|
.set(DeviceRepairApplyDetailEntity::getConfirmDeptName, user.getDeptName())
|
|
|
|
|
.set(DeviceRepairApplyDetailEntity::getDiagnosisLivePath, param.getDiagnosisLivePath())
|
|
|
|
|
.set(DeviceRepairApplyDetailEntity::getConfirmTime, now)
|
|
|
|
|
.set(DeviceRepairApplyDetailEntity::getUpdateTime, now)
|
|
|
|
|
.set(!param.getRepairFlag(), DeviceRepairApplyDetailEntity::getFinishTime, now)
|
|
|
|
|
.eq(DeviceRepairApplyDetailEntity::getApplyId, param.getApplyId())
|
|
|
|
|
.eq(DeviceRepairApplyDetailEntity::getDeviceCode, param.getDeviceCode())
|
|
|
|
@ -132,6 +135,7 @@ public class DeviceRepairApplyDetailServiceImpl extends ServiceImpl<DeviceRepair
|
|
|
|
|
//根据设备号和报修单标识更新巡检任务明细
|
|
|
|
|
deviceCheckDetailService.update(Wrappers.lambdaUpdate(DeviceCheckDetailEntity.class)
|
|
|
|
|
.set(DeviceCheckDetailEntity::getRepairId, repairId)
|
|
|
|
|
.set(DeviceCheckDetailEntity::getUpdateTime, now)
|
|
|
|
|
.eq(DeviceCheckDetailEntity::getApplyId, param.getApplyId())
|
|
|
|
|
.eq(DeviceCheckDetailEntity::getDeviceCode, param.getDeviceCode())
|
|
|
|
|
);
|
|
|
|
@ -152,9 +156,11 @@ public class DeviceRepairApplyDetailServiceImpl extends ServiceImpl<DeviceRepair
|
|
|
|
|
if (CollectionUtil.isNotEmpty(list)){
|
|
|
|
|
deviceRepairApplyService.update(Wrappers.lambdaUpdate(DeviceRepairApplyEntity.class)
|
|
|
|
|
.set(DeviceRepairApplyEntity::getStatus, DeviceRepairApplyStatusEnum.PROCESSING)
|
|
|
|
|
.set(DeviceRepairApplyEntity::getUpdateTime, new Date())
|
|
|
|
|
.eq(DeviceRepairApplyEntity::getId, applyId));
|
|
|
|
|
}else {
|
|
|
|
|
deviceRepairApplyService.update(Wrappers.lambdaUpdate(DeviceRepairApplyEntity.class)
|
|
|
|
|
.set(DeviceRepairApplyEntity::getUpdateTime, new Date())
|
|
|
|
|
.set(DeviceRepairApplyEntity::getStatus, DeviceRepairApplyStatusEnum.FINISH)
|
|
|
|
|
.eq(DeviceRepairApplyEntity::getId, applyId));
|
|
|
|
|
}
|
|
|
|
|